Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make response contentType required in JSON Schema, regenerate TM schema #1776

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

JKRhb
Copy link
Member

@JKRhb JKRhb commented Feb 27, 2023

Dealing with Discovery from TDDs, I noticed that the Thing Description JSON Schema document does not treat the contentType in the ExpectedResponse 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 a contentType. Therefore, to achieve a valid Directory Thing Description, you would actually need to additionally specify a contentType 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.)

@JKRhb JKRhb requested a review from egekorkan February 27, 2023 01:34
@egekorkan
Copy link
Contributor

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).

Good point as well. Just that it might be a bit annoying to deal with it with all possible cases from validation point of view (there is data schema but no contentType etc)

@egekorkan egekorkan added Editorial Issues with no technical impact on implementations validation Topic related to Normative Parsing, Validation, Consumption labels Mar 22, 2023
@egekorkan
Copy link
Contributor

Call of 22.03: Merging since it is informative

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editorial Issues with no technical impact on implementations validation Topic related to Normative Parsing, Validation, Consumption
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants