File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 146
146
other link serializations or representation formats at runtime, or pre-emptively
147
147
follow links to facilitate server push usage.
148
148
</t >
149
+ <figure >
150
+ <preamble >
151
+ Here is an example hyper-schema that adds a single link, with the
152
+ IANA-registered link relation type "self", that is built from an instance
153
+ with one known object field named "id":
154
+ </preamble >
155
+ <artwork >
156
+ <![CDATA[ {
157
+ "type": "object",
158
+ "properties": {
159
+ "id": {
160
+ "type": "number",
161
+ "readOnly": true
162
+ }
163
+ },
164
+ "links": [
165
+ {
166
+ "rel": "self",
167
+ "href": "thing/{id}"
168
+ }
169
+ ]
170
+ }]]>
171
+ </artwork >
172
+ <postamble >
173
+ If the instance is {"id": 1234}, and its base URI according to
174
+ <xref target =" RFC3986" >RFC 3986 section 5.1</xref >, is
175
+ "https://api.example.com/", then "https://api.example.com/thing/1234"
176
+ is the resulting link's target URI.
177
+ </postamble >
178
+ </figure >
149
179
150
180
<section title =" Terminology" >
151
181
<t >
You can’t perform that action at this time.
0 commit comments