-
Notifications
You must be signed in to change notification settings - Fork 17
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 TD: Don't Actions need an input field #182
Comments
By the way, similar comment regarding property values. There is no type:object for properties |
It is optional. Isn't the contentType sufficient? We can't add it for search outputs because the response is not always an object even though it is always JSON; see #156. |
So the contentType only tells how it will be serialized but doesn't necessarily say that there will be a body. Regarding anything than is JSON, I would not have a good answer. However, not having an |
I'd have to check the TD spec to be sure but the input (and output) data schemas of an action should both be optional. 1, either may not be structured data (e.g. an image) in which case there is only a contentType. 2, it is logical to have actions with no inputs and no return type, just like functions (consider "void f()"). In fact an action may have neither and still be valid. You're requesting an action, the request alone may be sufficient. |
So if you the spec is tolerating if you supply additional data but ideally if you return a payload in an action, the TD should have an output field. The TDD returns a payload for actions but there is not output field. Similar for inputs for registering TD |
My comments were about TDs in general (e.g. void f() is a valid function signature) but for TDDs we should of course correctly identify the input and outputs of all interactions. I think the problem here is that embedding the JSON Schema for TDs in the TDD would be a huge mess. So I think as a practical matter we should just depend on the contentType, but maybe adding an explanatory note would be useful (e.g. "An input data schema for these actions has been omitted, since the input data format is identified by the content type. A JSON Schema for the input can be found in the TD specification.") |
Some thoughts:
Suggested resolution: no normative change to THIS spec, but perhaps some explanation of the design choices following the above, explaining why there is no schema. |
I believe OP's point is about setting an |
Yes that was my point. If the TD doesn't specify a data schema, a consumer shouldn't think of looking at the forms to construct a certain payload structure. Saying type object is enough to imply that the payload isn't empty. |
I've created a PR to add those. I think the object type is also necessary when converting the TD to OpenAPI spec. See #82 (comment) |
The TDD TD has the following actions:
createTD
,updateTD
,updatePartialTD
. Don't these actions need an input that has an object type, which is the TD ?The text was updated successfully, but these errors were encountered: