Make contentType optional in ExpectedResponse and AdditionalExpectedResponse classes#2081
Make contentType optional in ExpectedResponse and AdditionalExpectedResponse classes#2081
contentType optional in ExpectedResponse and AdditionalExpectedResponse classes#2081Conversation
contentType optional in ExpectedResponse classcontentType optional in ExpectedResponse and AdditionalExpectedResponse classes
|
I noticed in the meantime that there are also assertions related to the |
|
I am fine with this direction given the use case. However, we are not clear about the meaning of the lack of
|
|
I've now made a first attempt at adjusting the assertions for the two classes. I have the impression that this requires a bit more care than initially expected 😅 But I hope that the changes I made so far point in the right direction. One area that also needs to be revisited carefully is the table on the content type usage, which I haven't taken a closer look at so far. |
|
@egekorkan wrote:
That sounds like a big change. Would that mean that all forms which previously defaulted to |
Hmm, I think by default, we could stick to |
Not a big change in my opinion. We will have a container to define defaults for all forms anyways. Also see w3c/wot-binding-templates#357 (comment) and the comments below it |
|
TD call 20 Feb:
|
|
TD call 05 March:
|
I don't love the global default being removed. Can this at least wait until there is somewhere to specify a default for a specific Thing Description? Otherwise I'm going to have to start adding |
|
@benfrancis there will be the way to add a global default for a data schema as a result of https://github.com/w3c/wot-thing-description/tree/main/proposals/initial-connection. Also, we plan on adding a logic saying "if there is an input schema, the contentType is application/json in the form" |
|
Okay, I think this PR should now be closer to a mergable state :) Besides adjusting the assertions that were already subject to this PR to reflect our latest consensus, I also removed two assertions that seemed unneeded/obsolete to me, and also added a new example that illustrates how the empty With these changes, the discussion we had earlier on making I hope that the PR will now be ready to be merged, but I would ask you to conduct another careful review to make sure that there was no oversight from my sight. I also noticed one aspect regarding |
|
TD call today:
|
Co-authored-by: Ted Thibodeau Jr <[email protected]>
I think these aspects should now be addressed :) Looking forward to your feedback here. |
Co-authored-by: Ted Thibodeau Jr <[email protected]>
|
I think it is looking very good now. I have also updated the assertions.csv file as assertions are changing. I will also start automating that now. |
|
I'm still not completely satisfied about how we deal the absece of payloads (inputs or outputs), I hope that in the next revision we can find something cleaner. Perhaps this will help:
|
Description of Changes
This PR deals with an issue that was discovered in the context of w3c/wot-discovery#465 and #1776: At the moment, there is always a
contentTypeassumed for anExpectedResponseorAdditionalExpectedResponse, although there are cases where a server does not return any kind of payload (e.g., in the case of an HTTPNo Contentresponse). This PR provides a potential fix for the issue, although there might be some more discussion needed here.Related Issue
Closes #1780
Type of Change
Check the correct box and add the corresponding label if you are an editor.
Preview | Diff