Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
I
iotivity-classic
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,289
    • Issues 3,289
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • IoTivity
  • iotivity-classic
  • Issues
  • #2501

Closed
Open
Opened Jan 21, 2019 by Rami Alshafi@ramiOwner

Bad payload format in response for collection resource without specified interface with "application/cbor" content type

Error can be found in test CT1.1.1, after sending RETRIEVE request with /collection (collection resource with default request handler) for application/cbor, IoTivity returns payload:

[
  {
    "links":
      [
        {
          "href":"/collectionBinarySwitchResURI",
          "rt":["oic.r.switch.binary"],
          "if":["oic.if.baseline","oic.if.a"],
          "p":{"bm":2,"sec":true,"port":40076,"x.org.iotivity.tls":46822}
        }
      ]
  }
]

While in RAML example we can see that proper payload format should look like this:

{
  "links":
    [
      {
        "href": "switch",
        "rt":   ["oic.r.switch.binary"],
        "if":   ["oic.if.a", "oic.if.baseline"]
      },
      {
        "href": "airFlow",
        "rt":   ["oic.r.airflow"],
        "if":   ["oic.if.a", "oic.if.baseline"]
      }
    ]
}

Error is that currently response is array which contains object with "links", instead of being just object with "links".
 
Logs with error in test CT1.1.1: 


JIRA migration meta data

  • JIRA Issue ID: IOT-3258
  • Reporter: michal.wieckowski
  • Assignee: michal.wieckowski
  • Creator: michal.wieckowski
  • Created at: 2019-01-21T00:22:17.000-0800
  • Found in Version: master
  • Fix in Version: None
  • Issue Severity: Normal
  • Reproducibility: Always (100%)
  • Operating System: Ubuntu
  • Hardware/ OEM Platform: None
  • External URL: None
  • Bugzilla ID: None
  • Product: None
  • Status: Resolved
  • Components: SDK
  • Priority: P3
  • Due Date: None
  • Issue Type: Bug
    END of JIRA migration meta data

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: iotivity/iotivity-classic#2501