Skip to content

Commit c3144fc

Browse files
author
Denis Laxalde
committed
Move up the JSON Hyper Schema in "mailto:" example
While reading this section, I felt that the example came too late after a lot of explanations on it. So moving it up a bit while leaving some introduction before.
1 parent d163932 commit c3144fc

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

jsonschema-hyperschema.xml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,7 +1653,7 @@ Link: <https://schema.example.com/entry> rel=describedBy
16531653
described by "submissionSchema" and "submission MediaType".
16541654
</t>
16551655
<t>
1656-
Therefore, we use "submissionMediaType" to indicate a multipart/alternative
1656+
We use "submissionMediaType" to indicate a multipart/alternative
16571657
payload format, providing two representations of the same data (HTML and
16581658
plain text). Since a multipart/alternative message is an ordered sequence
16591659
(the last part is the most preferred alternative), we model the sequence as
@@ -1666,32 +1666,6 @@ Link: <https://schema.example.com/entry> rel=describedBy
16661666
each part and are not ordered, should be modeled as JSON objects rather than
16671667
arrays.
16681668
</t>
1669-
<t>
1670-
For the URI parameters, each of the three demonstrates a different way of
1671-
resolving the input:
1672-
<list style="hanging">
1673-
<t hangText="email:">
1674-
This variable's presence in "templateRequired" means that it must be
1675-
resolved for the template to be used. Since the "false" schema
1676-
assigned to it in "hrefSchema" excludes it from the input data set,
1677-
it must be resolved from the instance.
1678-
</t>
1679-
<t hangText="title:">
1680-
The instance field matching this variable is required, and it is also
1681-
allowed in the input data. So its instance value is used to
1682-
pre-populate the input data set before accepting the client's input.
1683-
The client can opt to leave the instance value in place. Since
1684-
this field is required in "hrefSchema", the client cannot delete it
1685-
(although it could set it to an empty string).
1686-
</t>
1687-
<t hangText="cc:">
1688-
The "false" schema set for this in the main schema prevents this field
1689-
from having an instance value. If it is present at all, it must come
1690-
from client input. As it is not required in "hrefSchema", it may not
1691-
be used at all.
1692-
</t>
1693-
</list>
1694-
</t>
16951669
<figure>
16961670
<preamble>
16971671
Note that some lines are wrapped to fit this document's width restrictions.
@@ -1754,6 +1728,32 @@ Link: <https://schema.example.com/entry> rel=describedBy
17541728
}]]>
17551729
</artwork>
17561730
</figure>
1731+
<t>
1732+
For the URI parameters, each of the three demonstrates a different way of
1733+
resolving the input:
1734+
<list style="hanging">
1735+
<t hangText="email:">
1736+
This variable's presence in "templateRequired" means that it must be
1737+
resolved for the template to be used. Since the "false" schema
1738+
assigned to it in "hrefSchema" excludes it from the input data set,
1739+
it must be resolved from the instance.
1740+
</t>
1741+
<t hangText="title:">
1742+
The instance field matching this variable is required, and it is also
1743+
allowed in the input data. So its instance value is used to
1744+
pre-populate the input data set before accepting the client's input.
1745+
The client can opt to leave the instance value in place. Since
1746+
this field is required in "hrefSchema", the client cannot delete it
1747+
(although it could set it to an empty string).
1748+
</t>
1749+
<t hangText="cc:">
1750+
The "false" schema set for this in the main schema prevents this field
1751+
from having an instance value. If it is present at all, it must come
1752+
from client input. As it is not required in "hrefSchema", it may not
1753+
be used at all.
1754+
</t>
1755+
</list>
1756+
</t>
17571757
<t>
17581758
So, given the following instance retrieved from "https://api.example.com/stuff":
17591759
</t>

0 commit comments

Comments
 (0)