Make response contentType required in JSON Schema, regenerate TM schema #1776
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.
Dealing with Discovery from TDDs, I noticed that the Thing Description JSON Schema document does not treat the
contentType
in theExpectedResponse
class as mandatory at the moment (see section 5.3.4.3).This PR aligns this part of the JSON Schema document with the specification. However, this change does have some implications for the discovery specification, as the TDD Thing Model contains
response
objects that do not specify acontentType
. Therefore, to achieve a valid Directory Thing Description, you would actually need to additionally specify acontentType
here during the TM to TD conversion.In general, I suppose it could make sense to make the
contentType
optional in TD 2.0, since there are cases where omitting the Content-Type is a valid choice (e.g., if no body/payload is supposed to be included in the response).(Besides the TD Schema change, this PR also regenerates the TM schema and takes over a small change from 0bbcc5c.)