mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-23 11:34:09 +01:00
Differentiate API endpoints' request and response children's IDs
Ensures that the objects have a unique ID compared to other parts of the endpoint. Mostly useful for the Error type that can be used for responses with different status codes. Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
fa0e3068b4
commit
8db8f446d0
|
|
@ -16,6 +16,7 @@
|
||||||
{{ $parameters := .parameters }}
|
{{ $parameters := .parameters }}
|
||||||
{{ $request_body := .request_body }}
|
{{ $request_body := .request_body }}
|
||||||
{{ $anchor_base := .anchor_base }}
|
{{ $anchor_base := .anchor_base }}
|
||||||
|
{{ $anchor := printf "%s_request" $anchor_base }}
|
||||||
|
|
||||||
<h2>Request</h2>
|
<h2>Request</h2>
|
||||||
|
|
||||||
|
|
@ -42,7 +43,7 @@
|
||||||
*/}}
|
*/}}
|
||||||
{{ $schema := $json_body.schema }}
|
{{ $schema := $json_body.schema }}
|
||||||
|
|
||||||
{{ $additional_types := partial "json-schema/resolve-additional-types" (dict "schema" $schema "anchor_base" $anchor_base) }}
|
{{ $additional_types := partial "json-schema/resolve-additional-types" (dict "schema" $schema "anchor_base" $anchor) }}
|
||||||
{{ range $additional_types }}
|
{{ range $additional_types }}
|
||||||
{{ partial "openapi/render-object-table" . }}
|
{{ partial "openapi/render-object-table" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
|
|
||||||
{{ range $code, $response := $responses }}
|
{{ range $code, $response := $responses }}
|
||||||
{{ if $response.content }}
|
{{ if $response.content }}
|
||||||
|
{{ $anchor := printf "%s_response-%s" $anchor_base $code }}
|
||||||
<h3>{{$code}} response</h3>
|
<h3>{{$code}} response</h3>
|
||||||
{{/* Display defined headers */}}
|
{{/* Display defined headers */}}
|
||||||
{{ if $response.headers }}
|
{{ if $response.headers }}
|
||||||
|
|
@ -97,7 +98,7 @@
|
||||||
response. (This will be a no-op for response types which aren't
|
response. (This will be a no-op for response types which aren't
|
||||||
objects or arrays.)
|
objects or arrays.)
|
||||||
*/}}
|
*/}}
|
||||||
{{ $additional_types := partial "json-schema/resolve-additional-types" (dict "schema" $schema "anchor_base" $anchor_base) }}
|
{{ $additional_types := partial "json-schema/resolve-additional-types" (dict "schema" $schema "anchor_base" $anchor) }}
|
||||||
{{ range $additional_types }}
|
{{ range $additional_types }}
|
||||||
{{ partial "openapi/render-object-table" . }}
|
{{ partial "openapi/render-object-table" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue