{{ $api := site.Data.docs.api }} {{ $endpoints := $api.endpoints }} {{ $colors := dict "GET" "text-green-500" "POST" "text-indigo-400" }}
{{ range $path, $info := $endpoints }} {{ range $method, $v := $info }} {{ $color := index $colors $method }} {{ $id := printf "%s %s" $method $path | urlize | replaceRE "/" "" }}

{{- $method -}} {{- $path -}}

{{ with $v.description }}
{{ . | markdownify }}
{{ end }} {{ with $v.responses }}

Responses

Code
Description
{{ range $code, $v := . }}
{{ $code }}
{{ $v.description | markdownify }}
{{ end }}
{{ end }}
{{ end }} {{ end }}