hugo-theme-relearn/layouts/partials/shortcodes/swagger.html

32 lines
766 B
HTML
Raw Normal View History

{{- $context := .context }}
{{- $src := .src }}
{{- with $context }}
{{- with .Page.Resources.Match $src }}
{{- range . }}
{{- $src = .RelPermalink }}
{{- end }}
{{- end }}
<rapi-doc
2022-10-06 13:48:10 +00:00
{{- if eq (partial "output-format.hugo" .Page) "print" }}
allow-spec-file-download="false"
allow-server-selection="false"
allow-try="false"
render-style="read"
{{- else }}
allow-spec-file-download="true"
2022-10-06 13:48:10 +00:00
allow-server-selection="true"
allow-try="true"
render-style="view"
{{- end }}
default-schema-tab="example"
font-size="largest"
layout="column"
load-fonts="false"
schema-description-expanded="true"
schema-style="table"
show-header="false"
spec-url="{{ $src }}"
sort-tags="true"
></rapi-doc>
{{- .Page.Store.Set "hasSwagger" true }}
{{- end }}