diff --git a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/nav-store.js b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/nav-store.js
index 096c4572e49..2896c5b5108 100644
--- a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/nav-store.js
+++ b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/nav-store.js
@@ -48,7 +48,6 @@ export function newNavStore(searchConfig, searchStore, params, Alpine) {
return;
}
debug('toggleConsentDialog');
- // TODO1 see https://github.com/linode/linode-docs-theme/issues/954 Cookie Consent Links
window.OneTrust.ToggleInfoDisplay();
event.preventDefault();
},
diff --git a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/svg-viewer.js b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/svg-viewer.js
index 18e3b0e7ba4..3f43ea48c7d 100644
--- a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/svg-viewer.js
+++ b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/svg-viewer.js
@@ -143,7 +143,7 @@ class SvgViewer {
}
export function newSVGViewerController(opts) {
- let { diagramDescriptionID } = opts;
+ let { diagramDescriptionID, svgHref } = opts;
let diagramDescriptionEl = document.getElementById(diagramDescriptionID);
return {
@@ -168,7 +168,7 @@ export function newSVGViewerController(opts) {
this.svgViewer.panDirection(direction);
},
- init: function () {
+ init: async function () {
this.$watch('showModal', (val) => {
debug('showModal', val);
this.svgViewer.reset();
@@ -187,9 +187,13 @@ export function newSVGViewerController(opts) {
}
});
+ let response = await fetch(svgHref);
+ let svgText = await response.text();
+
this.$nextTick(() => {
let container = this.$el;
let svg = this.$el.querySelector('.svg-container');
+ svg.innerHTML = svgText;
if (!isMobile()) {
let bullets = svg.querySelectorAll('.bullet');
diff --git a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/search/search-store.js b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/search/search-store.js
index 4fbbc9e8985..db50ffef9da 100644
--- a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/search/search-store.js
+++ b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/search/search-store.js
@@ -376,11 +376,7 @@ export function newSearchStore(searchConfig, params, Alpine) {
let hitsPerPage = 0;
let q = '';
- // TODO(bep) we have removed the QA section from explorer/search, but the
- // data is still there. The docType filter below can be remove when we have completed the migration.
- let filters =
- sectionConfig.filters ||
- 'NOT docType:community AND NOT docType:products AND NOT docType:api AND NOT docType:Marketplace';
+ let filters = sectionConfig.filters || '';
let facetFilters = [];
let attributesToHighlight = [];
let analyticsTags = [];
diff --git a/_vendor/github.com/linode/linode-docs-theme/assets/json/search_cachewarmer_queries/explorer-blank.json b/_vendor/github.com/linode/linode-docs-theme/assets/json/search_cachewarmer_queries/explorer-blank.json
index 1a1c4d84d12..ef6a98036a0 100644
--- a/_vendor/github.com/linode/linode-docs-theme/assets/json/search_cachewarmer_queries/explorer-blank.json
+++ b/_vendor/github.com/linode/linode-docs-theme/assets/json/search_cachewarmer_queries/explorer-blank.json
@@ -1,6 +1,5 @@
{
"indexName": "linode-merged",
"facets": ["section.*", "docType", "category", "tags"],
- "distinct": 1,
- "filters": "NOT docType:community AND NOT docType:products AND NOT docType:api AND NOT docType:Marketplace"
+ "distinct": 1
}
diff --git a/_vendor/github.com/linode/linode-docs-theme/content/api/testing/index.md b/_vendor/github.com/linode/linode-docs-theme/content/api/testing/index.md
deleted file mode 100644
index c111d1b4466..00000000000
--- a/_vendor/github.com/linode/linode-docs-theme/content/api/testing/index.md
+++ /dev/null
@@ -1,15 +0,0 @@
----
-title: Test API
-noindex: true
-spec: spec.yaml
-_build:
- render: always
- list: never
- publishResources: false
----
-
-A solution should allow designation of required properties in multiple, concurrent schemas.
-
-For example, the below specification should designate the PUT /account Request Body Schema properties `test1`, `test2`, and `test3` as required, with `test3.test1` as optional.
-
-Currently, only the `required` array from `ExampleOne` is applied, and it is applied to all Request Body Schema properties, resulting in `ExampleThree.test3.test1` designated as required as well. Ideally, each `required` arrays would apply to the relevant component's properties.
diff --git a/_vendor/github.com/linode/linode-docs-theme/content/api/testing/spec.yaml b/_vendor/github.com/linode/linode-docs-theme/content/api/testing/spec.yaml
deleted file mode 100644
index 4254d288b27..00000000000
--- a/_vendor/github.com/linode/linode-docs-theme/content/api/testing/spec.yaml
+++ /dev/null
@@ -1,126 +0,0 @@
-openapi: 3.0.1
-info:
- version: 1.0.0
- title: Linode API
- description: |
- Test API schema
-servers:
- - url: https://api.linode.com/v4
-tags:
- - name: Account
- description: Test tag
-paths:
- /account:
- post:
- tags:
- - Account
- summary: Test Endpoint
- description: This is only a test
- requestBody:
- content:
- application/json:
- schema:
- properties:
- skip_ipv6_rdns:
- type: boolean
- default: false
- test:
- type: array
- description: Example array. Items should follow.
- items:
- $ref: "#/components/schemas/ExampleOne"
- testinterfaces:
- $ref: "#/components/schemas/TestConfigInterfaces"
- responses:
- "200":
- description: Success!
- content:
- application/json:
- schema:
- properties:
- testinterfaces:
- $ref: "#/components/schemas/TestConfigInterfaces"
-components:
- schemas:
- ExampleOne:
- allOf:
- - $ref: "#/components/schemas/ExampleTwo"
- - type: object
- description: Example 1 Object
- properties:
- test1:
- type: string
- description: test 1
- ExampleTwo:
- description: Example 2 Object
- properties:
- test2:
- type: string
- description: test 2
- TestConfigInterface:
- type: object
- description: >
- The Network Interface.
- properties:
- id:
- readOnly: true
- type: integer
- description: The unique ID representing this interface.
- example: 101
- x-linode-cli-display: 1
- label:
- type: string
- minLength: 1
- maxLength: 64
- pattern: "[a-zA-Z0-9-]+"
- x-linode-filterable: true
- nullable: true
- description: |
- The name of this interface.
- x-linode-cli-display: 2
- ipam_address:
- type: string
- format: ip/netmask
- nullable: true
- description: |
- This Network Interface's private IP address in Classless Inter-Domain Routing (CIDR) notation.
- example: "10.0.0.1/24"
- purpose:
- type: string
- enum:
- - public
- - vlan
- description: |
- The type of interface.
- example: vlan
- x-linode-cli-display: 3
- TestConfigInterfaces:
- type: array
- items:
- $ref: "#/components/schemas/TestConfigInterface"
- minItems: 1
- maxItems: 3
- uniqueItems: true
- required:
- - purpose
- description: |
- An array of Network Interfaces to add to this Linode's Configuration Profile.
- example:
- - {
- "id": 101,
- "purpose": "public",
- "ipam_address": null,
- "label": null,
- }
- - {
- "id": 102,
- "purpose": "vlan",
- "ipam_address": "10.0.0.1/24",
- "label": "vlan-1",
- }
- - {
- "id": 103,
- "purpose": "vlan",
- "ipam_address": "10.0.0.2/24",
- "label": "vlan-2",
- }
diff --git a/_vendor/github.com/linode/linode-docs-theme/layouts/_default/section.json b/_vendor/github.com/linode/linode-docs-theme/layouts/_default/section.json
new file mode 100644
index 00000000000..3da0646c805
--- /dev/null
+++ b/_vendor/github.com/linode/linode-docs-theme/layouts/_default/section.json
@@ -0,0 +1,2 @@
+{{/* Deliberately empty. */}}
+{}
\ No newline at end of file
diff --git a/_vendor/github.com/linode/linode-docs-theme/layouts/api/__common.html b/_vendor/github.com/linode/linode-docs-theme/layouts/api/__common.html
deleted file mode 100644
index 67b27c4fa2a..00000000000
--- a/_vendor/github.com/linode/linode-docs-theme/layouts/api/__common.html
+++ /dev/null
@@ -1,796 +0,0 @@
-This template includes common API logic and functions.
-{{ define "partials/openapi3/get" }}
- {{ $api := "" }}
- {{ $spec := .Params.spec }}
- {{ if $spec }}
- {{ $api = .Resources.GetMatch $spec }}
- {{ else }}
- {{ $apiPath := "api/openapi.yaml" }}
- {{ $api = resources.Get $apiPath }}
- {{ end }}
- {{ if not $api }}
- {{ errorf "spec not found" }}
- {{ else }}
- {{ $api = $api | openapi3.Unmarshal }}
- {{ end }}
- {{ return $api }}
-{{ end }}
-
-{{/* kin-openapi (the openAPI library Hugo uses) changed changed some types from map to a struct with a Map accessor. This was introduced in Hugo 0.121.0 */}}
-{{ define "partials/openapi3/to-map" }}
- {{ $map := . }}
- {{ if gt hugo.Version "0.120.4" }}
- {{ $map = $map.Map }}
- {{ end }}
- {{ return $map }}
-{{ end }}
-
-{{ define "partials/openapi3/get-resource" }}
- {{ $apiPath := "api/openapi.yaml" }}
- {{ return (resources.Get $apiPath) }}
-{{ end }}
-
-{{ define "partials/openapi3/get-tags-title-op" }}
- {{ $title := "" }}
- {{ with .Tags }}
- {{ $title = index . 0 }}
- {{ end }}
- {{ return $title }}
-{{ end }}
-
-{{ define "openapi3/print-title" }}
- {{ $anchor := "" }}
- {{ if or (eq .level 2) (eq .level 3) }}
- {{ $ariaLabel := printf "%s: %s" .section .title }}
- {{ $anchor = printf "" .id $ariaLabel }}
- {{ end }}
- {{ printf "%s%s" .level .id .title $anchor .level | safeHTML }}
-{{ end }}
-
-{{ define "partials/openapi3/algolia-operation-content-plain" }}
- {{- $m := partial "openapi3/algolia-operation-content" . -}}
- {{- $s := newScratch -}}
- {{- range $k, $v := $m -}}
- {{- if reflect.IsSlice $v -}}
- {{ printf "%s: " $k }}
- {{- range $v -}}
- {{- printf " %s" (. | plainify) -}}
- {{- end -}}
- {{- else -}}
- {{- $v | plainify -}}
- {{- end -}}
- {{- end -}}
-{{ end }}
-
-{{ define "partials/openapi3/algolia-operation-content" }}
- {{ $ctx := .Values }}
- {{ $api := $ctx.api }}
- {{ $p := $ctx.page }}
- {{ $dot := $ctx.dot }}
- {{ $op := $dot.o }}
- {{ $result := newScratch }}
- {{ with $op }}
- {{ with .RequestBody }}
- {{ with .Value }}
- {{ with index .Content "application/json" }}
- {{ with .Schema }}
- {{ $.Set "dot" . }}
- {{ $.Set "hideReadOnly" true }}
- {{ $items := partial "openapi3/schema-to-plain-slice" $ }}
- {{ $result.Set "Request Body" $items }}
- {{ $.Set "hideReadOnly" false }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{/* We currently don't add the response body to the content/text field. See issue #795. */}}
- {{ end }}
- {{ return $result.Values }}
-{{ end }}
-
-{{ define "openapi3/print-operation" }}
- {{ $ctx := .Values }}
- {{ $api := $ctx.api }}
- {{ $p := $ctx.page }}
- {{ $dot := $ctx.dot }}
- {{ $httpMethod := $dot.m | upper }}
- {{ $path := $ctx.path }}
- {{ $pathKey := $ctx.pathKey }}
- {{ $op := $dot.o }}
- {{ $server := index $api.Servers 0 }}
- {{ $url := printf "%s%s" $server.URL $pathKey }}
- {{ $section := $p.LinkTitle }}
-
- {{ with $op }}
- {{ $action := .Summary | anchorize }}
- {{ $.Set "action" $action }}
- {{ with $op.Servers }}
- {{ $server = index . 0 }}
- {{ $url = printf "%s%s" $server.URL $pathKey }}
- {{ end }}
- {{ $isBeta := strings.Contains $url "beta/" }}
-
- {{ template "openapi3/print-title" (dict "level" 2 "section" $section "title" .Summary "id" (.Summary | anchorize) ) }}
-
-
-
- {{ $httpMethod }}
-
- {{ $url }}
-
- {{ if $isBeta }}
-
- Beta
-
- {{ end }}
-
-
- {{ .Description | $p.RenderString }}
-
-
- {{/* Authorizations */}}
- {{ template "openapi3/print-title" (dict "level" 3 "section" $section "title" "Authorizations" "id" (printf "%s__authorizations" $action ) ) }}
-
- {{ $.Set "dot" .Security }}
- {{ template "openapi3/print-security" $ }}
-
- {{/* Path parameters */}}
- {{ with $path.Parameters }}
- {{ template "openapi3/print-title" (dict "level" 3 "section" $section "title" "Path Parameters" "id" (printf "%s__path-parameters" $action ) ) }}
-
- {{ range . }}
- {{ $param := .Value }}
- {{ $schema := $param.Schema.Value }}
- {{ if eq $param.In "path" }}
-
- |
- {{ $param.Name }}
- |
-
- {{ template "openapi3/print-type-info" $schema }}
- {{ if $param.Required }}
- Required
- {{ end }}
- {{ with $param.Description }}
-
- {{ . | $p.RenderString }}
-
- {{ end }}
- |
-
- {{ end }}
- {{ end }}
-
- {{ end }}
-
- {{/* Optional parameters. */}}
- {{ with .Parameters }}
- {{ template "openapi3/print-title" (dict "level" 3 "section" $section "title" "Query Parameters" "id" ( printf "%s__query-parameters" $action ) ) }}
- {{ $.Set "dot" . }}
- {{ template "openapi3/print-parameters" $ }}
- {{ end }}
-
- {{/* Code samples */}}
- {{ if gt hugo.Version "0.111.3" }}
- {{/* Hugo 0.112.0 updated kin-openapi, which had a breaking change: */}}
- {{/* - the ExtensionProps is now just a map. */}}
- {{/* - the code samples are now just strings, not raw JSON. */}}
- {{ with .Extensions }}
- {{ with index . "x-code-samples" }}
- {{ template "openapi3/print-title" (dict "level" 3 "section" $section "title" "Request Samples" "id" (printf "%s__request-samples" $action ) ) }}
- {{ $samplesTabs := slice }}
- {{ range . }}
- {{ $samplesTabs = $samplesTabs | append (dict "title" .lang "lang" .lang "body" .source) }}
- {{ end }}
- {{ $.Set "dot" $samplesTabs }}
- {{ template "openapi3/component-tabs" $ }}
- {{ end }}
- {{ end }}
- {{ else }}
- {{ with .ExtensionProps.Extensions }}
- {{ with index . "x-code-samples" }}
- {{ template "openapi3/print-title" (dict "level" 3 "section" $section "title" "Request Samples" "id" (printf "%s__request-samples" $action ) ) }}
- {{ $samples := . | transform.Unmarshal }}
- {{ $samplesTabs := slice }}
- {{ range $samples }}
- {{ $samplesTabs = $samplesTabs | append (dict "title" .lang "lang" .lang "body" .source) }}
- {{ end }}
- {{ $.Set "dot" $samplesTabs }}
- {{ template "openapi3/component-tabs" $ }}
- {{ end }}
- {{ end }}
- {{ end }}
-
- {{/* Optional Request body */}}
- {{ with .RequestBody }}
- {{ with .Value }}
- {{ with index .Content "application/json" }}
- {{ with .Schema }}
- {{ template "openapi3/print-title" (dict "level" 3 "section" $section "title" "Request Body Schema" "id" ( printf "%s__request-body-schema" $action ) ) }}
- {{ $.Set "dot" . }}
- {{ $.Set "hideReadOnly" true }}
- {{ partial "openapi3/print-schema" $ }}
- {{ $.Set "hideReadOnly" false }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ end }}
-
- {{/* Responses */}}
- {{ with .Responses }}
- {{ template "openapi3/print-title" (dict "level" 3 "section" $section "title" "Response Samples" "id" (printf "%s__response-samples" $action) ) }}
- {{ $responseTabs := slice }}
- {{ range $k, $v := (partial "openapi3/to-map" .) }}
- {{ $.Set "dot" . }}
- {{ $.Set "title" $k }}
- {{ $responseTabs = $responseTabs | append (partial "openapi3/get-response-examples" $) }}
- {{ end }}
- {{ $.Set "dot" $responseTabs }}
- {{ template "openapi3/component-tabs" $ }}
- {{ template "openapi3/print-title" (dict "level" 3 "section" $section "title" "Responses" "id" (printf "%s__responses" $action) ) }}
- {{ $responseBodySchemaTabs := slice }}
- {{ range $k, $v := (partial "openapi3/to-map" .) }}
- {{ $.Set "dot" .Value }}
- {{ $.Set "title" $k }}
- {{ $responseBodySchemaTabs = $responseBodySchemaTabs | append (partial "openapi3/print-response" $) }}
- {{ end }}
- {{ $.Set "dot" $responseBodySchemaTabs }}
- {{ $.Set "nocode" true }}
- {{ template "openapi3/component-tabs" $ }}
- {{ end }}
- {{ end }}
- {{/* /openapi3/print-operation */}}
-{{ end }}
-
-{{ define "openapi3/print-security" }}
- {{ with .Values.dot }}
-
- {{ range . }}
-
- {{ range $k, $v := . }}
- |
- {{ $k }}
- |
-
- {{ delimit $v "," }}
- |
- {{ end }}
-
- {{ end }}
-
- {{ end }}
-{{ end }}
-
-{{ define "partials/openapi3/schema-to-plain-slice" }}
- {{ $items := slice }}
- {{- $ctx := .Values -}}
- {{ $s := $ctx.dot }}
- {{ $p := $ctx.page }}
- {{ $.Set "oneOfPickFirst" false }}
- {{ $required := newScratch }}
- {{ partial "openapi3/schema-to-map-collect-required" (dict "dollar" $required "dot" $s.Value ) }}
- {{ $.Set "requiredMap" $required.Values }}
- {{ $m := (partial "openapi3/schema-to-map" (dict "dollar" $ )) }}
- {{ range $k, $v := $m.Properties }}
- {{ $items = $items | append (printf "%s: %s" $k ( $v.Description | plainify)) }}
- {{ end }}
- {{ if not $m.Properties }}
- {{ $items = $items | append ( $m.Description | plainify ) }}
- {{ end }}
- {{ return $items }}
-{{ end }}
-
-{{ define "partials/openapi3/print-schema" }}
- {{ $ctx := .Values }}
- {{ $s := $ctx.dot }}
- {{ $p := $ctx.page }}
-
- {{ $.Set "oneOfPickFirst" false }}
- {{ $required := newScratch }}
- {{ partial "openapi3/schema-to-map-collect-required" (dict "dollar" $required "dot" $s.Value ) }}
- {{/* warnf "%v" (debug.Dump $required.Values ) */}}
- {{ $.Set "requiredMap" $required.Values }}
- {{ $m := (partial "openapi3/schema-to-map" (dict "dollar" $ )) }}
-
- {{ if not $m.Properties }}
-
- {{ $m.Description | $p.RenderString }}
-
- {{ end }}
-
- {{ $.Set "dot" $m }}
- {{ template "openapi3/print-schema-property" $ }}
-{{ end }}
-
-{{ define "openapi3/schema-set-values-in-map" }}
- {{ $m := .m }}
- {{ $s := .s }}
- {{ with $s.Nullable }}
- {{ $m.Set "Nullable" . }}
- {{ end }}
- {{ with $s.ReadOnly }}
- {{ $m.Set "ReadOnly" . }}
- {{ end }}
- {{ with $s.Description }}
- {{ $m.Set "Description" . }}
- {{ end }}
- {{ $m.Set "Default" $s.Default }}
- {{ with $s.Enum }}
- {{ $m.Set "Enum" . }}
- {{ end }}
- {{ $m.Set "Example" $s.Example }}
- {{ with $s.Format }}
- {{ $m.Set "Format" . }}
- {{ end }}
- {{ with $s.Type }}
- {{ $m.Set "Type" . }}
- {{ end }}
- {{ with $s.Min }}
- {{ $m.Set "Min" . }}
- {{ end }}
- {{ with $s.Max }}
- {{ $m.Set "Max" . }}
- {{ end }}
- {{ with $s.MinLength }}
- {{ $m.Set "MinLength" . }}
- {{ end }}
- {{ with $s.MaxLength }}
- {{ $m.Set "MaxLength" . }}
- {{ end }}
- {{ $ext := $s.Extensions }}
- {{ with (index $ext "deprecated") }}
- {{ $deprecated := eq (printf "%s" .) "true" }}
- {{ $m.Set "Deprecated" $deprecated }}
- {{ end }}
- {{ with (index $ext "x-linode-filterable") }}
- {{ $filterable := eq (printf "%s" .) "true" }}
- {{ $m.Set "Filterable" $filterable }}
- {{ end }}
- {{ with (index $ext "x-linode-ref-meta") }}
- {{ $meta := . | transform.Unmarshal }}
- {{ $m.Set "RefMetaMap" $meta }}
- {{ end }}
-{{ end }}
-
-{{ define "partials/openapi3/schema-to-map-collect-required" }}
- {{ $dollar := .dollar }}
- {{ $ctx := $dollar.Values }}
- {{ $s := .dot }}
- {{ $path := .path | default "" }}
-
- {{ range $s.AllOf }}
- {{ partial "openapi3/schema-to-map-collect-required" (dict "dollar" $dollar "path" $path "dot" .Value ) }}
- {{ end }}
- {{ range $i, $e := $s.OneOf }}
- {{ partial "openapi3/schema-to-map-collect-required" (dict "dollar" $dollar "path" $path "ordinal" (add $i 1) "dot" .Value ) }}
- {{ end }}
-
- {{ $props := $s.Properties }}
- {{ if eq $s.Type "array" }}
- {{ $props = $s.Items.Value.Properties }}
- {{ end }}
-
- {{ range $k, $v := $props }}
- {{ $ppath := path.Join $path $k }}
- {{ partial "openapi3/schema-to-map-collect-required" (dict "dollar" $dollar "path" $ppath "dot" $v.Value) }}
- {{ end }}
-
- {{ $requiredKey := path.Join "required" $path }}
- {{ if $.ordinal }}
- {{ $requiredKey = printf "%s-%d" $requiredKey $.ordinal }}
- {{ end }}
- {{ $required := $dollar.Get $requiredKey | default slice }}
- {{ $required = $required | union $s.Required }}
- {{ with $required }}
- {{ $dollar.Set $requiredKey . }}
- {{ end }}
-
- {{ return "" }}
-{{ end }}
-
-{{ define "partials/openapi3/schema-to-map" }}
- {{ $dollar := .dollar }}
- {{ $path := .path | default "" }}
- {{ $parent := .parent }}
- {{ $ctx := $dollar.Values }}
- {{ $requiredMap := $ctx.requiredMap }}
- {{ $p := $ctx.page }}
- {{ $s := $ctx.dot.Value }}
-
- {{ $m := newScratch }}
- {{ $ref := $ctx.dot.Ref }}
- {{ $m.Set "Ref" $ref }}
- {{ $refMetaMap := $ctx.refMetaMap | default dict }}
- {{ $refMeta := index $refMetaMap $ref | default (dict "name" ($ref | strings.TrimPrefix "#/components/schemas/")) }}
- {{ $m.Set "RefMeta" $refMeta }}
-
- {{ if and .isProperty $requiredMap }}
- {{ $name := (path.Base $path) }}
- {{ $base := (path.Dir $path) }}
- {{ $requiredKey := (path.Join "required" $base) }}
- {{ if $.ordinal }}
- {{ $requiredKey = printf "%s-%d" $requiredKey $.ordinal }}
- {{ end }}
-
- {{ $required := index $requiredMap $requiredKey }}
- {{ $m.Set "IsRequired" (in $required $name) }}
- {{ end }}
-
- {{ template "openapi3/schema-set-values-in-map" (dict "m" $m "s" $s ) }}
- {{ with $m.Get "RefMetaMap" }}
- {{ $dollar.Set "refMetaMap" . }}
- {{ end }}
- {{ $props := $s.Properties }}
- {{ if eq $s.Type "array" }}
- {{ $arrschema := $s.Items.Value }}
- {{ $props = $arrschema.Properties }}
- {{ $m.Set "ValueType" $arrschema.Type }}
- {{ range $arrschema.AllOf }}
- {{ range $k, $v := .Value.Properties }}
- {{ $dollar.Set "dot" $v }}
- {{ $m.SetInMap "Properties" $k (partial "openapi3/schema-to-map" (dict "dollar" $dollar "path" (path.Join $path $k) "isProperty" true "ordinal" $.ordinal)) }}
- {{ end }}
- {{ end }}
- {{ end }}
-
- {{ range $k, $v := $props }}
- {{ $dollar.Set "dot" $v }}
- {{ $m.SetInMap "Properties" $k (partial "openapi3/schema-to-map" (dict "dollar" $dollar "path" (path.Join $path $k) "isProperty" true "ordinal" $.ordinal)) }}
- {{ end }}
- {{ $values := $m.Values }}
- {{ range $s.AllOf }}
- {{ $dollar.Set "dot" . }}
- {{ $nested := (partial "openapi3/schema-to-map" (dict "dollar" $dollar "path" $path)) }}
- {{ $values = merge $nested $values }}
- {{ end }}
- {{ if $s.OneOf }}
- {{ if $ctx.oneOfPickFirst }}
- {{ $dollar.Set "dot" (index $s.OneOf 0) }}
- {{ $values = partial "openapi3/schema-to-map" (dict "dollar" $dollar "path" $path) }}
- {{ else }}
- {{/* Make this schema into a slice that can be toggled by the user. */}}
- {{ $slice := slice }}
-
- {{ range $i, $e := $s.OneOf }}
- {{ $dollar.Set "dot" . }}
- {{ $slice = $slice | append (partial "openapi3/schema-to-map" (dict "dollar" $dollar "path" $path "ordinal" (add $i 1))) }}
- {{ end }}
- {{ $values = $slice }}
- {{ end }}
- {{ end }}
- {{ return $values }}
-{{ end }}
-
-{{ define "openapi3/print-type-info" }}
- {{ $valueType := "" }}
- {{ if reflect.IsMap . }}
- {{ $valueType = .ValueType }}
- {{ end }}
- {{ .Type }}{{ if eq .Type "array" }}
- {{ with $valueType }}of {{ . }}s{{ end }}
- {{ end }}{{ with .Format }}<{{ . }}>{{ end }}
- {{ if .Min }}
- {{ if not .Max }}
- >=
- {{ .Min }}
- {{ else }}
- {{ .Min }}..{{ .Max }}
- {{ end }}
- {{ end }}
-
- {{ if or .MinLength .MaxLength }}
- {{ if not .MinLength }}
- <=
- {{ .MaxLength }}
- {{ else }}
- {{ .MinLength }}..{{ .MaxLength }}
- {{ end }}
- characters
- {{ end }}
-
-
-
- {{ with .Enum }}
- Enum:
- {{ range . }}
- {{ . }}
- {{ end }}
-
- {{ end }}
-
- {{ if or .Default (eq .Default false) }}
- Default:
- {{ .Default }}
- {{ end }}
-
-{{ end }}
-
-{{ define "openapi3/print-parameters" }}
- {{ $ctx := .Values }}
- {{ $p := $ctx.page }}
- {{ $parameters := $ctx.dot }}
-
- {{ range $parameters }}
- {{ $param := .Value }}
-
- |
- {{ $param.Name }}
- |
-
- {{ $s := $param.Schema.Value }}
-
- - Type:
- -
- {{ template "openapi3/print-type-info" $s }}
-
- - Default:
- -
- {{ $s.Default }}
-
-
-
- {{ with $param.Description }}
-
- {{ . | $p.RenderString }}
-
- {{ end }}
- |
-
- {{ end }}
-
-{{ end }}
-
-{{ define "openapi3/print-schema-property" }}
- {{ $ctx := .Values }}
- {{ $s := $ctx.dot }}
-
- {{ with $s.Properties }}
- {{ $.Set "dot" . }}
- {{ template "openapi3/print-schema-properties" $ }}
- {{ end }}
-{{ end }}
-
-{{ define "openapi3/print-schema-properties" }}
- {{ $ctx := .Values }}
- {{ $p := $ctx.page }}
- {{ $s := $ctx.dot }}
-
- {{ range $k, $v := $s }}
-
- {{ if reflect.IsSlice $v }}
- {{/* This is a oneOf -- allow the user to select. */}}
-
- |
- {{ $oneOfTabs := slice }}
- {{ range $i, $e := $v }}
- {{ $title := .RefMeta.name }}
- {{ $.Set "dot" . }}
- {{ $.Set "k" $k }}
- {{ $tabSource := printf "" (partial "openapi3/print-schema-property-value" $) | safeHTML }}
- {{ $oneOfTabs = $oneOfTabs | append (dict "title" $title "body" $tabSource ) }}
- {{ end }}
- {{ $.Set "dot" $oneOfTabs }}
- {{ $.Set "nocode" true }}
- {{ template "openapi3/component-tabs" $ }}
- |
-
- {{ else }}
- {{ if not (and $ctx.hideReadOnly $v.ReadOnly) }}
- {{ $.Set "dot" $v }}
- {{ $.Set "k" $k }}
- {{ partial "openapi3/print-schema-property-value" $ }}
- {{ end }}
- {{ end }}
- {{ end }}
-
-{{ end }}
-
-{{ define "partials/openapi3/print-schema-property-value" }}
- {{ $ctx := .Values }}
- {{ $p := $ctx.page }}
- {{ $s := $ctx.dot }}
- {{ $k := $ctx.k }}
-
-
-
-
- {{ $k }}
-
- {{ if $s.Filterable }}
- Filterable
- {{ end }}
- {{ if $s.Nullable }}
- Nullable
- {{ end }}
- {{ if $s.IsRequired }}
- Required
- {{ end }}
-
- |
-
- {{ template "openapi3/print-type-info" $s }}
- {{ with $s.Description }}
-
- {{ . | $p.RenderString }}
-
- {{ end }}
- {{ if $s.Deprecated }}
-
- Deprecated
-
- {{ end }}
- {{ with $s.Properties }}
- {{ $.Set "dot" . }}
- {{ template "openapi3/print-schema-properties" $ }}
- {{ end }}
- |
-
-{{ end }}
-
-{{ define "partials/openapi3/get-response-example-property" }}
- {{ $result := .Example }}
- {{ $isSet := and ($result) (eq .Type "array") }}
- {{ if not $isSet }}
- {{ with .Properties }}
- {{ $result = partial "openapi3/get-response-example-properties" . }}
- {{ end }}
- {{ end }}
- {{ return $result }}
-{{ end }}
-
-{{ define "partials/openapi3/get-response-example-properties" }}
- {{ $m := newScratch }}
- {{ range $k, $v := . }}
- {{ $res := (partial "openapi3/get-response-example-property" $v) }}
- {{ if and (eq $v.Type "array") (not (reflect.IsSlice $res)) }}
- {{ $res = slice $res }}
- {{ end }}
- {{ $m.Set $k $res }}
- {{ end }}
- {{ return $m.Values }}
-{{ end }}
-
-{{ define "partials/openapi3/get-response-examples" }}
- {{ $ctx := .Values }}
- {{ $p := $ctx.page }}
- {{ $s := $ctx.dot }}
- {{ $result := "" }}
- {{ $response := newScratch }}
- {{ $response.Set "title" $ctx.title }}
- {{ $content := index $s.Value.Content "application/json" }}
- {{ if $content }}
- {{ $.Set "dot" $content.Schema }}
- {{ $.Set "oneOfPickFirst" true }}
- {{ $schema := partial "openapi3/schema-to-map" (dict "dollar" $) }}
- {{ $body := "{}" }}
- {{ with $schema.Example }}
- {{ $body = . | jsonify (dict "indent" " " "noHTMLEscape" true) }}
- {{ else }}
- {{ $properties := $schema.Properties }}
- {{ with $properties }}
- {{ $v := partial "openapi3/get-response-example-properties" $properties }}
- {{ $body = $v | jsonify (dict "indent" " " "noHTMLEscape" true) }}
- {{ end }}
- {{ end }}
- {{ $response.Set "body" $body }}
- {{ end }}
- {{ return $response.Values }}
-{{ end }}
-
-{{ define "partials/openapi3/print-response" }}
- {{ $ctx := .Values }}
- {{ $p := $ctx.page }}
- {{ $s := $ctx.dot }}
- {{ $response := newScratch }}
- {{ $response.Set "title" $ctx.title }}
- {{ $response.Set "title2" ($s.Description | string) }}
- {{ $content := index $s.Content "application/json" }}
- {{ if $content }}
- {{ $schema := $content.Schema }}
- {{ $.Set "dot" $schema }}
- {{ $body := (partial "openapi3/print-schema" $) }}
- {{ $response.Set "body" $body }}
- {{ end }}
- {{ return $response.Values }}
-{{ end }}
-
-{{ define "openapi3/component-tabs" }}
- {{ $ctx := .Values }}
- {{ $dot := $ctx.dot }}
-
-
-
-{{ end }}
-
-{{ define "debug" }}
- {{ if . }}
-
- {{ warnf "DEBUG: REMOVE THE CALLER: %T" . }}
- debug
- {{- highlight (. | debug.Dump) "go" "linenos=false" -}}
-
- {{ end }}
-{{ end }}
-
-{{ define "debugonce" }}
- {{ if . }}
- {{ if not (.page.Scratch.Get "debugged") }}
- {{ .page.Scratch.Set "debugged" true }}
- Debug
-
- {{ warnf "DEBUG: REMOVE THE CALLER: %T" .dump }}
- debug
- {{- highlight (.dump | debug.Dump) "go" "linenos=false" -}}
-
- {{ end }}
- {{ end }}
-{{ end }}
diff --git a/_vendor/github.com/linode/linode-docs-theme/layouts/api/list.html b/_vendor/github.com/linode/linode-docs-theme/layouts/api/list.html
deleted file mode 100644
index edde644ac6d..00000000000
--- a/_vendor/github.com/linode/linode-docs-theme/layouts/api/list.html
+++ /dev/null
@@ -1,21 +0,0 @@
-{{ define "_baseof_start" }}
- {{- .Page.Store.Set "_baseof_main_layout" "content_toc" -}}
-{{ end }}
-
-{{ define "content_main" }}
- {{ $api := partial "openapi3/get" . }}
- {{ $p := . }}
-
- {{ $info := $api.Info }}
-
- {{ $info.Title }}
-
- v{{ $info.Version }}
-
-
- {{ $apiResource := partial "openapi3/get-resource" . }}
- {{/* Make sure it gets published. */}}
- {{ $tmp := $apiResource.RelPermalink }}
- {{ $info.Description | .RenderString }}
-
-{{ end }}
diff --git a/_vendor/github.com/linode/linode-docs-theme/layouts/api/list.json b/_vendor/github.com/linode/linode-docs-theme/layouts/api/list.json
deleted file mode 100644
index c36ac8b5d72..00000000000
--- a/_vendor/github.com/linode/linode-docs-theme/layouts/api/list.json
+++ /dev/null
@@ -1,2 +0,0 @@
-{{ $index := partialCached "sections/search/get-search-data-api.html" . }}
-{{- $index | jsonify (dict "indent" " ") -}}
\ No newline at end of file
diff --git a/_vendor/github.com/linode/linode-docs-theme/layouts/api/single.html b/_vendor/github.com/linode/linode-docs-theme/layouts/api/single.html
deleted file mode 100644
index 003a11864f1..00000000000
--- a/_vendor/github.com/linode/linode-docs-theme/layouts/api/single.html
+++ /dev/null
@@ -1,48 +0,0 @@
-{{ define "_baseof_start" }}
- {{- .Page.Store.Set "_baseof_main_layout" "content_toc" -}}
-{{ end }}
-
-{{ define "content_main" }}
- {{/* See https://godoc.org/github.com/getkin/kin-openapi/openapi3#Swagger */}}
- {{ $api := partial "openapi3/get" . }}
- {{ $p := . }}
- {{/* A test page */}}
- {{ $spec := .Params.spec }}
- {{ $slug := .Slug }}
-
-
- {{ .Title }}
-
- v{{ $api.Info.Version }}
-
-
- {{ if $spec }}
- {{ $specr := .Resources.GetMatch $spec }}
- Download Spec Test File:
-
spec.yaml.
- {{ .Content }}
- {{ end }}
- {{ $paths := partial "openapi3/to-map" $api.Paths }}
- {{ range $k, $v := $paths }}
- {{ $parts := split $k "/" }}
- {{ $root := (index $parts 1) }}
- {{ $ops := slice (dict "o" $v.Connect "m" "Connect") (dict "o" $v.Delete "m" "Delete") (dict "o" $v.Get "m" "Get") }}
- {{ $ops = $ops | append (dict "o" $v.Patch "m" "Patch") (dict "o" $v.Post "m" "Post") (dict "o" $v.Put "m" "Put") (dict "o" $v.Trace "m" "Trace") }}
- {{ range $ops }}
- {{ if .o }}
- {{ $tag := partial "openapi3/get-tags-title-op" .o }}
- {{ if or $spec (eq ($tag|anchorize) $slug) }}
- {{ $ctx := newScratch }}
- {{ $ctx.Set "dot" . }}
- {{ $ctx.Set "page" $ }}
- {{ $ctx.Set "pathKey" $k }}
- {{ $ctx.Set "path" $v }}
- {{ $ctx.Set "api" $api }}
- {{ template "openapi3/print-operation" $ctx }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ end }}
-
-{{ end }}
diff --git a/_vendor/github.com/linode/linode-docs-theme/layouts/partials/components/render-svg.html b/_vendor/github.com/linode/linode-docs-theme/layouts/partials/components/render-svg.html
index 6328d8c533c..def4443ae7f 100644
--- a/_vendor/github.com/linode/linode-docs-theme/layouts/partials/components/render-svg.html
+++ b/_vendor/github.com/linode/linode-docs-theme/layouts/partials/components/render-svg.html
@@ -33,7 +33,7 @@
@@ -70,9 +70,7 @@
-
- {{ .image.Content | safeHTML }}
-
+