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