@redocly/openapi-docs 3.12.0-rc.7 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/redocly-openapi-docs.min.js +2156 -1969
  2. package/lib/components/ApiInfo/ApiInfo.js +1 -1
  3. package/lib/components/ApiInfo/Metadata.js +1 -1
  4. package/lib/components/ApiInfo/styled.js +6 -5
  5. package/lib/components/Content/useAutoScroll.js +1 -1
  6. package/lib/components/ExpandAllButton/ExpandAllButton.js +2 -2
  7. package/lib/components/OperationItem/Description.d.ts +1 -4
  8. package/lib/components/OperationItem/Description.js +1 -1
  9. package/lib/components/OperationItem/OperationItem.js +5 -5
  10. package/lib/components/Overview/Overview.js +1 -1
  11. package/lib/components/Request/RequestDetails.js +2 -2
  12. package/lib/components/RequestSamples/Example.js +1 -1
  13. package/lib/components/RequestSamples/RequestSamples.js +1 -1
  14. package/lib/components/ResponseSamples/ResponseSamples.js +1 -1
  15. package/lib/components/Samples/ExampleSwitch.js +1 -1
  16. package/lib/components/TagItem/TagItem.js +8 -8
  17. package/lib/components/common/OperationItemTitle.d.ts +1 -0
  18. package/lib/components/common/OperationItemTitle.js +10 -5
  19. package/lib/components/common/panels.js +22 -20
  20. package/lib/models/schema.js +2 -2
  21. package/lib/services/code-samples/httpsnippet/helpers/code-builder.d.ts +5 -1
  22. package/lib/services/code-samples/httpsnippet/helpers/code-builder.js +2 -2
  23. package/lib/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
  24. package/lib/services/code-samples/httpsnippet/helpers/code-helpers.js +2 -2
  25. package/lib/services/menu/markdown.js +1 -1
  26. package/lib/services/types.d.ts +0 -3
  27. package/lib/types/open-api.d.ts +1 -0
  28. package/lib/utils/loadAndBundleSpec.js +1 -1
  29. package/lib/utils/openapi.js +1 -1
  30. package/lib/utils/string.js +1 -1
  31. package/package.json +5 -5
@@ -1 +1 @@
1
- import{dirname as y}from"path";import f from"url-template";import{IS_BROWSER as M}from"@redocly/theme/core/openapi";import{deleteEmptyArrayItem as E,isArrayOfObjects as T,isNumeric as S,removeQueryStringAndHash as z,resolveUrl as D,sanitizeItemId as m,normalizeText as b,getValueFromMdParsedExtension as g,isAbsoluteUrl as N}from"./helpers.js";import{DEFAULT_TAG_SLUG as R,MediaTypes as j}from"../constants.js";import{JsonPointer as $}from"./JsonPointer.js";import{joinWithSeparator as _}from"../services/index.js";import{tryDecodeURIComponent as F}from"./string.js";import{getUrlDirname as U}from"./url.js";function P(e){return typeof e=="string"&&/\dxx/i.test(e)}function ne(e){return e==="default"||S(e)||P(e)}function ie(e,r=!1){if(e==="default")return r?"error":"success";let t=typeof e=="string"?parseInt(e,10):e;if(P(e)&&(t*=100),t<100||t>599)throw new Error("invalid HTTP code");let n="success";return t>=300&&t<400?n="redirect":t>=400?n="error":t<200&&(n="info"),n}const L={get:!0,post:!0,put:!0,head:!0,patch:!0,delete:!0,options:!0,$ref:!0};function oe(e){return e in L}function ue(e){const{operationId:r,pathName:t}=e,n=b(g(e,"description"));return b(g(e,"summary"))||r||n&&n.substring(0,50)||t||"<no summary>"}function se(e,r){return r?.id?_(r.id,m(e.operationId?e.operationId:d(e.pointer))).toLowerCase():e.tags?.length?m(e.operationId?e.operationId:d(e.pointer)):m(e.operationId?_(R,e.operationId):d(e.pointer))}function d(e){return e?.startsWith("/")?e.slice(1,e.length):e}const A={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",contentEncoding:"string",contentMediaType:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",unevaluatedProperties:"object",patternProperties:"object",properties:"object"};function ae(e){if(e.type!==void 0&&!Array.isArray(e.type))return e.type;const r=Object.keys(A);for(const t of r){const n=A[t];if(e[t]!==void 0)return n}return"any"}function k(e,r=e.type){if(e["x-circular-ref"]||e["x-complex"])return!0;if(e.oneOf!==void 0||e.anyOf!==void 0||e.if&&e.then||e.if&&e.else)return!1;let t=!0;const n=Array.isArray(r);return(r==="object"||n&&r?.includes("object"))&&(t=e.properties!==void 0?Object.keys(e.properties).length===0:e.additionalProperties===void 0&&e.unevaluatedProperties===void 0&&e.patternProperties===void 0),Array.isArray(e.items)||Array.isArray(e.prefixItems)?!1:(e.items!==void 0&&typeof e.items!="boolean"&&(r==="array"||n&&r?.includes("array"))&&(t=k(e.items,e.items.type)),t)}function q(e){return e.search(/json/i)!==-1}function ce(e){return e?.search(/xml/i)!==-1}function pe(e){return e===j.URL_ENCODED}function fe(e){return e===j.MULTIPART}function c(e,r,t){return Array.isArray(e)?e.map(n=>n.toString()).join(t):typeof e=="object"?Object.keys(e).map(n=>`${n}${t}${e[n]}`).join(t):r+"="+e.toString()}function h(e,r){return Array.isArray(e)?(console.warn("deepObject style cannot be used with array value:"+e.toString()),""):typeof e=="object"?Object.keys(e).map(t=>e[t]?`${r}[${t}]=${e[t]}`:void 0).filter(Boolean).join("&"):(console.warn("deepObject style cannot be used with non-object value:"+e.toString()),"")}function a(e,r,t){const n="__redoc_param_name__",i=r?"*":"";return f.parse(`{?${n}${i}}`).expand({[n]:t}).substring(1).replace(/__redoc_param_name__/g,e)}function w(e,r){const t=e?"*":"",n="__redoc_param_name__",i=f.parse(`{${n}${t}}`);return F(i.expand({[n]:r}))}function me(e,r={}){if(Array.isArray(e))throw new Error("Payload must have fields: "+e.toString());return Object.keys(e).map(t=>{const n=e[t],{style:i="form",explode:o=!0}=r[t]||{};switch(i){case"form":return a(t,o,n);case"spaceDelimited":return c(n,t,"%20");case"pipeDelimited":return c(n,t,"|");case"deepObject":return h(n,t);default:return console.warn("Incorrect or unsupported encoding style: "+i),""}}).join("&")}function W(e,r,t,n){const i=t?"*":"";let o="";r==="label"?o=".":r==="matrix"&&(o=";");const s="__redoc_param_name__";return f.parse(`{${o}${s}${i}}`).expand({[s]:n}).replace(/__redoc_param_name__/g,e)}function H(e,r,t,n){const i=o=>{switch(r){case"form":return a(e,t,o);case"spaceDelimited":return!Array.isArray(o)&&typeof o!="object"?(console.warn("The style spaceDelimited is applicable to arrays or objects"),""):t?a(e,t,o):c(n,e,"%20");case"pipeDelimited":return!Array.isArray(o)&&typeof o!="object"?(console.warn("The style pipeDelimited is applicable to arrays or objects"),""):t?a(e,t,o):c(n,e,"|");case"deepObject":return!t||Array.isArray(o)||typeof o!="object"?(console.warn("The style deepObject is only applicable for objects with explode=true"),""):h(o,e);case"simple":return w(t,n);default:return console.warn("Unexpected style for query: "+r),""}};return T(n)&&(n=E(n).map(o=>i(o))),i(n)}function C(e,r,t){switch(e){case"simple":return w(r,t);default:return console.warn("Unexpected style for header: "+e),""}}function B(e,r,t,n){switch(r){case"form":return a(e,t,n);default:return console.warn("Unexpected style for cookie: "+r),""}}function O(e,r){return q(r)?JSON.stringify(e):(console.warn(`Parameter serialization as ${r} is not supported`),"")}function de(e,r){const{name:t,style:n,explode:i=!1,serializationMime:o}=e;if(o)switch(e.in){case"path":case"header":return O(r,o);case"cookie":case"query":return`${t}=${O(r,o)}`;default:return console.warn("Unexpected parameter location: "+e.in),""}if(!n)return console.warn(`Missing style attribute or content for parameter ${t}`),"";switch(e.in){case"path":return W(t,n,i,r);case"query":return H(t,n,i,r);case"header":return C(n,i,r);case"cookie":return B(t,n,i,r);default:return console.warn("Unexpected parameter location: "+e.in),""}}function le(e){return e.search(/xml/i)!==-1?"xml":"clike"}const I=/^#\/components\/(schemas|pathItems)\/([^/]+)$/;function xe(e){return I.test(e||"")}function ye(e){return e?.match(I)?.pop()}function G(e){if(e===void 0)return;const r=e.toString(10);return/^0\.0*1$/.test(r)?`decimal places <= ${r.split(".")[1].length}`:`multiple of ${r}`}function l(e,r,t){let n;return r!==void 0&&t!==void 0?r===t?n=`= ${r} ${e}`:n=`[ ${r} .. ${t} ] ${e}`:t!==void 0?n=`<= ${t} ${e}`:r!==void 0&&(r===1?n="non-empty":n=`>= ${r} ${e}`),n}function J(e){const r=typeof e.exclusiveMinimum=="number"?Math.min(e.exclusiveMinimum,e.minimum??1/0):e.minimum,t=typeof e.exclusiveMaximum=="number"?Math.max(e.exclusiveMaximum,e.maximum??-1/0):e.maximum,n=typeof e.exclusiveMinimum=="number"||e.exclusiveMinimum,i=typeof e.exclusiveMaximum=="number"||e.exclusiveMaximum;if(r!==void 0&&t!==void 0)return`${n?"( ":"[ "}${r} .. ${t}${i?" )":" ]"}`;if(t!==void 0)return`${i?"< ":"<= "}${t}`;if(r!==void 0)return`${n?"> ":">= "}${r}`}function be(e){const r=[],t=l("characters",e.minLength,e.maxLength);t!==void 0&&r.push(t);const n=l("items",e.minItems,e.maxItems);n!==void 0&&r.push(n);const i=l(e.minProperties===1&&e.maxProperties===1?"property":"properties",e.minProperties,e.maxProperties);i!==void 0&&r.push(i);const o=G(e.multipleOf);o!==void 0&&r.push(o);const s=J(e);return s!==void 0&&r.push(s),e.uniqueItems&&r.push("unique"),r}function ge(e,r=[]){const t=[],n=[],i=[];return e.forEach(o=>{o.required?r.includes(o.name)?n.push(o):i.push(o):t.push(o)}),n.sort((o,s)=>r.indexOf(o.name)-r.indexOf(s.name)),[...n,...i,...t]}function je(e){return e.sort((r,t)=>Number(r.deprecated)-Number(t.deprecated))}function $e(e,r=[],t=[],{pathPointer:n,operationPointer:i}){const o={};if(!Array.isArray(t))return[];t.forEach(u=>{({resolved:u}=e.deref(u)),o[u.name+"_"+u.in]=!0});const s=r.map((u,p)=>({paramOrRef:u,pointer:$.join(n,["parameters",String(p)])})).filter(({paramOrRef:u})=>({resolved:u}=e.deref(u),!o[u.name+"_"+u.in])),x=t.map((u,p)=>({paramOrRef:u,pointer:$.join(i,["parameters",String(p)])}));return[...s,...x]}function _e(e,r){const n=e===void 0?z((()=>{if(!M)return globalThis.SSR_HOSTNAME||"";const i=window.location.href;return i.endsWith(".html")?y(i):i})()):N(e)?U(e):y(e);return r.length===0&&(r=[{url:"/"}]),r.map(i=>({...i,url:n?D(n,i.url):i.url,description:i.description||""}))}const Pe=e=>({delete:"del",options:"opts"})[e]||e;function Q(e){return e in{"x-circular-ref":!0,"x-complex":!0,"x-parentRefs":!0,"x-refsStack":!0,"x-codeSamples":!0,"x-displayName":!0,"x-examples":!0,"x-logo":!0,"x-nullable":!0,"x-servers":!0,"x-tagGroups":!0,"x-traitTag":!0,"x-additionalPropertiesName":!0,"x-explicitMappingOnly":!0,"x-enumDescriptions":!0,"x-hideReplay":!0,"x-feedback":!0,"x-badges":!0,"x-assertionType":!0,"x-rbac":!0}||e.startsWith("x-parsed-md-")}function Ae(e,r){return Object.keys(e).filter(t=>r===!0?t.startsWith("x-")&&!Q(t):t.startsWith("x-")&&r.indexOf(t)>-1).reduce((t,n)=>(t[n]=e[n],t),{})}function he(e){return e.split(" or ").map(r=>r.replace(/^(string|object|number|integer|array|boolean)s?( ?.*)/,"$1s$2")).join(" or ")}function we(e){let r=e.content;const t=e["x-examples"],n=e["x-example"];if(t){r={...r};for(const i of Object.keys(t)){const o=t[i];r[i]={...r[i],examples:o}}}else if(n){r={...r};for(const i of Object.keys(n)){const o=n[i];r[i]={...r[i],example:o}}}return r}export{ae as detectType,Ae as extractExtensions,we as getContentWithLegacyExamples,ye as getDefinitionName,se as getOperationId,ue as getOperationName,ie as getStatusCodeType,be as humanizeConstraints,J as humanizeNumberRange,pe as isFormUrlEncoded,q as isJsonLike,fe as isMultipartFormData,xe as isNamedDefinition,oe as isOperationName,k as isPrimitiveType,Q as isRedocExtension,ne as isStatusCode,ce as isXmlLike,le as langFromMime,$e as mergeParams,_e as normalizeServers,he as pluralizeType,de as serializeParameterValue,O as serializeParameterValueWithMime,H as serializeQueryParameter,Pe as shortenHTTPVerb,je as sortByDeprecated,ge as sortByRequired,me as urlFormEncodePayload};
1
+ import{dirname as y}from"path";import f from"url-template";import{IS_BROWSER as M}from"@redocly/theme/core/openapi";import{deleteEmptyArrayItem as E,isArrayOfObjects as T,isNumeric as S,removeQueryStringAndHash as z,resolveUrl as D,sanitizeItemId as m,normalizeText as b,getValueFromMdParsedExtension as g,isAbsoluteUrl as N}from"./helpers.js";import{DEFAULT_TAG_SLUG as R,MediaTypes as j}from"../constants.js";import{JsonPointer as $}from"./JsonPointer.js";import{joinWithSeparator as _}from"../services/index.js";import{tryDecodeURIComponent as F}from"./string.js";import{getUrlDirname as U}from"./url.js";function P(e){return typeof e=="string"&&/\dxx/i.test(e)}function ne(e){return e==="default"||S(e)||P(e)}function ie(e,r=!1){if(e==="default")return r?"error":"success";let t=typeof e=="string"?parseInt(e,10):e;if(P(e)&&(t*=100),t<100||t>599)throw new Error("invalid HTTP code");let n="success";return t>=300&&t<400?n="redirect":t>=400?n="error":t<200&&(n="info"),n}const L={get:!0,post:!0,put:!0,head:!0,patch:!0,delete:!0,options:!0,$ref:!0};function oe(e){return e in L}function ue(e){const{operationId:r,pathName:t}=e,n=b(g(e,"description"));return b(g(e,"summary"))||r||n&&n.substring(0,50)||t||"<no summary>"}function se(e,r){return r?.id?_(r.id,m(e.operationId?e.operationId:d(e.pointer))).toLowerCase():e.tags?.length?m(e.operationId?e.operationId:d(e.pointer)):m(e.operationId?_(R,e.operationId):d(e.pointer))}function d(e){return e?.startsWith("/")?e.slice(1,e.length):e}const h={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",contentEncoding:"string",contentMediaType:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",unevaluatedProperties:"object",patternProperties:"object",properties:"object"};function ae(e){if(e.type!==void 0&&!Array.isArray(e.type))return e.type;const r=Object.keys(h);for(const t of r){const n=h[t];if(e[t]!==void 0)return n}return"any"}function k(e,r=e.type){if(e["x-circular-ref"]||e["x-complex"])return!0;if(e.oneOf!==void 0||e.anyOf!==void 0||e.if&&e.then||e.if&&e.else)return!1;let t=!0;const n=Array.isArray(r);return(r==="object"||n&&r?.includes("object"))&&(t=e.properties!==void 0?Object.keys(e.properties).length===0:e.additionalProperties===void 0&&e.unevaluatedProperties===void 0&&e.patternProperties===void 0),Array.isArray(e.items)||Array.isArray(e.prefixItems)?!1:(e.items!==void 0&&typeof e.items!="boolean"&&(r==="array"||n&&r?.includes("array"))&&(t=k(e.items,e.items.type)),t)}function q(e){return e.search(/json/i)!==-1}function ce(e){return e?.search(/xml/i)!==-1}function pe(e){return e===j.URL_ENCODED}function fe(e){return e===j.MULTIPART}function c(e,r,t){return Array.isArray(e)?e.map(n=>n.toString()).join(t):typeof e=="object"?Object.keys(e).map(n=>`${n}${t}${e[n]}`).join(t):r+"="+e.toString()}function w(e,r){return Array.isArray(e)?(console.warn("deepObject style cannot be used with array value:"+e.toString()),""):typeof e=="object"?Object.keys(e).map(t=>e[t]?`${r}[${t}]=${e[t]}`:void 0).filter(Boolean).join("&"):(console.warn("deepObject style cannot be used with non-object value:"+e.toString()),"")}function a(e,r,t){const n="__redoc_param_name__",i=r?"*":"";return f.parse(`{?${n}${i}}`).expand({[n]:t}).substring(1).replace(/__redoc_param_name__/g,e)}function O(e,r){const t=e?"*":"",n="__redoc_param_name__",i=f.parse(`{${n}${t}}`);return F(i.expand({[n]:r}))}function me(e,r={}){if(Array.isArray(e))throw new Error("Payload must have fields: "+e.toString());return Object.keys(e).map(t=>{const n=e[t],{style:i="form",explode:o=!0}=r[t]||{};switch(i){case"form":return a(t,o,n);case"spaceDelimited":return c(n,t,"%20");case"pipeDelimited":return c(n,t,"|");case"deepObject":return w(n,t);default:return console.warn("Incorrect or unsupported encoding style: "+i),""}}).join("&")}function W(e,r,t,n){const i=t?"*":"";let o="";r==="label"?o=".":r==="matrix"&&(o=";");const s="__redoc_param_name__";return f.parse(`{${o}${s}${i}}`).expand({[s]:n}).replace(/__redoc_param_name__/g,e)}function H(e,r,t,n){const i=o=>{switch(r){case"form":return a(e,t,o);case"spaceDelimited":return!Array.isArray(o)&&typeof o!="object"?(console.warn("The style spaceDelimited is applicable to arrays or objects"),""):t?a(e,t,o):c(n,e,"%20");case"pipeDelimited":return!Array.isArray(o)&&typeof o!="object"?(console.warn("The style pipeDelimited is applicable to arrays or objects"),""):t?a(e,t,o):c(n,e,"|");case"deepObject":return!t||Array.isArray(o)||typeof o!="object"?(console.warn("The style deepObject is only applicable for objects with explode=true"),""):w(o,e);case"simple":return O(t,n);default:return console.warn("Unexpected style for query: "+r),""}};return T(n)&&(n=E(n).map(o=>i(o))),i(n)}function C(e,r,t){switch(e){case"simple":return O(r,t);default:return console.warn("Unexpected style for header: "+e),""}}function B(e,r,t,n){switch(r){case"form":return a(e,t,n);default:return console.warn("Unexpected style for cookie: "+r),""}}function A(e,r){return q(r)?JSON.stringify(e):(console.warn(`Parameter serialization as ${r} is not supported`),"")}function de(e,r){const{name:t,style:n,explode:i=!1,serializationMime:o}=e;if(o)switch(e.in){case"path":case"header":return A(r,o);case"cookie":case"query":return`${t}=${A(r,o)}`;default:return console.warn("Unexpected parameter location: "+e.in),""}if(!n)return console.warn(`Missing style attribute or content for parameter ${t}`),"";switch(e.in){case"path":return W(t,n,i,r);case"query":return H(t,n,i,r);case"header":return C(n,i,r);case"cookie":return B(t,n,i,r);default:return console.warn("Unexpected parameter location: "+e.in),""}}function le(e){return e.search(/xml/i)!==-1?"xml":"clike"}const I=/^#\/components\/(schemas|pathItems)\/([^/]+)$/;function xe(e){return I.test(e||"")}function ye(e){return e?.match(I)?.pop()}function G(e){if(e===void 0)return;const r=e.toString(10);return/^0\.0*1$/.test(r)?`decimal places <= ${r.split(".")[1].length}`:`multiple of ${r}`}function l(e,r,t){let n;return r!==void 0&&t!==void 0?r===t?n=`= ${r} ${e}`:n=`[ ${r} .. ${t} ] ${e}`:t!==void 0?n=`<= ${t} ${e}`:r!==void 0&&(r===1?n="non-empty":n=`>= ${r} ${e}`),n}function J(e){const r=typeof e.exclusiveMinimum=="number"?Math.min(e.exclusiveMinimum,e.minimum??1/0):e.minimum,t=typeof e.exclusiveMaximum=="number"?Math.max(e.exclusiveMaximum,e.maximum??-1/0):e.maximum,n=typeof e.exclusiveMinimum=="number"||e.exclusiveMinimum,i=typeof e.exclusiveMaximum=="number"||e.exclusiveMaximum;if(r!==void 0&&t!==void 0)return`${n?"( ":"[ "}${r} .. ${t}${i?" )":" ]"}`;if(t!==void 0)return`${i?"< ":"<= "}${t}`;if(r!==void 0)return`${n?"> ":">= "}${r}`}function be(e){const r=[],t=l("characters",e.minLength,e.maxLength);t!==void 0&&r.push(t);const n=l("items",e.minItems,e.maxItems);n!==void 0&&r.push(n);const i=l(e.minProperties===1&&e.maxProperties===1?"property":"properties",e.minProperties,e.maxProperties);i!==void 0&&r.push(i);const o=G(e.multipleOf);o!==void 0&&r.push(o);const s=J(e);return s!==void 0&&r.push(s),e.uniqueItems&&r.push("unique"),r}function ge(e,r=[]){const t=[],n=[],i=[];return e.forEach(o=>{o.required?r.includes(o.name)?n.push(o):i.push(o):t.push(o)}),n.sort((o,s)=>r.indexOf(o.name)-r.indexOf(s.name)),[...n,...i,...t]}function je(e){return e.sort((r,t)=>Number(r.deprecated)-Number(t.deprecated))}function $e(e,r=[],t=[],{pathPointer:n,operationPointer:i}){const o={};t.forEach(u=>{({resolved:u}=e.deref(u)),o[u.name+"_"+u.in]=!0});const s=r.map((u,p)=>({paramOrRef:u,pointer:$.join(n,["parameters",String(p)])})).filter(({paramOrRef:u})=>({resolved:u}=e.deref(u),!o[u.name+"_"+u.in])),x=t.map((u,p)=>({paramOrRef:u,pointer:$.join(i,["parameters",String(p)])}));return[...s,...x]}function _e(e,r){const n=e===void 0?z((()=>{if(!M)return globalThis.SSR_HOSTNAME||"";const i=window.location.href;return i.endsWith(".html")?y(i):i})()):N(e)?U(e):y(e);return r.length===0&&(r=[{url:"/"}]),r.map(i=>({...i,url:n?D(n,i.url):i.url,description:i.description||""}))}const Pe=e=>({delete:"del",options:"opts"})[e]||e;function Q(e){return e in{"x-circular-ref":!0,"x-complex":!0,"x-parentRefs":!0,"x-refsStack":!0,"x-codeSamples":!0,"x-displayName":!0,"x-examples":!0,"x-logo":!0,"x-nullable":!0,"x-servers":!0,"x-tagGroups":!0,"x-traitTag":!0,"x-additionalPropertiesName":!0,"x-explicitMappingOnly":!0,"x-enumDescriptions":!0,"x-hideReplay":!0,"x-feedback":!0,"x-badges":!0,"x-assertionType":!0,"x-rbac":!0}||e.startsWith("x-parsed-md-")}function he(e,r){return Object.keys(e).filter(t=>r===!0?t.startsWith("x-")&&!Q(t):t.startsWith("x-")&&r.indexOf(t)>-1).reduce((t,n)=>(t[n]=e[n],t),{})}function we(e){return e.split(" or ").map(r=>r.replace(/^(string|object|number|integer|array|boolean)s?( ?.*)/,"$1s$2")).join(" or ")}function Oe(e){let r=e.content;const t=e["x-examples"],n=e["x-example"];if(t){r={...r};for(const i of Object.keys(t)){const o=t[i];r[i]={...r[i],examples:o}}}else if(n){r={...r};for(const i of Object.keys(n)){const o=n[i];r[i]={...r[i],example:o}}}return r}export{ae as detectType,he as extractExtensions,Oe as getContentWithLegacyExamples,ye as getDefinitionName,se as getOperationId,ue as getOperationName,ie as getStatusCodeType,be as humanizeConstraints,J as humanizeNumberRange,pe as isFormUrlEncoded,q as isJsonLike,fe as isMultipartFormData,xe as isNamedDefinition,oe as isOperationName,k as isPrimitiveType,Q as isRedocExtension,ne as isStatusCode,ce as isXmlLike,le as langFromMime,$e as mergeParams,_e as normalizeServers,we as pluralizeType,de as serializeParameterValue,A as serializeParameterValueWithMime,H as serializeQueryParameter,Pe as shortenHTTPVerb,je as sortByDeprecated,ge as sortByRequired,me as urlFormEncodePayload};
@@ -1 +1 @@
1
- import t from"slugify";function o(e){return e.split("").map(r=>r+"\u0335").join("")}function c(e){return e.replace(/[.[\]]/g,r=>({".":"%2e","[":"%5b","]":"%5d"})[r]||"")}function u(e){return e.replace(/%2e|%5b|%5d/g,r=>({"%2e":".","%5b":"[","%5d":"]"})[r]||"")}function p(e){return e.replace(/\\/g,"%5C")}function a(e){return e.replace(/%/g,"")}function i(e){try{return decodeURIComponent(e)}catch(r){return console.error(`Decoding failed: ${e}`,r),e}}function l(e){return t(e).slice(0,240)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"").slice(0,240)}function s(e,r={}){try{return JSON.parse(e)}catch{return r}}export{p as encodeBackSlashes,c as escapeFormId,a as removePercentChart,s as safeJsonParse,l as safeSlugify,o as strikethroughText,i as tryDecodeURIComponent,u as unescapeFormId};
1
+ import t from"slugify";function o(e){return e.split("").map(r=>r+"\u0335").join("")}function c(e){return e.replace(/[.[\]]/g,r=>({".":"%2e","[":"%5b","]":"%5d"})[r]||"")}function p(e){return e.replace(/%2e|%5b|%5d/g,r=>({"%2e":".","%5b":"[","%5d":"]"})[r]||"")}function u(e){return e.replace(/\\/g,"%5C")}function a(e){return e.replace(/%/g,"")}function i(e){try{return decodeURIComponent(e)}catch(r){return console.error(`Decoding failed: ${e}`,r),e}}function f(e){return t(e)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function l(e,r={}){try{return JSON.parse(e)}catch{return r}}export{u as encodeBackSlashes,c as escapeFormId,a as removePercentChart,l as safeJsonParse,f as safeSlugify,o as strikethroughText,i as tryDecodeURIComponent,p as unescapeFormId};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/openapi-docs",
3
- "version": "3.12.0-rc.7",
3
+ "version": "3.12.0",
4
4
  "description": "Redocly OpenAPI Docs",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@markdoc/markdoc": "0.5.2",
24
- "@redocly/openapi-core": "0.0.0-snapshot.1753015287",
24
+ "@redocly/openapi-core": "2.0.2",
25
25
  "deepmerge": "^4.2.2",
26
26
  "dompurify": "3.2.6",
27
27
  "fast-deep-equal": "^3.1.3",
@@ -36,8 +36,8 @@
36
36
  "url-template": "^2.0.8",
37
37
  "util": "~0.12.5",
38
38
  "web-vitals": "3.3.1",
39
- "@redocly/config": "0.26.3-rc.1",
40
- "@redocly/replay": "0.15.0-rc.3"
39
+ "@redocly/replay": "0.15.0",
40
+ "@redocly/config": "0.28.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@jest/globals": "29.5.0",
@@ -74,7 +74,7 @@
74
74
  "typescript": "5.6.2",
75
75
  "url": "~0.11.0",
76
76
  "vite": "^6.3.5",
77
- "@redocly/theme": "0.56.0-rc.2"
77
+ "@redocly/theme": "0.56.0"
78
78
  },
79
79
  "scripts": {
80
80
  "start": "npm run copy-highlight-hook && vite",