diff --git a/layouts/partials/openapi/render-request.html b/layouts/partials/openapi/render-request.html
index 92811f12..80b352c6 100644
--- a/layouts/partials/openapi/render-request.html
+++ b/layouts/partials/openapi/render-request.html
@@ -16,6 +16,7 @@
{{ $parameters := .parameters }}
{{ $request_body := .request_body }}
{{ $anchor_base := .anchor_base }}
+{{ $anchor := printf "%s_request" $anchor_base }}
Request
@@ -42,7 +43,7 @@
*/}}
{{ $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 }}
{{ partial "openapi/render-object-table" . }}
{{ end }}
diff --git a/layouts/partials/openapi/render-responses.html b/layouts/partials/openapi/render-responses.html
index f26110b4..084e9481 100644
--- a/layouts/partials/openapi/render-responses.html
+++ b/layouts/partials/openapi/render-responses.html
@@ -39,6 +39,7 @@
{{ range $code, $response := $responses }}
{{ if $response.content }}
+ {{ $anchor := printf "%s_response-%s" $anchor_base $code }}
{{$code}} response
{{/* 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 }}