feat!: improve deserialization and production logic #172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR reworks those parts of the library that are responsible for deserializing Thing Descriptions (creating
ThingDescription
class objects in the process) and for producingExposedThing
instances.The validation of TDs is now “baked in” more directly into the deserialization process, making it possible to get rid of the JSON Schema based validation that was used before, making the instantiation of a
ThingDescription
object a bit more lightweight.There are a few edge cases that aren't fully covered yet at the moment (especially when it comes to top-level forms and the permitted operations there), so these aspects will be re-revisited in follow-up PRs.