diff --git a/assets/scss/custom.scss b/assets/scss/custom.scss index 9d748bd2..7cdc35ce 100644 --- a/assets/scss/custom.scss +++ b/assets/scss/custom.scss @@ -374,7 +374,7 @@ footer { padding: 1rem; } - &.object-table, &.response-table { + &.object-table, &.response-table, &.content-type-table { border: 1px $table-border-color solid; caption { diff --git a/layouts/partials/openapi/render-content-type.html b/layouts/partials/openapi/render-content-type.html new file mode 100644 index 00000000..da1a69bd --- /dev/null +++ b/layouts/partials/openapi/render-content-type.html @@ -0,0 +1,27 @@ +{{/* + + Render a table showing content type and description, given: + + * `content_type`: the content type as a string + + * `description`: the description as a string + +*/}} + +{{ $content_type := .content_type }} +{{ $description := .description}} + +{{ if $content_type }} + +
| Content-Type | +Description | + +
|---|---|
{{ $content_type }} |
+ {{ $description | markdownify -}} | +
Array of {{ $type_of }}.