From 13ba6b6a707722f889aaa153945d25954b6c6439 Mon Sep 17 00:00:00 2001 From: Henry Andrews <henry@cloudflare.com> Date: Thu, 30 Mar 2017 18:20:00 -0700 Subject: [PATCH] Clarify options for resolving template variables If a variable can be resolved from either the instance or from client data, the instance data may be used as a default when asking for client data. --- jsonschema-hyperschema.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/jsonschema-hyperschema.xml b/jsonschema-hyperschema.xml index dbfb826f..9b4f6eba 100644 --- a/jsonschema-hyperschema.xml +++ b/jsonschema-hyperschema.xml @@ -463,6 +463,15 @@ unresolved MUST be resolved from the resource instance data. </t> + <t> + If a URI Template variable corresponds to both an instance value + and a schema for external data, an application MAY choose to + present the instance value to the user as a default value. + This will ensure that, if the user takes no action to change + the value, the effect of resolving from the client or instace + data will be the same. + </t> + <section title="Converting to strings"> <t> When any value referenced by the URI template is null, a boolean or a number, then it should first be converted into a string as follows: @@ -576,6 +585,12 @@ }] }]]> </artwork> + <postamble> + Note that this example is identical to a server pre-computing + the path component of the URI (with "{id}") while the query + string component is handled by client input as with an HTML + "method"="get" form. + </postamble> </figure> <t> <cref>