Add anchors in definition
shortcode (#1802)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
7201042894
commit
a0bc6e7f83
2 changed files with 9 additions and 2 deletions
|
@ -26,7 +26,9 @@
|
|||
{{ $definition = partial "json-schema/resolve-refs" (dict "schema" $definition "path" $path) }}
|
||||
{{ $definition = partial "json-schema/resolve-allof" $definition }}
|
||||
|
||||
<section class="rendered-data definition" id="definition-{{ anchorize $definition.title }}">
|
||||
{{ $anchor_base := printf "definition-%s" (anchorize $definition.title) }}
|
||||
|
||||
<section class="rendered-data definition" id="{{ $anchor_base }}">
|
||||
|
||||
<details {{ if not $compact }}open{{ end }}>
|
||||
<summary>
|
||||
|
@ -46,7 +48,11 @@
|
|||
{{ $definition.description | markdownify }}
|
||||
|
||||
|
||||
{{ $additional_types := partial "json-schema/resolve-additional-types" (dict "schema" $definition "name" (printf "\"%s\"" $path)) }}
|
||||
{{ $additional_types := partial "json-schema/resolve-additional-types" (dict
|
||||
"schema" $definition
|
||||
"anchor_base" $anchor_base
|
||||
"name" (printf "\"%s\"" $path))
|
||||
}}
|
||||
|
||||
{{ range $additional_types }}
|
||||
{{ partial "openapi/render-object-table" . }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue