The current description of representing Action parameters in the TD is too laconic and creates misunderstandings.
The text should say how is it possible/recommended to represent multiple inputs to Actions,
for instance by using an ObjectSchema.
But that would clash with representing a single parameter that is an object. How does an implementation know that an object in the TD Action input is meant as a single object parameter, or was meant as multiple parameters made from the members of the object?
(This issue is coming from here).
How does an implementation know that an object in the TD Action
inputis meant as a single object parameter, or was meant as multiple parameters made from the members of the object?
I think there is either no or one input to an action.
This action input can be of a
{"type": "string"}) or it can be also a { "type": "object", "properties": { "name": { "type": "string" }, "age": { "type": "integer", "minimum": 0 } }})OK, that would work.
Anyway that constraint needs to be stated out loud in the TD spec, maybe as a note.
This is how the JSON schema works. But you're right, it wouldn't hurt to say more words about it.
The wording needs to be about the _convention_ that an Action has 0 or 1 argument, and multiple arguments are represented as properties in an object.
Most helpful comment
The wording needs to be about the _convention_ that an Action has 0 or 1 argument, and multiple arguments are represented as properties in an object.