diff --git a/changelogs/client_server/newsfragments/1756.clarification b/changelogs/client_server/newsfragments/1756.clarification new file mode 100644 index 000000000..918e87c19 --- /dev/null +++ b/changelogs/client_server/newsfragments/1756.clarification @@ -0,0 +1 @@ +Clearly indicate that each `Content-Type` may have distinct behaviour on non-JSON requests/responses. diff --git a/layouts/partials/openapi/render-content-type.html b/layouts/partials/openapi/render-content-type.html index da1a69bd6..036522ded 100644 --- a/layouts/partials/openapi/render-content-type.html +++ b/layouts/partials/openapi/render-content-type.html @@ -1,27 +1,30 @@ {{/* - Render a table showing content type and description, given: + Render a table showing content types and their descriptions, given + two arrays with equal length: - * `content_type`: the content type as a string + * `content_types`: the content type strings - * `description`: the description as a string + * `descriptions`: the description strings */}} -{{ $content_type := .content_type }} -{{ $description := .description}} +{{ $content_types := .content_types }} +{{ $descriptions := .descriptions}} -{{ if $content_type }} +{{ if (gt (len $content_types) 0) }}
Content-Type | Description | + {{ range $idx, $content_type := $content_types }}|
---|---|---|
{{ $content_type }} |
- {{ $description | markdownify -}} | +{{ index $descriptions $idx | markdownify -}} |