Ensure more uniqueness for generated HTML IDs (#1881)
* Include method in all API endpoint children's IDs Avoids duplicate IDs for object of endpoints that use the same path but a different method. Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr> * 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> * Differentiate the names of both SessionData formats Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr> * Add changelog Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr> --------- Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
8ef84d1cc7
commit
094e25b6cd
7 changed files with 11 additions and 7 deletions
|
@ -39,6 +39,7 @@
|
|||
|
||||
{{ range $code, $response := $responses }}
|
||||
{{ if $response.content }}
|
||||
{{ $anchor := printf "%s_response-%s" $anchor_base $code }}
|
||||
<h3>{{$code}} response</h3>
|
||||
{{/* Display defined headers */}}
|
||||
{{ if $response.headers }}
|
||||
|
@ -97,7 +98,7 @@
|
|||
response. (This will be a no-op for response 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) }}
|
||||
{{ range $additional_types }}
|
||||
{{ partial "openapi/render-object-table" . }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue