|
Post by dlsandy on Nov 28, 2023 15:10:23 GMT
Hello everyone, I am hoping that the forum can weigh in on this: A colleague of mine says that all parameters within the ActionInfo must also have a corresponding property within the body of the related resource. For instance, if my ActionInfo defines a parameter named "SomeParameter", then the resource that references the ActionInfo must also have a property named "SomeParameter".
Perhaps I overlooked it, but I could not find any mention of this restriction in the specification or the schema. If this is a restriction, what is the reason behind it? I look forward to your response. -Doug
|
|
|
Post by jautor on Nov 29, 2023 0:07:10 GMT
No, there is no requirement that an Action parameter have a corresponding property. One of the main purposes of "Actions" is to provide the means to perform tasks that do not fit into the RESTful model, and many of those require parameters to specify behavior. The most obvious example is `ResetType` in the commonly-defined "Reset" action.
Looking through the schema, there actually aren't very many cases where a parameter corresponds directly to a single property instance. In many cases that do, it's used as a selector for an array of objects in order to perform a non-RESTful operation.
Jeff
|
|