|
330 | 330 | <h3>
|
331 | 331 | <a name="21-resource" class="anchor" href="#21-resource"><span class="mini-icon mini-icon-link"></span></a>2.1 Resource</h3>
|
332 | 332 |
|
333 |
| -<p>A <em>resource</em> MUST have a unique <em>id</em> that names the resource and SHOULD have a <em>description</em> containing further information about the intented use of the given resource. The <em>path</em> MUST be part of the resource definition and MUST be unique. The path is a URI [<a href="http://www.ietf.org/rfc/rfc2396.txt" title="RFC 2396 - Uniform Resource Identifiers (URI): Generic Syntax">RFC2396</a>] or URI template [<a href="http://www.ietf.org/rfc/rfc6570.txt" title="RFC 6570 - URI Template">RFC6570</a>]. If the path contains variables the resource MUST contain a set of <em>parameter</em> definitions. The resource MUST contain one definition for each available HTTP <em>method</em>.</p> |
| 333 | +<p>A <em>resource</em> MUST have a unique <em>id</em> that names the resource and SHOULD have a <em>description</em> containing further information about the intended use of the given resource. The <em>path</em> MUST be part of the resource definition and MUST be unique. The path is a URI [<a href="http://www.ietf.org/rfc/rfc2396.txt" title="RFC 2396 - Uniform Resource Identifiers (URI): Generic Syntax">RFC2396</a>] or URI template [<a href="http://www.ietf.org/rfc/rfc6570.txt" title="RFC 6570 - URI Template">RFC6570</a>]. If the path contains variables the resource MUST contain a set of <em>parameter</em> definitions. The resource MUST contain one definition for each available HTTP <em>method</em>.</p> |
334 | 334 |
|
335 | 335 | <p>In the running example there are 2 resources with the paths "/{locale}/{messageId}" and "/fallback/{locale}".</p>
|
336 | 336 |
|
|
345 | 345 | <a name="23-validation" class="anchor" href="#23-validation"><span class="mini-icon mini-icon-link"></span></a>2.3 Validation</h3>
|
346 | 346 |
|
347 | 347 | <p><em>Validations</em> define means to check the content of parameters. Validations are a set of type/pattern pairs with <em>type</em> defining the validation type and <em>pattern</em> containing the regular expression to apply.
|
348 |
| -Currently the only supported type is <em>match</em>. Multiple entries within one validation set are disjunctive, so the entries are ORed.</p> |
| 348 | +Currently the only supported type is <em>match</em>. Multiple entries within one validation set are disjunctive, so the entries are OR'ed.</p> |
349 | 349 |
|
350 | 350 | <h3>
|
351 | 351 | <a name="24-method" class="anchor" href="#24-method"><span class="mini-icon mini-icon-link"></span></a>2.4 Method</h3>
|
|
578 | 578 | <span class="p">{</span> <span class="s2">"type"</span><span class="o">:</span> <span class="s2">"application/json"</span><span class="p">,</span> <span class="s2">"schema"</span><span class="o">:</span> <span class="s2">"http://some.json/msg"</span> <span class="p">},</span>
|
579 | 579 | <span class="p">],</span>
|
580 | 580 | <span class="s2">"headers"</span><span class="o">:</span> <span class="p">{</span>
|
581 |
| - <span class="s2">"X-What-Response-Header-Would-Only-Show-Up-For-One-Resource?"</span><span class="o">:</span> <span class="p">{}</span> |
| 581 | + <span class="s2">"Location"</span><span class="o">:</span> <span class="p">{</span> |
| 582 | + <span class="s2">"description"</span><span class="o">:</span> <span class="s2">"The URL of the created message"</span> |
| 583 | + <span class="p">}</span> |
582 | 584 | <span class="p">}</span>
|
583 | 585 | <span class="p">},</span>
|
584 | 586 | <span class="s2">"examples"</span><span class="o">:</span> <span class="p">[</span>
|
|
0 commit comments