vaimee / zion

A scalable Thing Description Directory
Apache License 2.0
17 stars 4 forks source link

Update @context URLs, add response contentType workaround #52

Closed JKRhb closed 1 year ago

JKRhb commented 1 year ago

This PR updates the @context URLs included in the directory's TM/TD in anticipation of https://github.com/w3c/wot-discovery/pull/471 and applies the workaround added in https://github.com/w3c/wot-discovery/pull/469 to the ThingDescriptionBuilderService by inserting application/x-empty as a contentType for response objects where the field absent.

Combined, these changes result in a TD for the Directory that passes validation against the latest JSON Schema document provided in the TD repository :)

JKRhb commented 1 year ago

Needed to update two dependencies and create another workaround in 8f0b128 to get the TD instantiation to actually work again. Seems to me like a bug has appeared in the td-tools package that modifies the input TM, which apparently has not happened before 🤔

JKRhb commented 1 year ago

Hi Cristiano, thank you for the feedback! Sure, I will check again and try to narrow down the changes :)

JKRhb commented 1 year ago

With the latest push, I managed to trim down the changes in the package-lock.json file by a lot. However, for some reason, the tests are now failing since the td-tools apparently does not include the latest fixes for the TM JSON schema 🤔 We may need to put this PR on hold then until version 0.8.6 of the td-tools package with the updated schema has been released.

relu91 commented 1 year ago

Ok, in my understanding we are going to release 0.8.6 very soon. I'll check if we get the green light once it will be published!

JKRhb commented 1 year ago

The new td-tools release actually solved the problem 🎉

JKRhb commented 1 year ago

I am now wondering: Should we wait for https://github.com/w3c/wot-discovery/pull/471? Or would it be fine to already merge this PR?

JKRhb commented 1 year ago

https://github.com/w3c/wot-discovery/pull/471 has now been merged by the way, so the spec is not a potential blocker anymore :)

relu91 commented 1 year ago

Talked offline with @hyperloris, he was a little bit uncomfortable with merging a PR with TODOs in it. I agree but those TODOs are reasonable and they can be tracked in issues (as suggested by @hyperloris himself). Therefore, I'm forcing the merging of the PR without waiting for his formal approval. Later on, I'll open the tracking issues.