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
TDD Thing Model is missing contentType
in response
objects
#465
Comments
Can't add an assertion, at most can add an informative statement. Worst case, we mention the above workaround using application/octet-stream. |
A content type should not be needed when there is no content (no HTTP body). Enforcing that on directories would be really strange. See also:
I suggest we wait and hope that |
I fully agree with you, @farshidtz. I opened w3c/wot-thing-description#1780 in the TD repository in order to discuss a possible solution there. |
It looks like making this optional is not going to happen in the current spec, as it would be a normative change which is not possible in CR. The referenced issue is marked as "Defer to TD 2.0". So we will have to go with the "strange" option, but as an informative note. Suggest adding an informative comment (not an ed note, just a normal sentence) like the following:
@JKRhb will prepare a PR (and decide where a suitable place to insert this would). |
Experimenting with discovery from TDDs, I noticed that a TDD implementation that adheres to the currently defined Thing Model for the API specification ends up generating a Thing Description that is not valid according to the TD specification. That is because a form like the following does not define a
contentType
for itsresponse
member, causing an instantiated TD to be invalid if nocontentType
is explicitly added by the TDD:As also discussed in w3c/wot-thing-description#1776, having no
contentType
seems reasonable to me here – however, if a discovery validates a TDD's Thing Description, then it is rejected in its current form.Would it be a possible workaround to add
application/octet-stream
for cases like these? Or is there maybe a better alternative?The text was updated successfully, but these errors were encountered: