{{ $s := .schema }}{{ $api := .api }}{{ $depth := .depth }} {{ if reflect.IsMap $s }} {{ with index $s "$ref" }} {{ $url := index $api.schemaURLs . }}
Schema:
{{ if $url }}
{{ strings.TrimPrefix "#/components/schemas/" . }}
{{ else }}
{{ . }}
{{ end }}
Type:
{{ if reflect.IsSlice . }}
{{ delimit . " | " }}
{{ else }}
{{ . }}
{{ end }}
{{ $name }}{{ if in $s.required $name }}
· required
{{ end }}{{ if $v.readOnly }}
· response only
{{ end }}{{ if $v.writeOnly }}· request only{{ end }}
{{ $s | jsonify (dict "indent" " ") }}
{{ if eq $s false }} No value satisfies this schema. {{ else if eq $s true }} Any value satisfies this schema. {{ else }} No schema is declared. {{ end }}
{{ end }}