mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-13 23:14:10 +01:00
Add doc comments
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
b83bc65850
commit
52a90f21df
|
|
@ -37,6 +37,11 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Add the assembled example to the list if either (a) the example is
|
||||||
|
non-empty, or (b) the object itself is meant to be empty (so an
|
||||||
|
empty example is correct).
|
||||||
|
*/}}
|
||||||
{{ if (or $example (not $this_object.properties)) }}
|
{{ if (or $example (not $this_object.properties)) }}
|
||||||
{{ $examples = slice $example }}
|
{{ $examples = slice $example }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,11 @@
|
||||||
|
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Request and response bodies can have several content types. If there is a
|
||||||
|
JSON type, we display that; otherwise we just show the content types and
|
||||||
|
descriptions.
|
||||||
|
*/}}
|
||||||
{{ $json_body := index .content "application/json" }}
|
{{ $json_body := index .content "application/json" }}
|
||||||
{{ if $json_body }}
|
{{ if $json_body }}
|
||||||
{{/*
|
{{/*
|
||||||
|
|
@ -48,9 +53,10 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Render object tables for any objects referenced in the response.
|
Render object tables for any objects referenced in the request/response.
|
||||||
|
|
||||||
This will be a no-op for response types which aren't objects or arrays.
|
This will be a no-op for request/response body types which aren't
|
||||||
|
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_base) }}
|
||||||
{{ range $additional_types }}
|
{{ range $additional_types }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue