[IOTDM-94] Incorrect values expected in csz attribute of AE resource Created: 17/Aug/17  Updated: 20/Nov/17

Status: Open
Project: iotdm
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Tomas Janciga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 9002

 Description   

Copied from e-mail conversation:

In the AE resource there is a parameter contentSerialization. This is a list of ‘serializations’ defined in commonTypes as:

<!-- auxiliary data type required to define "serializations" below -->
<xs:simpleType name="permittedMediaTypes">
<xs:restriction base="m2m:typeOfContent">
<xs:enumeration value="application/xml"/>
<xs:enumeration value="application/json"/>
<xs:enumeration value="application/cbor"/>
</xs:restriction>
</xs:simpleType>

<!-- "serializations" data type is a list of permitted media types as defined above -->
<xs:simpleType name="serializations">
<xs:restriction>
<xs:simpleType>
<xs:list itemType="m2m:permittedMediaTypes"/>
</xs:simpleType>
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>

However, if I sent IoTDM Carbon the following JSON I get an error:

Sending to:http://127.0.0.1:8282/InCSE1
Request body...
{
"m2m:ae" :

{ "api" : "app-sensor", "csz" : [ "application/xml", "application/json" ], "lbl" : [ "Type/sensor", "Category/temperature" ], "rn" : "MY_SENSOR", "rr" : false }

}

Response body:

{"error":"CONTENT(pc) only accept word JSON or XML for attribute csz"}
Generated at Wed Feb 07 20:05:09 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.