{{/* Apache Polaris custom redoc shortcode that takes just the file of the OpenAPI spec YAML and loads either the in-development version from the `main` branch or a released version from the corresponding Git tag. This is a copy of the original Docsy redoc shortcode, except the part to calculate the URL is adopted for Polaris in-dev/releases docs. Copied from Docsy shortcodes/redoc.html. */}} {{- $spec := .Get 0 -}} {{- $otheroptions := .Get 1 -}} {{- $url := "" -}} {{- $ver := partial "releaseVersion.html" . -}} {{- $spec := ( .Get 0 ) -}} {{- $url := "" -}} {{- if eq $ver "[unreleased]" -}} {{- $url = printf "https://raw.githubusercontent.com/apache/polaris/refs/heads/main/spec/%s" $spec }} {{- else -}} {{- $url = printf "https://raw.githubusercontent.com/apache/polaris/refs/tags/polaris-%s/spec/%s" $ver $spec }} {{- end -}}