File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<!DOCTYPE html>
22< html lang ="en ">
3-
43< head >
4+ {{ $specURL := urls.Parse (printf "/%s%s.yaml" .File.Dir .File.ContentBaseName) }}
55 < title > {{ .Title }}</ title >
66 <!-- needed for adaptive design -->
77 < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
88 < meta name ="description " content ="{{ .Description }} " />
99 < meta charset ="utf-8 " />
1010 <!-- favicon -->
1111 < link rel ="shortcut icon " href ="/assets/images/favicon.svg " type ="image/svg ">
12+ <!--
13+ Provide a link to the swagger / OpenAPI spec itself. We're currently using
14+ Swagger (OpenAPI v2) for some, so use a more generic "application/yaml" type.
15+
16+ Once all our specs are updated to OpenAPI v3, we can change this to "application/vnd.oai.openapi"
17+ -->
18+ < link rel ="alternate " href ="{{ $specURL.String | absURL }} " type ="application/yaml " title ="{{ .Title }} (Swagger/OpenAPI) " />
1219 < style >
1320 body {
1421 margin : 0 ;
4956</ head >
5057
5158< body >
52- {{ $specURL := urls.Parse (printf "/%s%s.yaml" .File.Dir .File.ContentBaseName) }}
59+ < noscript >
60+ < p >
61+ This page is rendered with JavaScript.< br >
62+ < a target ="_blank " href ="{{ $specURL.String | absURL }} " rel ="noreferrer "> Download {{ .Title }} Swagger/OpenAPI specification</ a >
63+ </ p >
64+ </ noscript >
5365 {{ if or (strings.HasPrefix .RelPermalink "/reference/api/hub/") (strings.HasPrefix .RelPermalink "/reference/api/registry/") }}
5466 < redoc spec-url ="{{ $specURL.String }} " suppress-warnings ="true " lazy-rendering > </ redoc >
5567 {{ else }}
You can’t perform that action at this time.
0 commit comments