sane-city / wot-servient

W3C Web of Things implementation for Java
MIT License
30 stars 5 forks source link

Unrecognized field "descriptions" #10

Closed Citrullin closed 3 years ago

Citrullin commented 3 years ago

I got the following WoT TD:

./coap-client -m get coap://[2a02:8109:b6c0:c212:8029:2fff:fe69:6cc5]/.well-known/wot-thing-description
{"@context":["https://www.w3.org/2019/wot/td/v1",{"cov":"http://www.example.org/coap-binding#"},{"saref":"https://w3id.org/saref#"}],"securityDefinitions":{"noschema":{"scheme":"nosec","descriptions":{"en":"Basic sec schema"},"description":"Basic sec schema"}},"security":["noschema"],"@type":["saref:LightSwitch"],"titles":{"en":"English title","de":"Deutscher Titel"},"title":"English title","descriptions":{"en":"English description","de":"Deutsche Beschreibung"},"description":"English description","properties":{"echo":{"observable":false,"forms":[{"op":["readproperty"],"href":"/echo","contentType":"text/plain","cov:methodName":"GET"}]}}}

I checked the TD with the thingsweb.io playground tool. It's a valid WoT TD. It looks like I get also the correct TD in my code, but it is not able to parse it, due to the unrecognized field.

java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Unrecognized field "descriptions" (class city.sane.wot.thing.security.NoSecurityScheme), not marked as ignorable (0 known properties: ])
 at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: city.sane.wot.thing.Thing["securityDefinitions"]->java.util.LinkedHashMap["basic_schema"]->city.sane.wot.thing.security.NoSecurityScheme["descriptions"])

Does this has something to do with the non supported security schemes described in the docs?

HeikoBornholdt commented 3 years ago

Sorry for the delay. I have just released a new snapshot version (1.15-SNAPSHOT) which fixes this bug.

Citrullin commented 3 years ago

Sorry for the delay. I have just released a new snapshot version (1.15-SNAPSHOT) which fixes this bug.

That is fine. You are already surprising me positively :) It works, thx! :)