You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure exactly how to specify the action metadata for a request like this:
GET /foo?bar=abc&baz=123 HTTP/1.1
According to draft 2 of the spec:
If encoding is either "json" or "json+files" then the schema should describe the JSON data. schema handling is not defined for other encoding types. [Emphasis mine]
So, I don't think specifying only a control's href and schema is sufficient:
If isHrefTemplate is true then href must be interpreted as a URI template according to RFC 6570 - URI Template. The template variables may be described by a schema definition in the schema property or through a referenced schema via the schemaUrl property. [Emphasis mine]
I'm mostly unsure, because draft 2 goes on to say:
All the values for the template variables should be represented in a JSON object. Variable names are then supposed to be JSONPath expressions (without leading slashes) that refer to properties in the JSON object. [Emphasis mine]
I'm also confused by the "without leading slashes" part. JSON path (as far as I know) starts with $. Should this be JSON Pointer instead? If not, does this mean the template needs to be /foo{?%24.foo,%24.bar} (percent encoding to conform to template variable syntax)?
The text was updated successfully, but these errors were encountered:
On a related note, for invoking control elements, merging the template and the arguments object (step 4) happens after URI templates are expanded (step 2). Does this mean templates can't be applied to URI templates? How would you go about supplying default values? Possibly through JSON Schema's default keyword?
Trying to understand Mason's support for queries/templated transitions.
I'm not sure exactly how to specify the action metadata for a request like this:
According to draft 2 of the spec:
So, I don't think specifying only a control's
href
andschema
is sufficient:Draft 2 also states:
Then would that mean this control is enough?
I'm mostly unsure, because draft 2 goes on to say:
I'm also confused by the "without leading slashes" part. JSON path (as far as I know) starts with
$
. Should this be JSON Pointer instead? If not, does this mean the template needs to be/foo{?%24.foo,%24.bar}
(percent encoding to conform to template variable syntax)?The text was updated successfully, but these errors were encountered: