Break out non-JSON request/response content types as tables (#1756)
* Break out non-JSON request/response content types as tables Currently we display this as a table like "image/png|image/jpeg" and description on a single line, but we're using a table. This breaks the join out to individual rows. * changelog
This commit is contained in:
parent
6700f5ddd1
commit
eb22fac5dc
4 changed files with 18 additions and 14 deletions
|
@ -109,13 +109,12 @@
|
|||
Show the content types and description.
|
||||
*/}}
|
||||
{{ $mimes := slice }}
|
||||
{{ $desc := "" }}
|
||||
{{ $descriptions := slice }}
|
||||
{{ range $mime, $body := $response.content }}
|
||||
{{ $mimes = $mimes | append $mime }}
|
||||
{{ $desc = $body.schema.description }}
|
||||
{{ $descriptions = $descriptions | append $body.schema.description }}
|
||||
{{ end }}
|
||||
{{ $content_type := delimit $mimes "|"}}
|
||||
{{ partial "openapi/render-content-type" (dict "content_type" $content_type "description" $desc) }}
|
||||
{{ partial "openapi/render-content-type" (dict "content_types" $mimes "descriptions" $descriptions) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue