diff --git a/oas/v2.0.html b/oas/v2.0.html index 32d98f370c..7b8d71bad8 100644 --- a/oas/v2.0.html +++ b/oas/v2.0.html @@ -1,6 +1,6 @@ <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> -<meta name="generator" content="ReSpec 35.2.2"> +<meta name="generator" content="ReSpec 35.3.0"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <style> dfn{cursor:pointer} @@ -22,11 +22,24 @@ .dfn-panel li{margin-left:1em} .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto} </style> + + + + +<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> + +<script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'UA-831873-42'); +</script> + + <title>OpenAPI Specification v2.0</title> <meta name="description" content="The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs."> + <meta name="color-scheme" content="light dark"> -<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script> -<script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=G-JR4K3ZJLPH&l=dataLayer&cx=c&gtm=457e5350za200&tag_exp=102015666~102067808~102482433~102539968~102558064~102587591~102605417~102640600~102717422~102732003~102788824"></script> <style id="respec-mainstyle"> @keyframes pop{ 0%{transform:scale(1,1)} @@ -72,17 +85,25 @@ } </style> -<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> - -<script> - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - gtag('js', new Date()); - gtag('config', 'UA-831873-42'); -</script> - <link rel="canonical" href="https://spec.openapis.org/oas/v2.0.html"> <style> +var:hover{text-decoration:underline;cursor:pointer} +var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)} +@media (prefers-color-scheme:dark){ +var.respec-hl{filter:saturate(.9) brightness(.9)} +} +var.respec-hl-c1{--bg-color:#f4d200} +var.respec-hl-c2{--bg-color:#ff87a2} +var.respec-hl-c3{--bg-color:#96e885} +var.respec-hl-c4{--bg-color:#3eeed2} +var.respec-hl-c5{--bg-color:#eacfb6} +var.respec-hl-c6{--bg-color:#82ddff} +var.respec-hl-c7{--bg-color:#ffbcf2} +@media print{ +var.respec-hl{background:0 0;color:#000;box-shadow:unset} +} +</style> +<style> var{position:relative;cursor:pointer} var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none} var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#222} @@ -176,7 +197,8 @@ "generatedSubtitle": "08 September 2014" }</script> <link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css"> -<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head><body class="h-entry"><div class="head"> +<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head> +<body class="h-entry"><div class="head"> <p class="logos"><a class="logo" href="https://openapis.org/"><img crossorigin="" alt="OpenAPI Initiative" height="48" src="https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png"> </a></p> <h1 id="title" class="title">OpenAPI Specification v2.0 </h1> <h2 id="subtitle" class="subtitle">Version 2.0</h2> @@ -3283,7 +3305,104 @@ <h1 id="title" class="title">OpenAPI Specification v2.0 </h1> <h2 id="subtitle" <ul> <li>Not referenced in this document.</li> </ul> - </div><script id="respec-dfn-panel">(() => { + </div><script id="respec-highlight-vars">(() => { +// @ts-check + +if (document.respec) { + document.respec.ready.then(setupVarHighlighter); +} else { + setupVarHighlighter(); +} + +function setupVarHighlighter() { + document + .querySelectorAll("var") + .forEach(varElem => varElem.addEventListener("click", highlightListener)); +} + +function highlightListener(ev) { + ev.stopPropagation(); + const { target: varElem } = ev; + const hightligtedElems = highlightVars(varElem); + const resetListener = () => { + const hlColor = getHighlightColor(varElem); + hightligtedElems.forEach(el => removeHighlight(el, hlColor)); + [...HL_COLORS.keys()].forEach(key => HL_COLORS.set(key, true)); + }; + if (hightligtedElems.length) { + document.body.addEventListener("click", resetListener, { once: true }); + } +} + +// availability of highlight colors. colors from var.css +const HL_COLORS = new Map([ + ["respec-hl-c1", true], + ["respec-hl-c2", true], + ["respec-hl-c3", true], + ["respec-hl-c4", true], + ["respec-hl-c5", true], + ["respec-hl-c6", true], + ["respec-hl-c7", true], +]); + +function getHighlightColor(target) { + // return current colors if applicable + const { value } = target.classList; + const re = /respec-hl-\w+/; + const activeClass = re.test(value) && value.match(re); + if (activeClass) return activeClass[0]; + + // first color preference + if (HL_COLORS.get("respec-hl-c1") === true) return "respec-hl-c1"; + + // otherwise get some other available color + return [...HL_COLORS.keys()].find(c => HL_COLORS.get(c)) || "respec-hl-c1"; +} + +function highlightVars(varElem) { + const textContent = norm(varElem.textContent); + const parent = varElem.closest(".algorithm, section"); + const highlightColor = getHighlightColor(varElem); + + const varsToHighlight = [...parent.querySelectorAll("var")].filter( + el => + norm(el.textContent) === textContent && + el.closest(".algorithm, section") === parent + ); + + // update availability of highlight color + const colorStatus = varsToHighlight[0].classList.contains("respec-hl"); + HL_COLORS.set(highlightColor, colorStatus); + + // highlight vars + if (colorStatus) { + varsToHighlight.forEach(el => removeHighlight(el, highlightColor)); + return []; + } else { + varsToHighlight.forEach(el => addHighlight(el, highlightColor)); + } + return varsToHighlight; +} + +function removeHighlight(el, highlightColor) { + el.classList.remove("respec-hl", highlightColor); + // clean up empty class attributes so they don't come in export + if (!el.classList.length) el.removeAttribute("class"); +} + +function addHighlight(elem, highlightColor) { + elem.classList.add("respec-hl", highlightColor); +} + +/** + * Same as `norm` from src/core/utils, but our build process doesn't allow + * imports in runtime scripts, so duplicated here. + * @param {string} str + */ +function norm(str) { + return str.trim().replace(/\s+/g, " "); +} +})()</script><script id="respec-dfn-panel">(() => { // @ts-check if (document.respec) { document.respec.ready.then(setupPanel); diff --git a/oas/v3.0.0.html b/oas/v3.0.0.html index 160e732e68..24757d41df 100644 --- a/oas/v3.0.0.html +++ b/oas/v3.0.0.html @@ -1,6 +1,6 @@ <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> -<meta name="generator" content="ReSpec 35.2.2"> +<meta name="generator" content="ReSpec 35.3.0"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <style> dfn{cursor:pointer} @@ -22,11 +22,24 @@ .dfn-panel li{margin-left:1em} .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto} </style> + + + + +<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> + +<script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'UA-831873-42'); +</script> + + <title>OpenAPI Specification v3.0.0</title> <meta name="description" content="The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs."> + <meta name="color-scheme" content="light dark"> -<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script> -<script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=G-JR4K3ZJLPH&l=dataLayer&cx=c&gtm=457e5350za200&tag_exp=102067808~102482433~102539968~102558064~102587591~102605417~102640600~102717422~102732003~102788824"></script> <style id="respec-mainstyle"> @keyframes pop{ 0%{transform:scale(1,1)} @@ -72,17 +85,25 @@ } </style> -<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> - -<script> - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - gtag('js', new Date()); - gtag('config', 'UA-831873-42'); -</script> - <link rel="canonical" href="https://spec.openapis.org/oas/v3.0.0.html"> <style> +var:hover{text-decoration:underline;cursor:pointer} +var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)} +@media (prefers-color-scheme:dark){ +var.respec-hl{filter:saturate(.9) brightness(.9)} +} +var.respec-hl-c1{--bg-color:#f4d200} +var.respec-hl-c2{--bg-color:#ff87a2} +var.respec-hl-c3{--bg-color:#96e885} +var.respec-hl-c4{--bg-color:#3eeed2} +var.respec-hl-c5{--bg-color:#eacfb6} +var.respec-hl-c6{--bg-color:#82ddff} +var.respec-hl-c7{--bg-color:#ffbcf2} +@media print{ +var.respec-hl{background:0 0;color:#000;box-shadow:unset} +} +</style> +<style> var{position:relative;cursor:pointer} var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none} var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#222} @@ -180,7 +201,8 @@ "generatedSubtitle": "26 July 2017" }</script> <link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css"> -<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head><body class="h-entry"><div class="head"> +<link rel="stylesheet" media="" href="https://www.w3.org/StyleSheets/TR/2021/dark.css" disabled=""></head> +<body class="h-entry toc-inline"><div class="head"> <p class="logos"><a class="logo" href="https://openapis.org/"><img crossorigin="" alt="OpenAPI Initiative" height="48" src="https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png"> </a></p> <h1 id="title" class="title">OpenAPI Specification v3.0.0 </h1> <h2 id="subtitle" class="subtitle">Version 3.0.0</h2> @@ -4283,7 +4305,104 @@ <h1 id="title" class="title">OpenAPI Specification v3.0.0 </h1> <h2 id="subtitle <ul> <li>Not referenced in this document.</li> </ul> - </div><script id="respec-dfn-panel">(() => { + </div><script id="respec-highlight-vars">(() => { +// @ts-check + +if (document.respec) { + document.respec.ready.then(setupVarHighlighter); +} else { + setupVarHighlighter(); +} + +function setupVarHighlighter() { + document + .querySelectorAll("var") + .forEach(varElem => varElem.addEventListener("click", highlightListener)); +} + +function highlightListener(ev) { + ev.stopPropagation(); + const { target: varElem } = ev; + const hightligtedElems = highlightVars(varElem); + const resetListener = () => { + const hlColor = getHighlightColor(varElem); + hightligtedElems.forEach(el => removeHighlight(el, hlColor)); + [...HL_COLORS.keys()].forEach(key => HL_COLORS.set(key, true)); + }; + if (hightligtedElems.length) { + document.body.addEventListener("click", resetListener, { once: true }); + } +} + +// availability of highlight colors. colors from var.css +const HL_COLORS = new Map([ + ["respec-hl-c1", true], + ["respec-hl-c2", true], + ["respec-hl-c3", true], + ["respec-hl-c4", true], + ["respec-hl-c5", true], + ["respec-hl-c6", true], + ["respec-hl-c7", true], +]); + +function getHighlightColor(target) { + // return current colors if applicable + const { value } = target.classList; + const re = /respec-hl-\w+/; + const activeClass = re.test(value) && value.match(re); + if (activeClass) return activeClass[0]; + + // first color preference + if (HL_COLORS.get("respec-hl-c1") === true) return "respec-hl-c1"; + + // otherwise get some other available color + return [...HL_COLORS.keys()].find(c => HL_COLORS.get(c)) || "respec-hl-c1"; +} + +function highlightVars(varElem) { + const textContent = norm(varElem.textContent); + const parent = varElem.closest(".algorithm, section"); + const highlightColor = getHighlightColor(varElem); + + const varsToHighlight = [...parent.querySelectorAll("var")].filter( + el => + norm(el.textContent) === textContent && + el.closest(".algorithm, section") === parent + ); + + // update availability of highlight color + const colorStatus = varsToHighlight[0].classList.contains("respec-hl"); + HL_COLORS.set(highlightColor, colorStatus); + + // highlight vars + if (colorStatus) { + varsToHighlight.forEach(el => removeHighlight(el, highlightColor)); + return []; + } else { + varsToHighlight.forEach(el => addHighlight(el, highlightColor)); + } + return varsToHighlight; +} + +function removeHighlight(el, highlightColor) { + el.classList.remove("respec-hl", highlightColor); + // clean up empty class attributes so they don't come in export + if (!el.classList.length) el.removeAttribute("class"); +} + +function addHighlight(elem, highlightColor) { + elem.classList.add("respec-hl", highlightColor); +} + +/** + * Same as `norm` from src/core/utils, but our build process doesn't allow + * imports in runtime scripts, so duplicated here. + * @param {string} str + */ +function norm(str) { + return str.trim().replace(/\s+/g, " "); +} +})()</script><script id="respec-dfn-panel">(() => { // @ts-check if (document.respec) { document.respec.ready.then(setupPanel); diff --git a/oas/v3.0.1.html b/oas/v3.0.1.html index 365c812e67..f328872c1e 100644 --- a/oas/v3.0.1.html +++ b/oas/v3.0.1.html @@ -1,6 +1,6 @@ <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> -<meta name="generator" content="ReSpec 35.2.2"> +<meta name="generator" content="ReSpec 35.3.0"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <style> dfn{cursor:pointer} @@ -22,11 +22,24 @@ .dfn-panel li{margin-left:1em} .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto} </style> + + + + +<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> + +<script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'UA-831873-42'); +</script> + + <title>OpenAPI Specification v3.0.1</title> <meta name="description" content="The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs."> + <meta name="color-scheme" content="light dark"> -<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script> -<script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=G-JR4K3ZJLPH&l=dataLayer&cx=c&gtm=457e5350za200&tag_exp=102067808~102482433~102539968~102558064~102587591~102605417~102640600~102717422~102732003~102788824"></script> <style id="respec-mainstyle"> @keyframes pop{ 0%{transform:scale(1,1)} @@ -72,17 +85,25 @@ } </style> -<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> - -<script> - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - gtag('js', new Date()); - gtag('config', 'UA-831873-42'); -</script> - <link rel="canonical" href="https://spec.openapis.org/oas/v3.0.1.html"> <style> +var:hover{text-decoration:underline;cursor:pointer} +var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)} +@media (prefers-color-scheme:dark){ +var.respec-hl{filter:saturate(.9) brightness(.9)} +} +var.respec-hl-c1{--bg-color:#f4d200} +var.respec-hl-c2{--bg-color:#ff87a2} +var.respec-hl-c3{--bg-color:#96e885} +var.respec-hl-c4{--bg-color:#3eeed2} +var.respec-hl-c5{--bg-color:#eacfb6} +var.respec-hl-c6{--bg-color:#82ddff} +var.respec-hl-c7{--bg-color:#ffbcf2} +@media print{ +var.respec-hl{background:0 0;color:#000;box-shadow:unset} +} +</style> +<style> var{position:relative;cursor:pointer} var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none} var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#222} @@ -183,7 +204,8 @@ "generatedSubtitle": "06 December 2017" }</script> <link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css"> -<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head><body class="h-entry"><div class="head"> +<link rel="stylesheet" media="" href="https://www.w3.org/StyleSheets/TR/2021/dark.css" disabled=""></head> +<body class="h-entry toc-inline"><div class="head"> <p class="logos"><a class="logo" href="https://openapis.org/"><img crossorigin="" alt="OpenAPI Initiative" height="48" src="https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png"> </a></p> <h1 id="title" class="title">OpenAPI Specification v3.0.1 </h1> <h2 id="subtitle" class="subtitle">Version 3.0.1</h2> @@ -4235,7 +4257,104 @@ <h1 id="title" class="title">OpenAPI Specification v3.0.1 </h1> <h2 id="subtitle <ul> <li>Not referenced in this document.</li> </ul> - </div><script id="respec-dfn-panel">(() => { + </div><script id="respec-highlight-vars">(() => { +// @ts-check + +if (document.respec) { + document.respec.ready.then(setupVarHighlighter); +} else { + setupVarHighlighter(); +} + +function setupVarHighlighter() { + document + .querySelectorAll("var") + .forEach(varElem => varElem.addEventListener("click", highlightListener)); +} + +function highlightListener(ev) { + ev.stopPropagation(); + const { target: varElem } = ev; + const hightligtedElems = highlightVars(varElem); + const resetListener = () => { + const hlColor = getHighlightColor(varElem); + hightligtedElems.forEach(el => removeHighlight(el, hlColor)); + [...HL_COLORS.keys()].forEach(key => HL_COLORS.set(key, true)); + }; + if (hightligtedElems.length) { + document.body.addEventListener("click", resetListener, { once: true }); + } +} + +// availability of highlight colors. colors from var.css +const HL_COLORS = new Map([ + ["respec-hl-c1", true], + ["respec-hl-c2", true], + ["respec-hl-c3", true], + ["respec-hl-c4", true], + ["respec-hl-c5", true], + ["respec-hl-c6", true], + ["respec-hl-c7", true], +]); + +function getHighlightColor(target) { + // return current colors if applicable + const { value } = target.classList; + const re = /respec-hl-\w+/; + const activeClass = re.test(value) && value.match(re); + if (activeClass) return activeClass[0]; + + // first color preference + if (HL_COLORS.get("respec-hl-c1") === true) return "respec-hl-c1"; + + // otherwise get some other available color + return [...HL_COLORS.keys()].find(c => HL_COLORS.get(c)) || "respec-hl-c1"; +} + +function highlightVars(varElem) { + const textContent = norm(varElem.textContent); + const parent = varElem.closest(".algorithm, section"); + const highlightColor = getHighlightColor(varElem); + + const varsToHighlight = [...parent.querySelectorAll("var")].filter( + el => + norm(el.textContent) === textContent && + el.closest(".algorithm, section") === parent + ); + + // update availability of highlight color + const colorStatus = varsToHighlight[0].classList.contains("respec-hl"); + HL_COLORS.set(highlightColor, colorStatus); + + // highlight vars + if (colorStatus) { + varsToHighlight.forEach(el => removeHighlight(el, highlightColor)); + return []; + } else { + varsToHighlight.forEach(el => addHighlight(el, highlightColor)); + } + return varsToHighlight; +} + +function removeHighlight(el, highlightColor) { + el.classList.remove("respec-hl", highlightColor); + // clean up empty class attributes so they don't come in export + if (!el.classList.length) el.removeAttribute("class"); +} + +function addHighlight(elem, highlightColor) { + elem.classList.add("respec-hl", highlightColor); +} + +/** + * Same as `norm` from src/core/utils, but our build process doesn't allow + * imports in runtime scripts, so duplicated here. + * @param {string} str + */ +function norm(str) { + return str.trim().replace(/\s+/g, " "); +} +})()</script><script id="respec-dfn-panel">(() => { // @ts-check if (document.respec) { document.respec.ready.then(setupPanel); diff --git a/oas/v3.0.2.html b/oas/v3.0.2.html index 5ac6f87fc1..1d6b71253d 100644 --- a/oas/v3.0.2.html +++ b/oas/v3.0.2.html @@ -1,6 +1,6 @@ <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> -<meta name="generator" content="ReSpec 35.2.2"> +<meta name="generator" content="ReSpec 35.3.0"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <style> dfn{cursor:pointer} @@ -22,11 +22,24 @@ .dfn-panel li{margin-left:1em} .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto} </style> + + + + +<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> + +<script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'UA-831873-42'); +</script> + + <title>OpenAPI Specification v3.0.2</title> <meta name="description" content="The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs."> + <meta name="color-scheme" content="light dark"> -<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script> -<script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=G-JR4K3ZJLPH&l=dataLayer&cx=c&gtm=457e5350za200&tag_exp=102067808~102482433~102539968~102558064~102587591~102605417~102640600~102717422~102732003~102788824"></script> <style id="respec-mainstyle"> @keyframes pop{ 0%{transform:scale(1,1)} @@ -72,17 +85,25 @@ } </style> -<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> - -<script> - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - gtag('js', new Date()); - gtag('config', 'UA-831873-42'); -</script> - <link rel="canonical" href="https://spec.openapis.org/oas/v3.0.2.html"> <style> +var:hover{text-decoration:underline;cursor:pointer} +var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)} +@media (prefers-color-scheme:dark){ +var.respec-hl{filter:saturate(.9) brightness(.9)} +} +var.respec-hl-c1{--bg-color:#f4d200} +var.respec-hl-c2{--bg-color:#ff87a2} +var.respec-hl-c3{--bg-color:#96e885} +var.respec-hl-c4{--bg-color:#3eeed2} +var.respec-hl-c5{--bg-color:#eacfb6} +var.respec-hl-c6{--bg-color:#82ddff} +var.respec-hl-c7{--bg-color:#ffbcf2} +@media print{ +var.respec-hl{background:0 0;color:#000;box-shadow:unset} +} +</style> +<style> var{position:relative;cursor:pointer} var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none} var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#222} @@ -189,7 +210,8 @@ "generatedSubtitle": "08 October 2018" }</script> <link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css"> -<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head><body class="h-entry"><div class="head"> +<link rel="stylesheet" media="" href="https://www.w3.org/StyleSheets/TR/2021/dark.css" disabled=""></head> +<body class="h-entry toc-inline"><div class="head"> <p class="logos"><a class="logo" href="https://openapis.org/"><img crossorigin="" alt="OpenAPI Initiative" height="48" src="https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png"> </a></p> <h1 id="title" class="title">OpenAPI Specification v3.0.2 </h1> <h2 id="subtitle" class="subtitle">Version 3.0.2</h2> @@ -4258,7 +4280,104 @@ <h1 id="title" class="title">OpenAPI Specification v3.0.2 </h1> <h2 id="subtitle <ul> <li>Not referenced in this document.</li> </ul> - </div><script id="respec-dfn-panel">(() => { + </div><script id="respec-highlight-vars">(() => { +// @ts-check + +if (document.respec) { + document.respec.ready.then(setupVarHighlighter); +} else { + setupVarHighlighter(); +} + +function setupVarHighlighter() { + document + .querySelectorAll("var") + .forEach(varElem => varElem.addEventListener("click", highlightListener)); +} + +function highlightListener(ev) { + ev.stopPropagation(); + const { target: varElem } = ev; + const hightligtedElems = highlightVars(varElem); + const resetListener = () => { + const hlColor = getHighlightColor(varElem); + hightligtedElems.forEach(el => removeHighlight(el, hlColor)); + [...HL_COLORS.keys()].forEach(key => HL_COLORS.set(key, true)); + }; + if (hightligtedElems.length) { + document.body.addEventListener("click", resetListener, { once: true }); + } +} + +// availability of highlight colors. colors from var.css +const HL_COLORS = new Map([ + ["respec-hl-c1", true], + ["respec-hl-c2", true], + ["respec-hl-c3", true], + ["respec-hl-c4", true], + ["respec-hl-c5", true], + ["respec-hl-c6", true], + ["respec-hl-c7", true], +]); + +function getHighlightColor(target) { + // return current colors if applicable + const { value } = target.classList; + const re = /respec-hl-\w+/; + const activeClass = re.test(value) && value.match(re); + if (activeClass) return activeClass[0]; + + // first color preference + if (HL_COLORS.get("respec-hl-c1") === true) return "respec-hl-c1"; + + // otherwise get some other available color + return [...HL_COLORS.keys()].find(c => HL_COLORS.get(c)) || "respec-hl-c1"; +} + +function highlightVars(varElem) { + const textContent = norm(varElem.textContent); + const parent = varElem.closest(".algorithm, section"); + const highlightColor = getHighlightColor(varElem); + + const varsToHighlight = [...parent.querySelectorAll("var")].filter( + el => + norm(el.textContent) === textContent && + el.closest(".algorithm, section") === parent + ); + + // update availability of highlight color + const colorStatus = varsToHighlight[0].classList.contains("respec-hl"); + HL_COLORS.set(highlightColor, colorStatus); + + // highlight vars + if (colorStatus) { + varsToHighlight.forEach(el => removeHighlight(el, highlightColor)); + return []; + } else { + varsToHighlight.forEach(el => addHighlight(el, highlightColor)); + } + return varsToHighlight; +} + +function removeHighlight(el, highlightColor) { + el.classList.remove("respec-hl", highlightColor); + // clean up empty class attributes so they don't come in export + if (!el.classList.length) el.removeAttribute("class"); +} + +function addHighlight(elem, highlightColor) { + elem.classList.add("respec-hl", highlightColor); +} + +/** + * Same as `norm` from src/core/utils, but our build process doesn't allow + * imports in runtime scripts, so duplicated here. + * @param {string} str + */ +function norm(str) { + return str.trim().replace(/\s+/g, " "); +} +})()</script><script id="respec-dfn-panel">(() => { // @ts-check if (document.respec) { document.respec.ready.then(setupPanel); diff --git a/oas/v3.0.3.html b/oas/v3.0.3.html index 42495c3819..b1c4877cef 100644 --- a/oas/v3.0.3.html +++ b/oas/v3.0.3.html @@ -1,6 +1,6 @@ <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> -<meta name="generator" content="ReSpec 35.2.2"> +<meta name="generator" content="ReSpec 35.3.0"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <style> dfn{cursor:pointer} @@ -22,11 +22,24 @@ .dfn-panel li{margin-left:1em} .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto} </style> + + + + +<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> + +<script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'UA-831873-42'); +</script> + + <title>OpenAPI Specification v3.0.3</title> <meta name="description" content="The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs."> + <meta name="color-scheme" content="light dark"> -<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script> -<script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=G-JR4K3ZJLPH&l=dataLayer&cx=c&gtm=457e5350za200&tag_exp=102067808~102482433~102539968~102558064~102587591~102605417~102640600~102717422~102732003~102788824"></script> <style id="respec-mainstyle"> @keyframes pop{ 0%{transform:scale(1,1)} @@ -72,17 +85,25 @@ } </style> -<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> - -<script> - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - gtag('js', new Date()); - gtag('config', 'UA-831873-42'); -</script> - <link rel="canonical" href="https://spec.openapis.org/oas/v3.0.3.html"> <style> +var:hover{text-decoration:underline;cursor:pointer} +var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)} +@media (prefers-color-scheme:dark){ +var.respec-hl{filter:saturate(.9) brightness(.9)} +} +var.respec-hl-c1{--bg-color:#f4d200} +var.respec-hl-c2{--bg-color:#ff87a2} +var.respec-hl-c3{--bg-color:#96e885} +var.respec-hl-c4{--bg-color:#3eeed2} +var.respec-hl-c5{--bg-color:#eacfb6} +var.respec-hl-c6{--bg-color:#82ddff} +var.respec-hl-c7{--bg-color:#ffbcf2} +@media print{ +var.respec-hl{background:0 0;color:#000;box-shadow:unset} +} +</style> +<style> var{position:relative;cursor:pointer} var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none} var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#222} @@ -189,7 +210,8 @@ "generatedSubtitle": "20 February 2020" }</script> <link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css"> -<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head><body class="h-entry"><div class="head"> +<link rel="stylesheet" media="" href="https://www.w3.org/StyleSheets/TR/2021/dark.css" disabled=""></head> +<body class="h-entry toc-inline"><div class="head"> <p class="logos"><a class="logo" href="https://openapis.org/"><img crossorigin="" alt="OpenAPI Initiative" height="48" src="https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png"> </a></p> <h1 id="title" class="title">OpenAPI Specification v3.0.3 </h1> <h2 id="subtitle" class="subtitle">Version 3.0.3</h2> @@ -4299,7 +4321,104 @@ <h1 id="title" class="title">OpenAPI Specification v3.0.3 </h1> <h2 id="subtitle <ul> <li>Not referenced in this document.</li> </ul> - </div><script id="respec-dfn-panel">(() => { + </div><script id="respec-highlight-vars">(() => { +// @ts-check + +if (document.respec) { + document.respec.ready.then(setupVarHighlighter); +} else { + setupVarHighlighter(); +} + +function setupVarHighlighter() { + document + .querySelectorAll("var") + .forEach(varElem => varElem.addEventListener("click", highlightListener)); +} + +function highlightListener(ev) { + ev.stopPropagation(); + const { target: varElem } = ev; + const hightligtedElems = highlightVars(varElem); + const resetListener = () => { + const hlColor = getHighlightColor(varElem); + hightligtedElems.forEach(el => removeHighlight(el, hlColor)); + [...HL_COLORS.keys()].forEach(key => HL_COLORS.set(key, true)); + }; + if (hightligtedElems.length) { + document.body.addEventListener("click", resetListener, { once: true }); + } +} + +// availability of highlight colors. colors from var.css +const HL_COLORS = new Map([ + ["respec-hl-c1", true], + ["respec-hl-c2", true], + ["respec-hl-c3", true], + ["respec-hl-c4", true], + ["respec-hl-c5", true], + ["respec-hl-c6", true], + ["respec-hl-c7", true], +]); + +function getHighlightColor(target) { + // return current colors if applicable + const { value } = target.classList; + const re = /respec-hl-\w+/; + const activeClass = re.test(value) && value.match(re); + if (activeClass) return activeClass[0]; + + // first color preference + if (HL_COLORS.get("respec-hl-c1") === true) return "respec-hl-c1"; + + // otherwise get some other available color + return [...HL_COLORS.keys()].find(c => HL_COLORS.get(c)) || "respec-hl-c1"; +} + +function highlightVars(varElem) { + const textContent = norm(varElem.textContent); + const parent = varElem.closest(".algorithm, section"); + const highlightColor = getHighlightColor(varElem); + + const varsToHighlight = [...parent.querySelectorAll("var")].filter( + el => + norm(el.textContent) === textContent && + el.closest(".algorithm, section") === parent + ); + + // update availability of highlight color + const colorStatus = varsToHighlight[0].classList.contains("respec-hl"); + HL_COLORS.set(highlightColor, colorStatus); + + // highlight vars + if (colorStatus) { + varsToHighlight.forEach(el => removeHighlight(el, highlightColor)); + return []; + } else { + varsToHighlight.forEach(el => addHighlight(el, highlightColor)); + } + return varsToHighlight; +} + +function removeHighlight(el, highlightColor) { + el.classList.remove("respec-hl", highlightColor); + // clean up empty class attributes so they don't come in export + if (!el.classList.length) el.removeAttribute("class"); +} + +function addHighlight(elem, highlightColor) { + elem.classList.add("respec-hl", highlightColor); +} + +/** + * Same as `norm` from src/core/utils, but our build process doesn't allow + * imports in runtime scripts, so duplicated here. + * @param {string} str + */ +function norm(str) { + return str.trim().replace(/\s+/g, " "); +} +})()</script><script id="respec-dfn-panel">(() => { // @ts-check if (document.respec) { document.respec.ready.then(setupPanel); diff --git a/oas/v3.0.4.html b/oas/v3.0.4.html index ca8ef359a0..110b7b309f 100644 --- a/oas/v3.0.4.html +++ b/oas/v3.0.4.html @@ -1,6 +1,6 @@ <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> -<meta name="generator" content="ReSpec 35.2.2"> +<meta name="generator" content="ReSpec 35.3.0"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <style> dfn{cursor:pointer} @@ -22,11 +22,24 @@ .dfn-panel li{margin-left:1em} .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto} </style> + + + + +<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> + +<script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'UA-831873-42'); +</script> + + <title>OpenAPI Specification v3.0.4</title> <meta name="description" content="The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs."> + <meta name="color-scheme" content="light dark"> -<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script> -<script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=G-JR4K3ZJLPH&l=dataLayer&cx=c&gtm=457e5350za200&tag_exp=102067808~102482433~102539968~102558064~102587591~102605417~102640600~102717422~102732003~102788824"></script> <style id="respec-mainstyle"> @keyframes pop{ 0%{transform:scale(1,1)} @@ -72,17 +85,25 @@ } </style> -<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> - -<script> - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - gtag('js', new Date()); - gtag('config', 'UA-831873-42'); -</script> - <link rel="canonical" href="https://spec.openapis.org/oas/v3.0.4.html"> <style> +var:hover{text-decoration:underline;cursor:pointer} +var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)} +@media (prefers-color-scheme:dark){ +var.respec-hl{filter:saturate(.9) brightness(.9)} +} +var.respec-hl-c1{--bg-color:#f4d200} +var.respec-hl-c2{--bg-color:#ff87a2} +var.respec-hl-c3{--bg-color:#96e885} +var.respec-hl-c4{--bg-color:#3eeed2} +var.respec-hl-c5{--bg-color:#eacfb6} +var.respec-hl-c6{--bg-color:#82ddff} +var.respec-hl-c7{--bg-color:#ffbcf2} +@media print{ +var.respec-hl{background:0 0;color:#000;box-shadow:unset} +} +</style> +<style> var{position:relative;cursor:pointer} var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none} var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#222} @@ -204,7 +225,8 @@ "generatedSubtitle": "24 October 2024" }</script> <link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css"> -<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head><body class="h-entry"><div class="head"> +<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head> +<body class="h-entry"><div class="head"> <p class="logos"><a class="logo" href="https://openapis.org/"><img crossorigin="" alt="OpenAPI Initiative" height="48" src="https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png"> </a></p> <h1 id="title" class="title">OpenAPI Specification v3.0.4 </h1> <h2 id="subtitle" class="subtitle">Version 3.0.4</h2> @@ -5274,7 +5296,104 @@ <h1 id="title" class="title">OpenAPI Specification v3.0.4 </h1> <h2 id="subtitle <ul> <li>Not referenced in this document.</li> </ul> - </div><script id="respec-dfn-panel">(() => { + </div><script id="respec-highlight-vars">(() => { +// @ts-check + +if (document.respec) { + document.respec.ready.then(setupVarHighlighter); +} else { + setupVarHighlighter(); +} + +function setupVarHighlighter() { + document + .querySelectorAll("var") + .forEach(varElem => varElem.addEventListener("click", highlightListener)); +} + +function highlightListener(ev) { + ev.stopPropagation(); + const { target: varElem } = ev; + const hightligtedElems = highlightVars(varElem); + const resetListener = () => { + const hlColor = getHighlightColor(varElem); + hightligtedElems.forEach(el => removeHighlight(el, hlColor)); + [...HL_COLORS.keys()].forEach(key => HL_COLORS.set(key, true)); + }; + if (hightligtedElems.length) { + document.body.addEventListener("click", resetListener, { once: true }); + } +} + +// availability of highlight colors. colors from var.css +const HL_COLORS = new Map([ + ["respec-hl-c1", true], + ["respec-hl-c2", true], + ["respec-hl-c3", true], + ["respec-hl-c4", true], + ["respec-hl-c5", true], + ["respec-hl-c6", true], + ["respec-hl-c7", true], +]); + +function getHighlightColor(target) { + // return current colors if applicable + const { value } = target.classList; + const re = /respec-hl-\w+/; + const activeClass = re.test(value) && value.match(re); + if (activeClass) return activeClass[0]; + + // first color preference + if (HL_COLORS.get("respec-hl-c1") === true) return "respec-hl-c1"; + + // otherwise get some other available color + return [...HL_COLORS.keys()].find(c => HL_COLORS.get(c)) || "respec-hl-c1"; +} + +function highlightVars(varElem) { + const textContent = norm(varElem.textContent); + const parent = varElem.closest(".algorithm, section"); + const highlightColor = getHighlightColor(varElem); + + const varsToHighlight = [...parent.querySelectorAll("var")].filter( + el => + norm(el.textContent) === textContent && + el.closest(".algorithm, section") === parent + ); + + // update availability of highlight color + const colorStatus = varsToHighlight[0].classList.contains("respec-hl"); + HL_COLORS.set(highlightColor, colorStatus); + + // highlight vars + if (colorStatus) { + varsToHighlight.forEach(el => removeHighlight(el, highlightColor)); + return []; + } else { + varsToHighlight.forEach(el => addHighlight(el, highlightColor)); + } + return varsToHighlight; +} + +function removeHighlight(el, highlightColor) { + el.classList.remove("respec-hl", highlightColor); + // clean up empty class attributes so they don't come in export + if (!el.classList.length) el.removeAttribute("class"); +} + +function addHighlight(elem, highlightColor) { + elem.classList.add("respec-hl", highlightColor); +} + +/** + * Same as `norm` from src/core/utils, but our build process doesn't allow + * imports in runtime scripts, so duplicated here. + * @param {string} str + */ +function norm(str) { + return str.trim().replace(/\s+/g, " "); +} +})()</script><script id="respec-dfn-panel">(() => { // @ts-check if (document.respec) { document.respec.ready.then(setupPanel); diff --git a/oas/v3.1.0.html b/oas/v3.1.0.html index 3062bd5605..f7e1174524 100644 --- a/oas/v3.1.0.html +++ b/oas/v3.1.0.html @@ -1,6 +1,6 @@ <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> -<meta name="generator" content="ReSpec 35.2.2"> +<meta name="generator" content="ReSpec 35.3.0"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <style> dfn{cursor:pointer} @@ -22,11 +22,24 @@ .dfn-panel li{margin-left:1em} .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto} </style> + + + + +<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> + +<script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'UA-831873-42'); +</script> + + <title>OpenAPI Specification v3.1.0</title> <meta name="description" content="The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs."> + <meta name="color-scheme" content="light dark"> -<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script> -<script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=G-JR4K3ZJLPH&l=dataLayer&cx=c&gtm=457e5350za200&tag_exp=102067808~102482433~102539968~102558064~102587591~102605417~102640600~102717422~102732003~102788824"></script> <style id="respec-mainstyle"> @keyframes pop{ 0%{transform:scale(1,1)} @@ -72,17 +85,25 @@ } </style> -<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> - -<script> - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - gtag('js', new Date()); - gtag('config', 'UA-831873-42'); -</script> - <link rel="canonical" href="https://spec.openapis.org/oas/v3.1.0.html"> <style> +var:hover{text-decoration:underline;cursor:pointer} +var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)} +@media (prefers-color-scheme:dark){ +var.respec-hl{filter:saturate(.9) brightness(.9)} +} +var.respec-hl-c1{--bg-color:#f4d200} +var.respec-hl-c2{--bg-color:#ff87a2} +var.respec-hl-c3{--bg-color:#96e885} +var.respec-hl-c4{--bg-color:#3eeed2} +var.respec-hl-c5{--bg-color:#eacfb6} +var.respec-hl-c6{--bg-color:#82ddff} +var.respec-hl-c7{--bg-color:#ffbcf2} +@media print{ +var.respec-hl{background:0 0;color:#000;box-shadow:unset} +} +</style> +<style> var{position:relative;cursor:pointer} var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none} var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#222} @@ -189,7 +210,8 @@ "generatedSubtitle": "15 February 2021" }</script> <link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css"> -<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head><body class="h-entry"><div class="head"> +<link rel="stylesheet" media="" href="https://www.w3.org/StyleSheets/TR/2021/dark.css" disabled=""></head> +<body class="h-entry toc-inline"><div class="head"> <p class="logos"><a class="logo" href="https://openapis.org/"><img crossorigin="" alt="OpenAPI Initiative" height="48" src="https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png"> </a></p> <h1 id="title" class="title">OpenAPI Specification v3.1.0 </h1> <h2 id="subtitle" class="subtitle">Version 3.1.0</h2> @@ -4199,9 +4221,9 @@ <h1 id="title" class="title">OpenAPI Specification v3.1.0 </h1> <h2 id="subtitle </dd><dt id="bib-iana-http-status-codes">[IANA-HTTP-STATUS-CODES]</dt><dd> <a href="https://www.iana.org/assignments/http-status-codes/"><cite>Hypertext Transfer Protocol (HTTP) Status Code Registry</cite></a>. IANA. URL: <a href="https://www.iana.org/assignments/http-status-codes/">https://www.iana.org/assignments/http-status-codes/</a> </dd><dt id="bib-json-schema-2020-12">[JSON-Schema-2020-12]</dt><dd> - <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00"><cite>JSON Schema: A Media Type for Describing JSON Documents. Draft 2020-12</cite></a>. Austin Wright; Henry Andrews; Ben Hutton; Greg Dennis. Internet Engineering Task Force (IETF). 8 December 2020. Internet-Draft. URL: <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00">https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00</a> + <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-01"><cite>JSON Schema: A Media Type for Describing JSON Documents. Draft 2020-12</cite></a>. Austin Wright; Henry Andrews; Ben Hutton; Greg Dennis. Internet Engineering Task Force (IETF). 10 June 2022. Internet-Draft. URL: <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-01">https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-01</a> </dd><dt id="bib-json-schema-validation-2020-12">[JSON-Schema-Validation-2020-12]</dt><dd> - <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00"><cite>JSON Schema Validation: A Vocabulary for Structural Validation of JSON. Draft 2020-12</cite></a>. Austin Wright; Henry Andrews; Ben Hutton. Internet Engineering Task Force (IETF). 8 December 2020. Internet-Draft. URL: <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00">https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00</a> + <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01"><cite>JSON Schema Validation: A Vocabulary for Structural Validation of JSON. Draft 2020-12</cite></a>. Austin Wright; Henry Andrews; Ben Hutton. Internet Engineering Task Force (IETF). 10 June 2022. Internet-Draft. URL: <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01">https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01</a> </dd><dt id="bib-rfc1866">[RFC1866]</dt><dd> <a href="https://www.rfc-editor.org/rfc/rfc1866"><cite>Hypertext Markup Language - 2.0</cite></a>. T. Berners-Lee; D. Connolly. IETF. November 1995. Historic. URL: <a href="https://www.rfc-editor.org/rfc/rfc1866">https://www.rfc-editor.org/rfc/rfc1866</a> </dd><dt id="bib-rfc2045">[RFC2045]</dt><dd> @@ -4289,7 +4311,104 @@ <h1 id="title" class="title">OpenAPI Specification v3.1.0 </h1> <h2 id="subtitle <ul> <li>Not referenced in this document.</li> </ul> - </div><script id="respec-dfn-panel">(() => { + </div><script id="respec-highlight-vars">(() => { +// @ts-check + +if (document.respec) { + document.respec.ready.then(setupVarHighlighter); +} else { + setupVarHighlighter(); +} + +function setupVarHighlighter() { + document + .querySelectorAll("var") + .forEach(varElem => varElem.addEventListener("click", highlightListener)); +} + +function highlightListener(ev) { + ev.stopPropagation(); + const { target: varElem } = ev; + const hightligtedElems = highlightVars(varElem); + const resetListener = () => { + const hlColor = getHighlightColor(varElem); + hightligtedElems.forEach(el => removeHighlight(el, hlColor)); + [...HL_COLORS.keys()].forEach(key => HL_COLORS.set(key, true)); + }; + if (hightligtedElems.length) { + document.body.addEventListener("click", resetListener, { once: true }); + } +} + +// availability of highlight colors. colors from var.css +const HL_COLORS = new Map([ + ["respec-hl-c1", true], + ["respec-hl-c2", true], + ["respec-hl-c3", true], + ["respec-hl-c4", true], + ["respec-hl-c5", true], + ["respec-hl-c6", true], + ["respec-hl-c7", true], +]); + +function getHighlightColor(target) { + // return current colors if applicable + const { value } = target.classList; + const re = /respec-hl-\w+/; + const activeClass = re.test(value) && value.match(re); + if (activeClass) return activeClass[0]; + + // first color preference + if (HL_COLORS.get("respec-hl-c1") === true) return "respec-hl-c1"; + + // otherwise get some other available color + return [...HL_COLORS.keys()].find(c => HL_COLORS.get(c)) || "respec-hl-c1"; +} + +function highlightVars(varElem) { + const textContent = norm(varElem.textContent); + const parent = varElem.closest(".algorithm, section"); + const highlightColor = getHighlightColor(varElem); + + const varsToHighlight = [...parent.querySelectorAll("var")].filter( + el => + norm(el.textContent) === textContent && + el.closest(".algorithm, section") === parent + ); + + // update availability of highlight color + const colorStatus = varsToHighlight[0].classList.contains("respec-hl"); + HL_COLORS.set(highlightColor, colorStatus); + + // highlight vars + if (colorStatus) { + varsToHighlight.forEach(el => removeHighlight(el, highlightColor)); + return []; + } else { + varsToHighlight.forEach(el => addHighlight(el, highlightColor)); + } + return varsToHighlight; +} + +function removeHighlight(el, highlightColor) { + el.classList.remove("respec-hl", highlightColor); + // clean up empty class attributes so they don't come in export + if (!el.classList.length) el.removeAttribute("class"); +} + +function addHighlight(elem, highlightColor) { + elem.classList.add("respec-hl", highlightColor); +} + +/** + * Same as `norm` from src/core/utils, but our build process doesn't allow + * imports in runtime scripts, so duplicated here. + * @param {string} str + */ +function norm(str) { + return str.trim().replace(/\s+/g, " "); +} +})()</script><script id="respec-dfn-panel">(() => { // @ts-check if (document.respec) { document.respec.ready.then(setupPanel); diff --git a/oas/v3.1.1.html b/oas/v3.1.1.html index f9237677b7..99b78c8077 100644 --- a/oas/v3.1.1.html +++ b/oas/v3.1.1.html @@ -1,6 +1,6 @@ <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> -<meta name="generator" content="ReSpec 35.2.2"> +<meta name="generator" content="ReSpec 35.3.0"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <style> dfn{cursor:pointer} @@ -22,11 +22,24 @@ .dfn-panel li{margin-left:1em} .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto} </style> + + + + +<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> + +<script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'UA-831873-42'); +</script> + + <title>OpenAPI Specification v3.1.1</title> <meta name="description" content="The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs."> + <meta name="color-scheme" content="light dark"> -<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script> -<script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=G-JR4K3ZJLPH&l=dataLayer&cx=c&gtm=457e5350za200&tag_exp=102067808~102482433~102539968~102558064~102587591~102605417~102640600~102717422~102732003~102788824"></script> <style id="respec-mainstyle"> @keyframes pop{ 0%{transform:scale(1,1)} @@ -72,17 +85,25 @@ } </style> -<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-831873-42"></script> - -<script> - window.dataLayer = window.dataLayer || []; - function gtag(){dataLayer.push(arguments);} - gtag('js', new Date()); - gtag('config', 'UA-831873-42'); -</script> - <link rel="canonical" href="https://spec.openapis.org/oas/v3.1.1.html"> <style> +var:hover{text-decoration:underline;cursor:pointer} +var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)} +@media (prefers-color-scheme:dark){ +var.respec-hl{filter:saturate(.9) brightness(.9)} +} +var.respec-hl-c1{--bg-color:#f4d200} +var.respec-hl-c2{--bg-color:#ff87a2} +var.respec-hl-c3{--bg-color:#96e885} +var.respec-hl-c4{--bg-color:#3eeed2} +var.respec-hl-c5{--bg-color:#eacfb6} +var.respec-hl-c6{--bg-color:#82ddff} +var.respec-hl-c7{--bg-color:#ffbcf2} +@media print{ +var.respec-hl{background:0 0;color:#000;box-shadow:unset} +} +</style> +<style> var{position:relative;cursor:pointer} var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none} var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#222} @@ -204,7 +225,8 @@ "generatedSubtitle": "24 October 2024" }</script> <link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css"> -<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head><body class="h-entry"><div class="head"> +<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head> +<body class="h-entry"><div class="head"> <p class="logos"><a class="logo" href="https://openapis.org/"><img crossorigin="" alt="OpenAPI Initiative" height="48" src="https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png"> </a></p> <h1 id="title" class="title">OpenAPI Specification v3.1.1 </h1> <h2 id="subtitle" class="subtitle">Version 3.1.1</h2> @@ -5361,9 +5383,9 @@ <h1 id="title" class="title">OpenAPI Specification v3.1.1 </h1> <h2 id="subtitle </dd><dt id="bib-iana-http-status-codes">[IANA-HTTP-STATUS-CODES]</dt><dd> <a href="https://www.iana.org/assignments/http-status-codes/"><cite>Hypertext Transfer Protocol (HTTP) Status Code Registry</cite></a>. IANA. URL: <a href="https://www.iana.org/assignments/http-status-codes/">https://www.iana.org/assignments/http-status-codes/</a> </dd><dt id="bib-json-schema-2020-12">[JSON-Schema-2020-12]</dt><dd> - <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00"><cite>JSON Schema: A Media Type for Describing JSON Documents. Draft 2020-12</cite></a>. Austin Wright; Henry Andrews; Ben Hutton; Greg Dennis. Internet Engineering Task Force (IETF). 8 December 2020. Internet-Draft. URL: <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00">https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00</a> + <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-01"><cite>JSON Schema: A Media Type for Describing JSON Documents. Draft 2020-12</cite></a>. Austin Wright; Henry Andrews; Ben Hutton; Greg Dennis. Internet Engineering Task Force (IETF). 10 June 2022. Internet-Draft. URL: <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-01">https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-01</a> </dd><dt id="bib-json-schema-validation-2020-12">[JSON-Schema-Validation-2020-12]</dt><dd> - <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00"><cite>JSON Schema Validation: A Vocabulary for Structural Validation of JSON. Draft 2020-12</cite></a>. Austin Wright; Henry Andrews; Ben Hutton. Internet Engineering Task Force (IETF). 8 December 2020. Internet-Draft. URL: <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00">https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00</a> + <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01"><cite>JSON Schema Validation: A Vocabulary for Structural Validation of JSON. Draft 2020-12</cite></a>. Austin Wright; Henry Andrews; Ben Hutton. Internet Engineering Task Force (IETF). 10 June 2022. Internet-Draft. URL: <a href="https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01">https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-01</a> </dd><dt id="bib-openapi-registry">[OpenAPI-Registry]</dt><dd> <a href="https://spec.openapis.org/registry/index.html"><cite>OpenAPI Initiative Registry</cite></a>. OpenAPI Initiative. URL: <a href="https://spec.openapis.org/registry/index.html">https://spec.openapis.org/registry/index.html</a> </dd><dt id="bib-openid-connect-core">[OpenID-Connect-Core]</dt><dd> @@ -5528,7 +5550,104 @@ <h1 id="title" class="title">OpenAPI Specification v3.1.1 </h1> <h2 id="subtitle <ul> <li>Not referenced in this document.</li> </ul> - </div><script id="respec-dfn-panel">(() => { + </div><script id="respec-highlight-vars">(() => { +// @ts-check + +if (document.respec) { + document.respec.ready.then(setupVarHighlighter); +} else { + setupVarHighlighter(); +} + +function setupVarHighlighter() { + document + .querySelectorAll("var") + .forEach(varElem => varElem.addEventListener("click", highlightListener)); +} + +function highlightListener(ev) { + ev.stopPropagation(); + const { target: varElem } = ev; + const hightligtedElems = highlightVars(varElem); + const resetListener = () => { + const hlColor = getHighlightColor(varElem); + hightligtedElems.forEach(el => removeHighlight(el, hlColor)); + [...HL_COLORS.keys()].forEach(key => HL_COLORS.set(key, true)); + }; + if (hightligtedElems.length) { + document.body.addEventListener("click", resetListener, { once: true }); + } +} + +// availability of highlight colors. colors from var.css +const HL_COLORS = new Map([ + ["respec-hl-c1", true], + ["respec-hl-c2", true], + ["respec-hl-c3", true], + ["respec-hl-c4", true], + ["respec-hl-c5", true], + ["respec-hl-c6", true], + ["respec-hl-c7", true], +]); + +function getHighlightColor(target) { + // return current colors if applicable + const { value } = target.classList; + const re = /respec-hl-\w+/; + const activeClass = re.test(value) && value.match(re); + if (activeClass) return activeClass[0]; + + // first color preference + if (HL_COLORS.get("respec-hl-c1") === true) return "respec-hl-c1"; + + // otherwise get some other available color + return [...HL_COLORS.keys()].find(c => HL_COLORS.get(c)) || "respec-hl-c1"; +} + +function highlightVars(varElem) { + const textContent = norm(varElem.textContent); + const parent = varElem.closest(".algorithm, section"); + const highlightColor = getHighlightColor(varElem); + + const varsToHighlight = [...parent.querySelectorAll("var")].filter( + el => + norm(el.textContent) === textContent && + el.closest(".algorithm, section") === parent + ); + + // update availability of highlight color + const colorStatus = varsToHighlight[0].classList.contains("respec-hl"); + HL_COLORS.set(highlightColor, colorStatus); + + // highlight vars + if (colorStatus) { + varsToHighlight.forEach(el => removeHighlight(el, highlightColor)); + return []; + } else { + varsToHighlight.forEach(el => addHighlight(el, highlightColor)); + } + return varsToHighlight; +} + +function removeHighlight(el, highlightColor) { + el.classList.remove("respec-hl", highlightColor); + // clean up empty class attributes so they don't come in export + if (!el.classList.length) el.removeAttribute("class"); +} + +function addHighlight(elem, highlightColor) { + elem.classList.add("respec-hl", highlightColor); +} + +/** + * Same as `norm` from src/core/utils, but our build process doesn't allow + * imports in runtime scripts, so duplicated here. + * @param {string} str + */ +function norm(str) { + return str.trim().replace(/\s+/g, " "); +} +})()</script><script id="respec-dfn-panel">(() => { // @ts-check if (document.respec) { document.respec.ready.then(setupPanel);