@redocly/cli 2.43.0 → 2.43.1

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.
@@ -112,8 +112,8 @@ Repeats of \`in:${r.in}\` + \`name:${r.name}\`.`,location:i.PathItem.child(["par
112
112
  `),g={message:`Component '${d}/${m.componentName}' is not unique. It is also defined at:
113
113
  ${y}`,location:h,reference:"https://redocly.com/docs/cli/rules/oas/component-name-unique"};f&&(g.forceSeverity=f),c.report(g)}}})}}};return e.schemas!="off"&&(n.NamedSchemas={Schema(a,{location:c}){s(Ly,c)}}),e.responses!="off"&&(n.NamedResponses={Response(a,{location:c}){s(zy,c)}}),e.parameters!="off"&&(n.NamedParameters={Parameter(a,{location:c}){s(Uy,c)}}),e.requestBodies!="off"&&(n.NamedRequestBodies={RequestBody(a,{location:c}){s(Fy,c)}}),n;function o(a){let c=a.split("/").slice(-1)[0];return Ma(c)?c.slice(0,c.lastIndexOf(".")):c}function i(a,c,p){let l=KY(a,c),u=t.get(l)??{absolutePointers:new Set,locations:[]},m=p.absolutePointer.toString();u.absolutePointers.has(m)||(u.absolutePointers.add(m),u.locations.push(p)),t.set(l,u)}function s(a,c){let p=o(c.absolutePointer.toString());i(a,p,c)}};function HY(e){return BY[e]??null}function KY(e,t){return`${e}/${t}`}function GY(e){let[t,r]=e.split("/");return{typeName:t,componentName:r}}var h$=()=>({Root(e,{report:t,location:r}){if(!e.hasOwnProperty("servers")){t({message:"Servers must be present.",location:r.child(["openapi"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-empty-servers"});return}(!Array.isArray(e.servers)||e.servers.length===0)&&t({message:"Servers must be a non-empty array.",location:r.child(["servers"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-empty-servers"})}});var y$=()=>({Example(e,{report:t,location:r}){e.value&&e.externalValue&&t({message:"Example object can have either `value` or `externalValue` fields.",location:r.child(["value"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-example-value-and-externalValue"})}});var g$=e=>{let t=new Fn,r=o=>o.schema===void 0,n=o=>(i,s)=>{let{location:a,resolve:c}=s;if(Lt(i.example))p(i.example,a.child("example"));else if(O(i.examples))for(let l of Object.keys(i.examples))p(i.examples[l],a.child(["examples",l]),!0);function p(l,u,m){if(F(l)){let f=c(l);if(!f.location)return;u=f.location,l=f.node}let d=l;if(m){let f=xp(l);if(!f)return;d=f.value,u=u.child(f.field)}An({example:d,schema:i.schema,options:{location:u,ctx:s,validator:t,allowAdditionalProperties:!!e.allowAdditionalProperties,ajvContext:o},reference:"https://redocly.com/docs/cli/rules/oas/no-invalid-media-type-examples"})}};return{Parameter:{MediaType:{skip:r,leave:n({apiContext:"request"})}},RequestBody:{MediaType:{skip:r,leave:n({apiContext:"request"})}},Response:{MediaType:{skip:r,leave:n({apiContext:"response"})}}}};var b$=()=>({Server(e,{report:t,location:r}){let n=/^(.*[\/.])?(example\.com|localhost)([\/:?].*|$)/;e.url&&n.test(e.url)&&t({message:"Server `url` should not point to example.com or localhost.",location:r.child(["url"]),reference:"https://redocly.com/docs/cli/rules/oas/no-server-example-com"})}});var v$=()=>({Server(e,{report:t,location:r}){e.url&&e.url.endsWith("/")&&e.url!=="/"&&t({message:"Server `url` should not have a trailing slash.",location:r.child(["url"]),reference:"https://redocly.com/docs/cli/rules/oas/no-server-trailing-slash"})}});var S$=()=>({Root(e,{report:t,location:r}){if(!e.servers||e.servers.length===0)return;let n=[];if(Array.isArray(e.servers))for(let o of e.servers){let i=x$(o);i&&n.push(...i)}else{let o=x$(e.servers);if(!o)return;n.push(...o)}for(let o of n)o==="empty"&&t({message:"Server variable with `enum` must be a non-empty array.",location:r.child(["servers"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-server-variables-empty-enum"}),o==="invalidDefaultValue"&&t({message:"Server variable define `enum` and `default`. `enum` must include default value",location:r.child(["servers"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-server-variables-empty-enum"})}});function x$(e){if(e.variables&&Object.keys(e.variables).length===0)return;let t=[];for(let r in e.variables){let n=e.variables[r];if(!n.enum||(Array.isArray(n.enum)&&n.enum?.length===0&&t.push("empty"),!n.default))continue;let o=e.variables[r].default;n.enum&&!n.enum.includes(o)&&t.push("invalidDefaultValue")}if(t.length)return t}var w$=()=>({Server(e,{report:t,location:r}){if(!e?.url)return;let n=e.url.match(/{[^}]+}/g)?.map(i=>i.slice(1,i.length-1))||[],o=e?.variables&&Object.keys(e.variables)||[];for(let i of n)o.includes(i)||t({message:`The \`${i}\` variable is not defined in the \`variables\` objects.`,location:r.child(["url"]),reference:"https://redocly.com/docs/cli/rules/oas/no-undefined-server-variable"});for(let i of o)n.includes(i)||t({message:`The \`${i}\` variable is not used in the server's \`url\` field.`,location:r.child(["variables",i]).key(),from:r.child("url"),reference:"https://redocly.com/docs/cli/rules/oas/no-undefined-server-variable"})}});var _$=()=>{let e=new Map,t=new Map,r=new Set;function n(o,i,s=!1){e.set(o.absolutePointer,{used:e.get(o.absolutePointer)?.used||!1,referencesDiscriminator:s,location:o,name:i})}return{ref(o,{type:i,resolve:s,key:a,location:c}){if(["Schema","Header","Parameter","Response","Example","RequestBody","MediaTypesMap"].includes(i.name)){let p=s(o);if(!p.location)return;e.set(p.location.absolutePointer,{used:!0,name:a.toString(),location:c})}},Root:{leave(o,{report:i}){e.forEach(s=>{!s.used&&!s.referencesDiscriminator&&i({message:`Component: "${s.name}" is never used.`,location:s.location.key(),reference:"https://redocly.com/docs/cli/rules/oas/no-unused-components"})}),t.forEach((s,a)=>{r.has(a)||i({message:`Security scheme: "${a}" is never used.`,location:s.key(),reference:"https://redocly.com/docs/cli/rules/oas/no-unused-components"})})}},NamedSchemas:{Schema(o,{location:i,key:s,resolve:a}){let c=o.allOf?.some(p=>F(p)&&a(p)?.node?.discriminator);n(i,s.toString(),c)}},NamedParameters:{Parameter(o,{location:i,key:s}){n(i,s.toString())}},NamedResponses:{Response(o,{location:i,key:s}){n(i,s.toString())}},NamedExamples:{Example(o,{location:i,key:s}){n(i,s.toString())}},NamedRequestBodies:{RequestBody(o,{location:i,key:s}){n(i,s.toString())}},NamedHeaders:{Header(o,{location:i,key:s}){n(i,s.toString())}},NamedMediaTypes:{MediaTypesMap(o,{location:i,key:s}){n(i,s.toString())}},NamedSecuritySchemes:{SecurityScheme(o,{rawLocation:i,key:s}){t.set(s.toString(),i)}},SecurityRequirement(o){for(let i of Object.keys(o))r.add(i)}}};var P$=()=>({Schema:{leave(e,t){"nullable"in e&&!("type"in e)&&t.report({message:"The `type` field must be defined when the `nullable` field is used.",location:t.location.child(["nullable"]),reference:"https://redocly.com/docs/cli/rules/oas/nullable-type-sibling"})}}});var E$=()=>({Response:{skip(e,t){return!/4[Xx0-9]{2}/.test(`${t}`)},enter(e,{report:t,location:r}){(!e.content||!e.content["application/problem+json"])&&t({message:"Response `4xx` must have content-type `application/problem+json`.",location:r.key(),reference:"https://redocly.com/docs/cli/rules/oas/operation-4xx-problem-details-rfc7807"})},MediaType:{skip(e,t){return t!=="application/problem+json"},enter(e,t){It({fieldName:"schema",value:e,ctx:t,reference:"https://redocly.com/docs/cli/rules/oas/operation-4xx-problem-details-rfc7807"})},SchemaProperties(e,t){It({fieldName:"type",value:e,ctx:t,reference:"https://redocly.com/docs/cli/rules/oas/operation-4xx-problem-details-rfc7807"}),It({fieldName:"title",value:e,ctx:t,reference:"https://redocly.com/docs/cli/rules/oas/operation-4xx-problem-details-rfc7807"})}}}});var $$=({allowedValues:e})=>({Paths:{RequestBody:{leave(t,r){Vn({type:"consumes",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/request-mime-type"})}},Callback:{RequestBody(){},Response:{leave(t,r){Vn({type:"consumes",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/request-mime-type"})}}}},WebhooksMap:{Response:{leave(t,r){Vn({type:"consumes",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/request-mime-type"})}}}});var A$=e=>{let t=e.names||{},r;return{Operation:{Response:{skip:(n,o)=>`${o}`=="204",enter:(n,o)=>{r=o.key},MediaType:{Schema(n,{report:o,location:i}){if(n.type!=="object")return;let s=t[r]||t[un(r)]||t[un(r).toLowerCase()]||[];for(let a of s)n.properties?.[a]||o({message:`Response object must contain a top-level "${a}" property.`,location:i.child("properties").key(),reference:"https://redocly.com/docs/cli/rules/oas/response-contains-property"})}}}}}};var T$=({allowedValues:e})=>({Paths:{Response:{leave(t,r){Vn({type:"produces",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/response-mime-type"})}},Callback:{Response(){},RequestBody:{leave(t,r){Vn({type:"produces",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/response-mime-type"})}}}},WebhooksMap:{RequestBody:{leave(t,r){Vn({type:"produces",value:t,ctx:r,allowedValues:e,reference:"https://redocly.com/docs/cli/rules/oas/response-mime-type"})}}}});var R$=()=>{let e=`^[${vc}]+$`;function t(r,n,o,i){new RegExp(e).test(r)||n({message:`The map key in ${i} "${r}" does not match the regular expression "${e}"`,location:o.key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-components-invalid-map-name"})}return{NamedSchemas:{Schema(r,{key:n,report:o,location:i}){t(n,o,i,"schemas")}},NamedParameters:{Parameter(r,{key:n,report:o,location:i}){t(n,o,i,"parameters")}},NamedResponses:{Response(r,{key:n,report:o,location:i}){t(n,o,i,"responses")}},NamedExamples:{Example(r,{key:n,report:o,location:i}){t(n,o,i,"examples")}},NamedRequestBodies:{RequestBody(r,{key:n,report:o,location:i}){t(n,o,i,"requestBodies")}},NamedHeaders:{Header(r,{key:n,report:o,location:i}){t(n,o,i,"headers")}},NamedSecuritySchemes:{SecurityScheme(r,{key:n,report:o,location:i}){t(n,o,i,"securitySchemes")}},NamedLinks:{Link(r,{key:n,report:o,location:i}){t(n,o,i,"links")}},NamedCallbacks:{Callback(r,{key:n,report:o,location:i}){t(n,o,i,"callbacks")}}}};var O$=()=>{let e=[];return{Root:{enter(t){e=Object.keys(t.components?.schemas||{})}},Schema:{leave(t,r){let n=t.discriminator?.propertyName;if(!n)return;let o=t.discriminator?.defaultMapping;if(o===void 0){let i=new Set,s=(a,c)=>{let p=oa(a,r,c);return!!(!p.schema||i.has(p.schema)||(i.add(p.schema),p.schema.required?.includes(n)||p.schema.allOf?.some(l=>s(l,p.location))||p.schema.oneOf?.every(l=>s(l,p.location))||p.schema.anyOf?.every(l=>s(l,p.location))))};s(t)||r.report({message:`Discriminator with optional property '${n}' must include a defaultMapping field.`,location:r.location.child("discriminator"),reference:"https://redocly.com/docs/cli/rules/oas/spec-discriminator-defaultMapping"})}else r.resolve({$ref:o}).node===void 0&&!e.includes(o)&&r.report({message:`defaultMapping value '${o}' does not point to an existing schema component.`,location:r.location.child(["discriminator","defaultMapping"]),reference:"https://redocly.com/docs/cli/rules/oas/spec-discriminator-defaultMapping"})}}}};var k$=()=>({Example({value:e,externalValue:t,dataValue:r,serializedValue:n},{report:o,location:i}){e!==void 0&&t!==void 0&&o({message:"The 'value' and 'externalValue' fields of an example object are mutually exclusive.",location:i,reference:"https://redocly.com/docs/cli/rules/oas/spec-example-values"}),n!==void 0&&t!==void 0&&o({message:"The 'serializedValue' and 'externalValue' fields of an example object are mutually exclusive.",location:i,reference:"https://redocly.com/docs/cli/rules/oas/spec-example-values"}),e!==void 0&&r!==void 0&&o({message:"The 'value' filed must be absent if 'dataValue' is present in an example object.",location:i.child("value").key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-example-values"}),e!==void 0&&n!==void 0&&o({message:"The 'value' filed must be absent if 'serializedValue' is present in an example object.",location:i.child("value").key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-example-values"})}});var I$=()=>({MediaType:{leave(e,t){("prefixEncoding"in e&&"encoding"in e||"itemEncoding"in e&&"encoding"in e)&&t.report({message:"The 'encoding' field cannot be used together with 'prefixEncoding' or 'itemEncoding'.",location:t.location.child("encoding").key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-no-invalid-encoding-combinations"})}}});var C$=()=>{let e;return{Root:{enter(t){e=t.tags??[]}},Tag:{leave(t,{report:r,location:n}){if(t?.parent===void 0)return;if(!e.find(s=>s.name===t.parent)){r({message:`Tag parent '${t.parent}' is not defined in the API description.`,location:n.child("parent"),reference:"https://redocly.com/docs/cli/rules/oas/spec-no-invalid-tag-parents"});return}let o=new Set(t.name),i=t.parent;for(;i!==void 0;){if(o.has(i)){r({message:`Circular reference detected in tag parent hierarchy for tag '${t.name}'.`,location:n.child("parent"),reference:"https://redocly.com/docs/cli/rules/oas/spec-no-invalid-tag-parents"});return}o.add(i),i=e.find(s=>s.name===i)?.parent}}}}};function q$(e){return e.filter(t=>!("$ref"in t)&&t.in==="querystring").length}function N$(e,t){let r=t.location.child("parameters");e>1&&t.report({message:"Parameters with `in: querystring` should be defined only once per path/operation parameter set.",location:r,reference:"https://redocly.com/docs/cli/rules/oas/spec-querystring-parameters"})}function j$(e,t,r,n){if(e.in==="query"){r.querystringLocation&&n.report({message:"Parameters with `in: query` cannot be used together with `in: querystring` in the same operation/path parameter set.",location:t,reference:"https://redocly.com/docs/cli/rules/oas/spec-querystring-parameters"}),r.queryLocation??=t;return}e.in==="querystring"&&(r.queryLocation&&n.report({message:"Parameters with `in: querystring` cannot be used together with `in: query` in the same operation/path parameter set.",location:t,reference:"https://redocly.com/docs/cli/rules/oas/spec-querystring-parameters"}),r.querystringLocation??=t)}var M$=()=>{let e={},t={},r=0;return{PathItem:{enter(n,o){e={},t={},r=0,N$(q$(n.parameters||[]),o)},Parameter(n,o){j$(n,o.location,e,o),n.in==="querystring"&&(r+=1)},Operation:{enter(n,o){t={...e};let i=r+q$(n.parameters||[]);N$(i,o)},Parameter(n,o){j$(n,o.location,t,o)}}}}};var D$={struct:it,"info-contact":Zt,"info-license":Oi,"info-license-strict":Rn,"operation-2xx-response":sl,"operation-4xx-response":al,"operation-4xx-problem-details-rfc7807":E$,assertions:St,"operation-operationId-unique":pl,"operation-parameters-unique":ul,"operation-tag-defined":ml,"no-example-value-and-externalValue":y$,"no-mixed-number-range-constraints":Tn,"no-enum-type-mismatch":Mr,"no-path-trailing-slash":il,"no-empty-servers":h$,"path-declaration-must-exist":yl,"operation-operationId-url-safe":ll,"operation-operationId":kn,"operation-summary":fl,"tags-alphabetical":Cn,"no-server-example.com":b$,"no-server-trailing-slash":v$,"tag-description":In,"operation-description":cl,"no-unused-components":_$,"path-not-include-query":bl,"path-parameters-defined":Wi,"path-params-defined":Wi,"parameter-description":hl,"operation-singular-tag":dl,"security-defined":Pl,"security-scopes-defined":Ti,"no-unresolved-refs":ot,"paths-kebab-case":xl,"boolean-parameter-prefixes":f$,"path-http-verbs-order":gl,"no-invalid-media-type-examples":g$,"no-identical-paths":Pp,"no-ambiguous-paths":Sp,"no-undefined-server-variable":w$,"no-server-variables-empty-enum":S$,"no-http-verbs-in-paths":_p,"request-mime-type":$$,"response-mime-type":T$,"path-segment-plural":vl,"no-invalid-schema-examples":ol,"no-invalid-parameter-examples":nl,"response-contains-header":wl,"response-contains-property":A$,"scalar-property-missing-example":_l,"spec-components-invalid-map-name":R$,"required-string-property-missing-min-length":Sl,"spec-strict-refs":El,"component-name-unique":m$,"array-parameter-serialization":d$,"no-required-schema-properties-undefined":Dr,"no-schema-type-mismatch":Lr,"no-duplicated-tag-names":On,"nullable-type-sibling":P$,"spec-no-invalid-tag-parents":C$,"spec-no-invalid-encoding-combinations":I$,"spec-discriminator-defaultMapping":O$,"spec-example-values":k$,"spec-querystring-parameters":M$},L$={};var U$=()=>{let e=new Map;function t(r,n){e.set(r.absolutePointer,{used:e.get(r.absolutePointer)?.used||!1,location:r,name:n})}return{ref(r,{type:n,resolve:o,key:i,location:s}){if(["Schema","ContentDescriptor","Example","Link","ErrorObject","ExamplePairing","Tag"].includes(n.name)){let a=o(r);if(!a.location)return;e.set(a.location.absolutePointer,{used:!0,name:i.toString(),location:s})}},Root:{leave(r,{report:n}){e.forEach(o=>{o.used||n({message:`Component: "${o.name}" is never used.`,location:o.location.key(),reference:"https://redocly.com/docs/cli/rules/oas/no-unused-components"})})}},NamedSchemas:{Schema(r,{location:n,key:o}){t(n,o.toString())}},NamedContentDescriptors:{ContentDescriptor(r,{location:n,key:o}){t(n,o.toString())}},NamedExamples:{Example(r,{location:n,key:o}){t(n,o.toString())}},NamedLinks:{Link(r,{location:n,key:o}){t(n,o.toString())}},NamedErrors:{ErrorObject(r,{location:n,key:o}){t(n,o.toString())}},NamedExamplePairingObjects:{ExamplePairing(r,{location:n,key:o}){t(n,o.toString())}},NamedTags:{Tag(r,{location:n,key:o}){t(n,o.toString())}}}};var z$=()=>({Method:{leave(e,{report:t,resolve:r,location:n}){if(!e.params||!Array.isArray(e.params))return;let o=new Set;e.params.forEach((i,s)=>{let a=r(i);if(!a.node)return;let c=a.node,p=c.name;p&&(o.has(p)&&t({message:`Parameter names must be unique. Duplicate parameter name '${c.name}' found.`,location:n.child([s,"name"]),reference:"https://redocly.com/docs/cli/rules/openrpc/spec-no-duplicated-method-params"}),o.add(p))})}}});var F$=()=>({Method:{leave(e,{report:t,resolve:r,location:n}){if(!e.params||!Array.isArray(e.params))return;let o=!1;e.params.forEach((i,s)=>{let a=r(i);if(!a.node)return;let c=a.node;if(!c.name)return;c.required===!0?o&&t({message:`Required parameter '${c.name}' must be positioned before optional parameters.`,location:n.child([s,"name"]),reference:"https://redocly.com/docs/cli/rules/openrpc/spec-no-required-params-after-optional"}):o=!0})}}});var V$={struct:it,"no-unresolved-refs":ot,assertions:St,"info-license":Oi,"no-unused-components":U$,"info-contact":Zt,"spec-no-duplicated-method-params":z$,"spec-no-required-params-after-optional":F$},B$={};var H$={"info-contact":Zt,struct:it,"no-unresolved-refs":ot,assertions:St},K$={};var YY={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"error","info-contact":"error","info-license":"error","info-license-strict":"error","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error","no-http-verbs-in-paths":"error","no-enum-type-mismatch":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","operation-summary":"error","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-singular-tag":"error","parameter-description":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","paths-kebab-case":"error","path-http-verbs-order":"error","path-params-defined":"error","path-segment-plural":"error","required-string-property-missing-min-length":"error","response-contains-header":"error","request-mime-type":{severity:"error",allowedValues:["application/json"]},"response-mime-type":{severity:"error",allowedValues:["application/json"]},"response-contains-property":"error","security-defined":"error","security-scopes-defined":"error","spec-strict-refs":"error","scalar-property-missing-example":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error"},oas3_0Rules:{"array-parameter-serialization":"error","boolean-parameter-prefixes":"error","component-name-unique":"error","info-contact":"error","info-license":"error","info-license-strict":"error","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error","no-http-verbs-in-paths":"error","no-enum-type-mismatch":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-invalid-media-type-examples":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-server-variables-empty-enum":"error","nullable-type-sibling":"error","operation-summary":"error","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-4xx-problem-details-rfc7807":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-singular-tag":"error","parameter-description":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","paths-kebab-case":"error","path-http-verbs-order":"error","path-params-defined":"error","path-segment-plural":"error","required-string-property-missing-min-length":"error","response-contains-header":"error","request-mime-type":{severity:"error",allowedValues:["application/json"]},"response-mime-type":{severity:"error",allowedValues:["application/json"]},"response-contains-property":"error","security-defined":"error","security-scopes-defined":"error","spec-strict-refs":"error","scalar-property-missing-example":"error","spec-components-invalid-map-name":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","spec-example-values":"error"},oas3_1Rules:{"array-parameter-serialization":"error","boolean-parameter-prefixes":"error","component-name-unique":"error","info-contact":"error","info-license":"error","info-license-strict":"error","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error","no-http-verbs-in-paths":"error","no-enum-type-mismatch":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-invalid-media-type-examples":"error","no-mixed-number-range-constraints":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-server-variables-empty-enum":"error","parameter-description":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","paths-kebab-case":"error","path-http-verbs-order":"error","path-params-defined":"error","path-segment-plural":"error","operation-summary":"error","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-4xx-problem-details-rfc7807":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-singular-tag":"error","required-string-property-missing-min-length":"error","response-contains-header":"error","request-mime-type":{severity:"error",allowedValues:["application/json"]},"response-mime-type":{severity:"error",allowedValues:["application/json"]},"response-contains-property":"error","security-defined":"error","security-scopes-defined":"error","spec-strict-refs":"error","scalar-property-missing-example":"error","spec-components-invalid-map-name":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","spec-example-values":"error"},oas3_2Rules:{"array-parameter-serialization":"error","boolean-parameter-prefixes":"error","component-name-unique":"error","info-contact":"error","info-license":"error","info-license-strict":"error","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error","no-http-verbs-in-paths":"error","no-enum-type-mismatch":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-invalid-media-type-examples":"error","no-mixed-number-range-constraints":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-server-variables-empty-enum":"error","parameter-description":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","paths-kebab-case":"error","path-http-verbs-order":"error","path-params-defined":"error","path-segment-plural":"error","operation-summary":"error","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-4xx-problem-details-rfc7807":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-singular-tag":"error","required-string-property-missing-min-length":"error","response-contains-header":"error","request-mime-type":{severity:"error",allowedValues:["application/json"]},"response-mime-type":{severity:"error",allowedValues:["application/json"]},"response-contains-property":"error","security-defined":"error","security-scopes-defined":"error","spec-strict-refs":"error","scalar-property-missing-example":"error","spec-components-invalid-map-name":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","spec-no-invalid-tag-parents":"error","spec-no-invalid-encoding-combinations":"error","spec-discriminator-defaultMapping":"error","spec-example-values":"error","spec-querystring-parameters":"error"},async2Rules:{"channels-kebab-case":"error","info-contact":"error","info-license-strict":"error","no-channel-trailing-slash":"error","operation-operationId":"error","security-scopes-defined":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","no-required-schema-properties-undefined":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-schema-type-mismatch":"error"},async3Rules:{"channels-kebab-case":"error","info-contact":"error","info-license-strict":"error","no-channel-trailing-slash":"error","operation-operationId":"error","security-scopes-defined":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","no-required-schema-properties-undefined":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-schema-type-mismatch":"error"},arazzo1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"error"},openrpc1Rules:{"info-contact":"error","info-license":"error","no-unused-components":"error","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"},graphqlRules:{"no-unused-types":"error","type-description":"error"}},G$=YY;var WY={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"warn","no-duplicated-tag-names":"off","no-enum-type-mismatch":"warn","no-http-verbs-in-paths":"off","no-identical-paths":"warn","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-path-trailing-slash":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","operation-2xx-response":"warn","operation-4xx-response":"off","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"warn","operation-operationId-url-safe":"warn","operation-parameters-unique":"warn","operation-singular-tag":"off","operation-summary":"warn","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"warn","path-http-verbs-order":"off","path-not-include-query":"warn","path-params-defined":"off","path-parameters-defined":"warn","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"warn","security-scopes-defined":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_0Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"warn","no-duplicated-tag-names":"off","no-empty-servers":"warn","no-enum-type-mismatch":"warn","no-example-value-and-externalValue":"warn","no-http-verbs-in-paths":"off","no-identical-paths":"warn","no-invalid-media-type-examples":{severity:"warn",allowAdditionalProperties:!1},"no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-path-trailing-slash":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"warn","no-unused-components":"warn","nullable-type-sibling":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"warn","operation-operationId-url-safe":"warn","operation-parameters-unique":"warn","operation-singular-tag":"off","operation-summary":"warn","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"warn","path-http-verbs-order":"off","path-not-include-query":"warn","path-params-defined":"off","path-parameters-defined":"warn","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"warn","security-scopes-defined":"off","spec-components-invalid-map-name":"warn","spec-example-values":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_1Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"warn","no-duplicated-tag-names":"off","no-empty-servers":"warn","no-enum-type-mismatch":"warn","no-example-value-and-externalValue":"warn","no-http-verbs-in-paths":"off","no-identical-paths":"warn","no-invalid-media-type-examples":"warn","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-mixed-number-range-constraints":"off","no-path-trailing-slash":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"warn","no-unused-components":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"warn","operation-operationId-url-safe":"warn","operation-parameters-unique":"warn","operation-singular-tag":"off","operation-summary":"warn","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"warn","path-http-verbs-order":"off","path-not-include-query":"warn","path-params-defined":"off","path-parameters-defined":"warn","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"warn","security-scopes-defined":"off","spec-components-invalid-map-name":"warn","spec-example-values":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_2Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"warn","no-duplicated-tag-names":"off","no-empty-servers":"warn","no-enum-type-mismatch":"warn","no-http-verbs-in-paths":"off","no-identical-paths":"warn","no-invalid-media-type-examples":"warn","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-mixed-number-range-constraints":"off","no-path-trailing-slash":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"warn","no-unused-components":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"warn","operation-operationId-url-safe":"warn","operation-parameters-unique":"warn","operation-singular-tag":"off","operation-summary":"warn","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"warn","path-http-verbs-order":"off","path-not-include-query":"warn","path-params-defined":"off","path-parameters-defined":"warn","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"warn","security-scopes-defined":"off","spec-components-invalid-map-name":"warn","spec-discriminator-defaultMapping":"off","spec-example-values":"off","spec-no-invalid-encoding-combinations":"warn","spec-no-invalid-tag-parents":"warn","spec-querystring-parameters":"error","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},async2Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"off","no-channel-trailing-slash":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"warn","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","operation-operationId":"warn","security-scopes-defined":"off","tag-description":"warn","tags-alphabetical":"off"},async3Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"off","no-channel-trailing-slash":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"warn","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","operation-operationId":"warn","security-scopes-defined":"off","tag-description":"warn","tags-alphabetical":"off"},arazzo1Rules:{"criteria-unique":"off","no-criteria-xpath":"off","no-enum-type-mismatch":"warn","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"off","parameters-unique":"off","requestBody-replacements-unique":"off","sourceDescription-name-unique":"off","sourceDescription-type":"off","sourceDescriptions-not-empty":"off","spec-step-mutually-exclusive-fields":"warn","step-onFailure-unique":"off","step-onSuccess-unique":"off","stepId-unique":"error","workflow-dependsOn":"off","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"off","no-criteria-xpath":"off","no-enum-type-mismatch":"warn","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"off","parameters-unique":"off","requestBody-replacements-unique":"off","sourceDescription-name-unique":"off","sourceDescription-type":"off","sourceDescriptions-not-empty":"off","spec-step-mutually-exclusive-fields":"warn","step-onFailure-unique":"off","step-onSuccess-unique":"off","stepId-unique":"error","workflow-dependsOn":"off","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"off"},graphqlRules:{"no-unused-types":"off","type-description":"off"},openrpc1Rules:{"info-contact":"off","info-license":"off","no-unused-components":"off","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"}},Y$=WY;var QY={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"off","info-contact":"off","info-license":"error","info-license-strict":"error","no-ambiguous-paths":"error","no-duplicated-tag-names":"error","no-enum-type-mismatch":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-parameter-examples":"error","no-invalid-schema-examples":"error","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-description":"off","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"error","spec-strict-refs":"off","tag-description":"error","tags-alphabetical":"off"},oas3_0Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"error","info-license-strict":"error","no-ambiguous-paths":"error","no-duplicated-tag-names":"error","no-empty-servers":"error","no-enum-type-mismatch":"error","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":{severity:"error",allowAdditionalProperties:!1},"no-invalid-parameter-examples":"error","no-invalid-schema-examples":"error","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unused-components":"error","nullable-type-sibling":"error","operation-2xx-response":"error","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"error","operation-description":"off","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"error","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"off","tag-description":"error","tags-alphabetical":"off"},oas3_1Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"error","info-license-strict":"error","no-ambiguous-paths":"error","no-duplicated-tag-names":"error","no-empty-servers":"error","no-enum-type-mismatch":"error","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"error","no-invalid-parameter-examples":"error","no-invalid-schema-examples":"error","no-mixed-number-range-constraints":"error","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unused-components":"error","operation-2xx-response":"error","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"error","operation-description":"off","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"error","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"off","tag-description":"error","tags-alphabetical":"off"},oas3_2Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"error","info-license-strict":"error","no-ambiguous-paths":"error","no-duplicated-tag-names":"error","no-empty-servers":"error","no-enum-type-mismatch":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"error","no-invalid-parameter-examples":"error","no-invalid-schema-examples":"error","no-mixed-number-range-constraints":"error","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unused-components":"error","operation-2xx-response":"error","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"error","operation-description":"off","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"error","spec-components-invalid-map-name":"error","spec-discriminator-defaultMapping":"error","spec-example-values":"error","spec-no-invalid-encoding-combinations":"error","spec-no-invalid-tag-parents":"error","spec-querystring-parameters":"error","spec-strict-refs":"off","tag-description":"error","tags-alphabetical":"off"},async2Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"error","no-channel-trailing-slash":"off","no-duplicated-tag-names":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","operation-operationId":"error","security-scopes-defined":"error","tag-description":"error","tags-alphabetical":"off"},async3Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"error","no-channel-trailing-slash":"off","no-duplicated-tag-names":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","operation-operationId":"error","security-scopes-defined":"error","tag-description":"error","tags-alphabetical":"off"},arazzo1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"off"},openrpc1Rules:{"info-contact":"off","info-license":"error","no-unused-components":"error","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"},graphqlRules:{"no-unused-types":"error","type-description":"off"}},W$=QY;var JY={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"off","info-contact":"off","info-license":"warn","info-license-strict":"warn","no-ambiguous-paths":"warn","no-duplicated-tag-names":"warn","no-enum-type-mismatch":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-parameter-examples":"warn","no-invalid-schema-examples":"warn","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","operation-2xx-response":"warn","operation-4xx-response":"warn","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"warn","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_0Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"warn","info-license-strict":"warn","no-ambiguous-paths":"warn","no-duplicated-tag-names":"warn","no-empty-servers":"error","no-enum-type-mismatch":"error","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":{severity:"warn",allowAdditionalProperties:!1},"no-invalid-parameter-examples":"warn","no-invalid-schema-examples":"warn","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unused-components":"warn","nullable-type-sibling":"error","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"warn","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"warn","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_1Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"warn","info-license-strict":"warn","no-ambiguous-paths":"warn","no-duplicated-tag-names":"warn","no-empty-servers":"error","no-enum-type-mismatch":"error","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"warn","no-invalid-parameter-examples":"warn","no-invalid-schema-examples":"warn","no-mixed-number-range-constraints":"warn","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unused-components":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"warn","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"warn","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_2Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"warn","info-license-strict":"warn","no-ambiguous-paths":"warn","no-duplicated-tag-names":"warn","no-empty-servers":"error","no-enum-type-mismatch":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"warn","no-invalid-parameter-examples":"warn","no-invalid-schema-examples":"warn","no-mixed-number-range-constraints":"warn","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unused-components":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"warn","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","security-scopes-defined":"warn","spec-components-invalid-map-name":"error","spec-discriminator-defaultMapping":"warn","spec-example-values":"error","spec-no-invalid-encoding-combinations":"error","spec-no-invalid-tag-parents":"error","spec-querystring-parameters":"error","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},async2Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"warn","no-channel-trailing-slash":"off","no-duplicated-tag-names":"warn","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","operation-operationId":"warn","security-scopes-defined":"warn","tag-description":"warn","tags-alphabetical":"off"},async3Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"warn","no-channel-trailing-slash":"off","no-duplicated-tag-names":"warn","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","operation-operationId":"warn","security-scopes-defined":"warn","tag-description":"warn","tags-alphabetical":"off"},arazzo1Rules:{"criteria-unique":"warn","no-criteria-xpath":"off","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"warn","parameters-unique":"error","requestBody-replacements-unique":"warn","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"warn","step-onSuccess-unique":"warn","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"warn","no-criteria-xpath":"off","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"warn","parameters-unique":"error","requestBody-replacements-unique":"warn","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"warn","step-onSuccess-unique":"warn","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"off"},openrpc1Rules:{"info-license":"warn","no-unused-components":"warn","info-contact":"off","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"},graphqlRules:{"no-unused-types":"warn","type-description":"off"}},Q$=JY;var XY={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"off","no-duplicated-tag-names":"error","no-enum-type-mismatch":"off","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-path-trailing-slash":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","operation-2xx-response":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"off","operation-operationId-unique":"error","operation-operationId-url-safe":"off","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"off","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"off","security-scopes-defined":"off","spec-strict-refs":"error","tag-description":"off","tags-alphabetical":"off"},oas3_0Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"off","no-duplicated-tag-names":"error","no-empty-servers":"off","no-enum-type-mismatch":"off","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":{severity:"off",allowAdditionalProperties:!1},"no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-path-trailing-slash":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-server-example.com":"off","no-server-trailing-slash":"off","no-server-variables-empty-enum":"off","no-undefined-server-variable":"error","no-unused-components":"off","nullable-type-sibling":"error","operation-2xx-response":"off","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"off","operation-operationId-unique":"error","operation-operationId-url-safe":"off","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"off","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"off","security-scopes-defined":"off","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"error","tag-description":"off","tags-alphabetical":"off"},oas3_1Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"off","no-duplicated-tag-names":"error","no-empty-servers":"off","no-enum-type-mismatch":"off","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"off","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-mixed-number-range-constraints":"off","no-path-trailing-slash":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-server-example.com":"off","no-server-trailing-slash":"off","no-server-variables-empty-enum":"off","no-undefined-server-variable":"error","no-unused-components":"off","operation-2xx-response":"off","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"off","operation-operationId-unique":"error","operation-operationId-url-safe":"off","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"off","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"off","security-scopes-defined":"off","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"error","tag-description":"off","tags-alphabetical":"off"},oas3_2Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"off","no-duplicated-tag-names":"error","no-empty-servers":"off","no-enum-type-mismatch":"off","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"off","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-mixed-number-range-constraints":"off","no-path-trailing-slash":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-server-example.com":"off","no-server-trailing-slash":"off","no-server-variables-empty-enum":"off","no-undefined-server-variable":"error","no-unused-components":"off","operation-2xx-response":"off","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"off","operation-operationId-unique":"error","operation-operationId-url-safe":"off","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"off","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"off","security-scopes-defined":"off","spec-components-invalid-map-name":"error","spec-discriminator-defaultMapping":"error","spec-example-values":"error","spec-no-invalid-encoding-combinations":"error","spec-no-invalid-tag-parents":"error","spec-querystring-parameters":"error","spec-strict-refs":"error","tag-description":"off","tags-alphabetical":"off"},async2Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"off","no-channel-trailing-slash":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"off","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","operation-operationId":"off","security-scopes-defined":"off","tag-description":"off","tags-alphabetical":"off"},async3Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"off","no-channel-trailing-slash":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"off","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","operation-operationId":"off","security-scopes-defined":"off","tag-description":"off","tags-alphabetical":"off"},arazzo1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-enum-type-mismatch":"off","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-enum-type-mismatch":"off","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"off"},openrpc1Rules:{"info-contact":"off","info-license":"off","no-unused-components":"off","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"},graphqlRules:{"no-unused-types":"off","type-description":"off"}},J$=XY;var ZY={recommended:Q$,"recommended-strict":W$,minimal:Y$,all:G$,spec:J$},Vy={id:"",rules:{oas3:D$,oas2:l$,async2:Zw,async3:o_,arazzo1:Yw,overlay1:H$,openrpc1:V$,graphql:h_},preprocessors:{oas3:L$,oas2:u$,async2:e_,async3:i_,arazzo1:Ww,overlay1:K$,openrpc1:B$},decorators:{oas3:mw,oas2:pw,async2:sw,async3:aw,arazzo1:iw,overlay1:yw,openrpc1:hw},configs:ZY};import*as La from"node:fs";import*as bA from"node:path";import*as Al from"node:fs";import*as Tl from"node:path";var eW=[".graphql",".gql"];function Ji(e){let t=e.toLowerCase();return eW.some(r=>t.endsWith(r))}function Bn(e,t){return e+"::"+t}function X$(){return new Promise(e=>{setTimeout(e)})}var Hn=class{absoluteRef;body;mimeType;constructor(t,r,n){this.absoluteRef=t,this.body=r,this.mimeType=n}#e;#t;getAst(t){return this.#e===void 0&&(this.#e=t(this.body,{filename:this.absoluteRef})??void 0,this.#e&&this.#e.kind===0&&this.#e.value===""&&this.#e.startPosition!==1&&(this.#e.startPosition=1,this.#e.endPosition=1)),this.#e}getLines(){return this.#t===void 0&&(this.#t=this.body.split(/\r\n|[\n\r]/g)),this.#t}},$l=class e extends Error{originalError;constructor(t){super(t.message),this.originalError=t,Object.setPrototypeOf(this,e.prototype)}};function ko(e,t){let r=new Hn(t,e);if(Ji(t))return{source:r,parsed:e};try{return{source:r,parsed:to(e,{filename:t})}}catch(n){throw new Ur(n,r)}}var Mt=class{config;cache=new Map;constructor(t={http:{headers:[]}}){this.config=t}getFiles(){return new Set(Array.from(this.cache.keys()))}resolveExternalRef(t,r){return pe(r)?r:t&&pe(t)?new URL(r,t).href:Tl.resolve(t?Tl.dirname(t):process.cwd(),r)}async loadExternalRef(t){try{if(pe(t)){let{body:r,mimeType:n}=await td(t,this.config.http);return new Hn(t,r,n)}else{if(Al.lstatSync(t).isDirectory())throw new Error(`Expected a file but received a folder at ${t}.`);let r=await Al.promises.readFile(t,"utf-8");return new Hn(t,r.replace(/\r\n/g,`
114
114
  `))}}catch(r){throw r.message=r.message.replace(", lstat",""),new $l(r)}}parseDocument(t,r=!1){if(Ji(t.absoluteRef))return{source:t,parsed:t.body};if(!Ma(t.absoluteRef)&&!t.mimeType?.match(/(json|yaml|openapi)/)&&!r)return{source:t,parsed:t.body};try{return{source:t,parsed:to(t.body,{filename:t.absoluteRef})}}catch(n){throw new Ur(n,t)}}async resolveDocument(t,r,n=!1){let o=this.resolveExternalRef(t,r),i=this.cache.get(o);if(i)return i;let s=this.loadExternalRef(o).then(a=>this.parseDocument(a,n));return this.cache.set(o,s),s}};function Z$(e,t){return{prev:e,node:t}}function tW(e,t){for(;e;){if(e.node===t)return!0;e=e.prev}return!1}var Da={name:"unknown",properties:{}},rW={name:"scalar",properties:{}};async function or(e){let{rootDocument:t,externalRefResolver:r,rootType:n}=e,o=new Map,i=new Set,s=[];c(t.parsed,t,"#/",n);let a;do a=await Promise.all(s);while(s.length!==a.length);return o;function c(p,l,u,m){let d=l.source.absoluteRef,f=new Map;h(p,m,d+u);function h(g,v,b){if(!O(g)&&!Array.isArray(g))return;let S=`${v.name}::${b}`;if(i.has(S))return;if(i.add(S),Array.isArray(g)){let T=v.items;if(T===void 0&&v!==Da&&v!==cr)return;let A=typeof T=="function";for(let R=0;R<g.length;R++){let P=A?T(g[R],Gr(b,R)):T;if(P===void 0&&v!==Da&&v!==cr)continue;let J=P?.directResolveAs?{$ref:g[R]}:g[R];P=P?.directResolveAs||P,h(J,pr(P)?P:Da,Gr(b,R))}return}let[w,_]=Object.entries(g).find(([T])=>T==="$anchor")||[];_&&f.set(`#${_}`,g);for(let T of Object.keys(g)){let A=g[T],R=Ft(v.properties,T);R===void 0&&(R=v.additionalProperties),typeof R=="function"&&(R=R(A,T)),R===void 0&&(R=Da),v.extensionsPrefix&&T.startsWith(v.extensionsPrefix)&&R===Da&&(R=cr),!pr(R)&&R?.directResolveAs&&(R=R.directResolveAs,A={$ref:A}),R&&R.name===void 0&&R.resolvable!==!1&&(R=rW),!(!pr(R)||!(O(A)||Array.isArray(A)))&&h(A,R,Gr(b,Rr(T)))}if(F(g)){let T=y(l,g,{prev:null,node:g}).then(A=>{A.resolved&&c(A.node,A.document,A.nodePointer,v)});s.push(T)}if(Ba(g)){let T=y(l,{$ref:g.externalValue},{prev:null,node:g}).then(A=>{A.resolved&&c(A.node,A.document,A.nodePointer,v)});s.push(T)}}async function y(g,v,b){if(tW(b.prev,v))throw new Error("Self-referencing circular pointer");if(Ig(v.$ref)){await X$();let H={resolved:!0,isRemote:!1,node:f.get(v.$ref),document:g,nodePointer:v.$ref},U=Bn(g.source.absoluteRef,v.$ref);return o.set(U,H),H}let{uri:S,pointer:w}=mn(v.$ref),_=S!==null&&r.resolveExternalRef(g.source.absoluteRef,S)!==g.source.absoluteRef,T;try{T=_?await r.resolveDocument(g.source.absoluteRef,S):g}catch(H){let U={resolved:!1,isRemote:_,document:void 0,error:H},E=Bn(g.source.absoluteRef,v.$ref);return o.set(E,U),U}let A={resolved:!0,document:T,isRemote:_,node:g.parsed,nodePointer:"#/"},R=T.parsed,P=w;for(let H of P)if(O(R)&&R[H]!==void 0)R=R[H],A.nodePointer=Gr(A.nodePointer,Rr(H));else if(Array.isArray(R)&&R[+H]!==void 0)R=R[+H],A.nodePointer=Gr(A.nodePointer,Rr(H));else if(F(R))if(A=await y(T,R,Z$(b,R)),T=A.document||T,O(A.node))R=A.node[H],A.nodePointer=Gr(A.nodePointer,Rr(H));else if(Array.isArray(A.node))R=A.node[+H],A.nodePointer=Gr(A.nodePointer,Rr(H));else{R=void 0;break}else{R=void 0;break}A.node=R,A.document=T;let J=Bn(g.source.absoluteRef,v.$ref);return A.document&&F(R)&&(A=await y(A.document,R,Z$(b,R))),o.set(J,A),{...A}}}}import*as Xy from"node:fs";import lW from"node:module";import*as Pt from"node:path";import*as yA from"node:url";var nW={Root:"DefinitionRoot",ServerVariablesMap:"ServerVariableMap",Paths:["PathMap","PathsMap"],CallbacksMap:"CallbackMap",MediaTypesMap:"MediaTypeMap",ExamplesMap:"ExampleMap",EncodingMap:"EncodingsMap",HeadersMap:"HeaderMap",LinksMap:"LinkMap",OAuth2Flows:"SecuritySchemeFlows",Responses:"ResponsesMap"};function Vt(e,t){let r={};r.any={enter:[],leave:[]};for(let s of Object.keys(t))r[s]={enter:[],leave:[]};r.ref={enter:[],leave:[]};for(let{ruleId:s,severity:a,message:c,visitor:p}of e)i({ruleId:s,severity:a,message:c},p,null);for(let s of Object.keys(r))r[s].enter.sort((a,c)=>c.depth-a.depth),r[s].leave.sort((a,c)=>a.depth-c.depth);return r;function n(s,a,c,p,l=[]){if(l.includes(a))return;l=[...l,a];let u=new Set;for(let d of Object.values(a.properties)){if(d===c){m(s,l);continue}O(d)&&d.name!==void 0&&u.add(d)}a.additionalProperties&&typeof a.additionalProperties!="function"&&(a.additionalProperties===c?m(s,l):a.additionalProperties.name!==void 0&&u.add(a.additionalProperties)),a.items&&typeof a.items!="function"&&(a.items===c?m(s,l):a.items.name!==void 0&&u.add(a.items)),a.extensionsPrefix&&u.add(cr);for(let d of Array.from(u.values()))n(s,d,c,p,l);function m(d,f){for(let h of f.slice(1))r[h.name]=r[h.name]||{enter:[],leave:[]},r[h.name].enter.push({...d,visit:()=>{},depth:0,context:{isSkippedLevel:!0,seen:new Set,parent:p}})}}function o(s,a){if(Array.isArray(a)){let c=a.find(p=>s[p])||void 0;return c&&s[c]}return s[a]}function i(s,a,c,p=0){let l=Object.keys(t);if(p===0)l.push("any"),l.push("ref");else{if(a.any)throw new Error("any() is allowed only on top level");if(a.ref)throw new Error("ref() is allowed only on top level")}for(let u of l){let m=a[u]||o(a,nW[u]),d=r[u];if(!m)continue;let f,h,y,g=O(m);if(u==="ref"&&g&&m.skip)throw new Error("ref() visitor does not support skip");typeof m=="function"?f=m:g&&(f=m.enter,h=m.leave,y=m.skip);let v=(f?1:0)+(h?1:0)+(y?1:0),b=g&&Object.keys(m).length>v,S={activatedOn:null,type:t[u],parent:c,isSkippedLevel:!1};if(b&&i(s,m,S,p+1),c&&n(s,c.type,t[u],c),f||g){if(f&&typeof f!="function")throw new Error("DEV: should be function");d.enter.push({...s,visit:f||(()=>{}),skip:y,depth:p,context:S})}if(h){if(typeof h!="function")throw new Error("DEV: should be function");d.leave.push({...s,visit:h,depth:p,context:S})}}}}import oW from"node:path";var me=(e,t)=>{if(t)for(let r of Object.keys(t))O(e[r])&&typeof t[r]=="string"?e[r]={...e[r],severity:t[r]}:e[r]=t[r]};function _e(e,t){if(t)for(let r of Object.keys(t))e.hasOwnProperty(r)&&(O(e[r])&&typeof t[r]=="string"?e[r]={...e[r],severity:t[r]}:e[r]=t[r])}function eA(e){if(e.indexOf("/")>-1){let[t,r]=e.split("/");return{pluginId:t,configName:r}}else return{pluginId:"",configName:e}}function Le(e,t){if(!t)return e;let r={};for(let n of Object.keys(e))r[`${t}/${n}`]=e[n];return r}function Rl(e){let t={rules:{},oas2Rules:{},oas3_0Rules:{},oas3_1Rules:{},oas3_2Rules:{},async2Rules:{},async3Rules:{},arazzo1Rules:{},arazzo1_1Rules:{},overlay1Rules:{},openrpc1Rules:{},graphqlRules:{},preprocessors:{},oas2Preprocessors:{},oas3_0Preprocessors:{},oas3_1Preprocessors:{},oas3_2Preprocessors:{},async2Preprocessors:{},async3Preprocessors:{},arazzo1Preprocessors:{},arazzo1_1Preprocessors:{},overlay1Preprocessors:{},openrpc1Preprocessors:{},decorators:{},oas2Decorators:{},oas3_0Decorators:{},oas3_1Decorators:{},oas3_2Decorators:{},async2Decorators:{},async3Decorators:{},arazzo1Decorators:{},arazzo1_1Decorators:{},overlay1Decorators:{},openrpc1Decorators:{}};for(let r of e){if(O(r)&&"extends"in r&&r.extends!==void 0)throw new Error(`'extends' is not supported in shared configs yet:
115
- ${JSON.stringify(r,null,2)}`);me(t.rules,r.rules),me(t.oas2Rules,r.oas2Rules),_e(t.oas2Rules,r.rules),me(t.oas3_0Rules,r.oas3_0Rules),_e(t.oas3_0Rules,r.rules),me(t.oas3_1Rules,r.oas3_1Rules),_e(t.oas3_1Rules,r.rules),me(t.oas3_2Rules,r.oas3_2Rules),_e(t.oas3_2Rules,r.rules),me(t.async2Rules,r.async2Rules),_e(t.async2Rules,r.rules),me(t.async3Rules,r.async3Rules),_e(t.async3Rules,r.rules),me(t.arazzo1Rules,r.arazzo1Rules),_e(t.arazzo1Rules,r.rules),me(t.arazzo1_1Rules,r.arazzo1_1Rules),_e(t.arazzo1_1Rules,r.rules),me(t.overlay1Rules,r.overlay1Rules),_e(t.overlay1Rules,r.rules),me(t.openrpc1Rules,r.openrpc1Rules),_e(t.openrpc1Rules,r.rules),me(t.graphqlRules,r.graphqlRules),_e(t.graphqlRules,r.rules),me(t.preprocessors,r.preprocessors),me(t.oas2Preprocessors,r.oas2Preprocessors),_e(t.oas2Preprocessors,r.preprocessors),me(t.oas3_0Preprocessors,r.oas3_0Preprocessors),_e(t.oas3_0Preprocessors,r.preprocessors),me(t.oas3_1Preprocessors,r.oas3_1Preprocessors),_e(t.oas3_1Preprocessors,r.preprocessors),me(t.oas3_2Preprocessors,r.oas3_2Preprocessors),_e(t.oas3_2Preprocessors,r.preprocessors),me(t.async2Preprocessors,r.async2Preprocessors),_e(t.async2Preprocessors,r.preprocessors),me(t.async3Preprocessors,r.async3Preprocessors),_e(t.async3Preprocessors,r.preprocessors),me(t.arazzo1Preprocessors,r.arazzo1Preprocessors),_e(t.arazzo1Preprocessors,r.preprocessors),me(t.arazzo1_1Preprocessors,r.arazzo1_1Preprocessors),_e(t.arazzo1_1Preprocessors,r.preprocessors),me(t.overlay1Preprocessors,r.overlay1Preprocessors),_e(t.overlay1Preprocessors,r.preprocessors),me(t.openrpc1Preprocessors,r.openrpc1Preprocessors),_e(t.openrpc1Preprocessors,r.preprocessors),me(t.decorators,r.decorators),me(t.oas2Decorators,r.oas2Decorators),_e(t.oas2Decorators,r.decorators),me(t.oas3_0Decorators,r.oas3_0Decorators),_e(t.oas3_0Decorators,r.decorators),me(t.oas3_1Decorators,r.oas3_1Decorators),_e(t.oas3_1Decorators,r.decorators),me(t.oas3_2Decorators,r.oas3_2Decorators),_e(t.oas3_2Decorators,r.decorators),me(t.async2Decorators,r.async2Decorators),_e(t.async2Decorators,r.decorators),me(t.async3Decorators,r.async3Decorators),_e(t.async3Decorators,r.decorators),me(t.arazzo1Decorators,r.arazzo1Decorators),_e(t.arazzo1Decorators,r.decorators),me(t.arazzo1_1Decorators,r.arazzo1_1Decorators),_e(t.arazzo1_1Decorators,r.decorators),me(t.overlay1Decorators,r.overlay1Decorators),_e(t.overlay1Decorators,r.decorators),me(t.openrpc1Decorators,r.openrpc1Decorators),_e(t.openrpc1Decorators,r.decorators)}return t}var By=class extends Error{};function tA(e){return new Map(JSON.parse(JSON.stringify([...e])))}function Hy(e){return O(e)&&"id"in e}function rA(e){return typeof e=="function"}function Ky({node:e,ctx:t,plugins:r}){if(!e.extends)return e;let n=(e.extends||[]).filter(Ge).map(o=>{if(!pe(o)&&!oW.extname(o))return nA(o,r);let i=t.resolve({$ref:o});return i.location&&i.node!==void 0?i.node:null}).filter(Ge);return Rl([...n.map(o=>Ky({node:o,ctx:t,plugins:r})),{...e,extends:void 0}])}function Ol(e,t){if(O(e)&&Array.isArray(e.plugins)){let{plugins:r,rootConfigDir:n}=t.getVisitorData();r.push(...e.plugins.map(o=>Il(o,t.location.source.absoluteRef.replace(/^file:\/\//,""),n)))}}var oA=Vt([{severity:"error",ruleId:np,visitor:{ref:{},ConfigGovernance:{leave(e,t){Ol(e,t)}},ConfigApisProperties:{leave(e,t){Ol(e,t)}},[et.ScorecardClassicLevel]:{leave(e,t){Ol(e,t)}},ConfigRoot:{leave(e,t){Ol(e,t)}}}}],En);function kl(e,t){if(O(e)&&e.extends){let{plugins:r}=t.getVisitorData(),n=Ky({node:e,ctx:t,plugins:r});Object.assign(e,n),delete e.extends}}var iA=Vt([{severity:"error",ruleId:rp,visitor:{ref:{leave(e,t,r){ss(e,r,t)}},ConfigGovernance:{leave(e,t){kl(e,t)}},ConfigApisProperties:{leave(e,t){kl(e,t)}},[et.ScorecardClassicLevel]:{leave(e,t){kl(e,t)}},ConfigRoot:{leave(e,t){kl(e,t)}}}}],En);function Gy(e,t){return{prev:e,value:t}}function Yy(e){return e?.prev??null}function iW(e){let t={};for(;e.parent;)t[e.parent.type.name]=e.parent.activatedOn?.value.node,e=e.parent;return t}function sW(e){let t={};for(;e.parent;)e.parent.activatedOn?.value.location&&(t[e.parent.type.name]=e.parent.activatedOn?.value.location),e=e.parent;return t}function Bt(e){let{document:t,rootType:r,normalizedVisitors:n,resolvedRefMap:o,ctx:i}=e,s={},a=new Set,c=n.any.enter,p=n.any.leave,l={},u={};for(let d of Object.keys(n))d==="any"||d==="ref"||(l[d]=c.concat(n[d]?.enter||[]),u[d]=(n[d]?.leave||[]).concat(p));m(t.parsed,r,new sr(t.source,"#/"),void 0,"");function m(d,f,h,y,g){let v=(U,E=S.source.absoluteRef)=>{if(!F(U))return{location:h,node:U};let $=Bn(E,U.$ref),oe=o.get($);if(!oe)return{location:void 0,node:void 0};let{resolved:X,node:le,document:N,nodePointer:L,error:ve}=oe;return{location:X?new sr(N.source,L):ve instanceof Ur?new sr(ve.source,""):void 0,node:le,error:ve}},b=h,S=h,w=F(d),{node:_,location:T,error:A}=v(d),R=new Set;if(w){let U=n.ref.enter;for(let{visit:E,ruleId:$,severity:oe,message:X,context:le}of U)R.add(le),E(d,{report:L=>J($,oe,X,L),resolve:v,rawNode:d,rawLocation:b,location:h,type:f,parent:y,key:g,parentLocations:{},specVersion:i.specVersion,config:i.config,getVisitorData:()=>H($)},{node:_,location:T,error:A}),T?.source.absoluteRef&&i.refTypes&&i.refTypes.set(T?.source.absoluteRef,f)}if(_!==void 0&&T&&f.name!=="scalar"){S=T;let U=s[f.name]?.has?.(_),E=!1,$=l[f.name]||c.concat(n[f.name]?.enter||[]),oe=[],X=`${S.absolutePointer}${S.pointer}`;for(let{context:N,visit:L,skip:ve,ruleId:Kt,severity:ue,message:Et}of $){if(a.has(X))break;if(N.isSkippedLevel)N.parent.activatedOn&&!N.parent.activatedOn.value.nextLevelTypeActivated&&!N.seen.has(d)&&(N.seen.add(d),E=!0,oe.push(N));else if(N.parent&&N.parent.activatedOn&&N.activatedOn?.value.withParentNode!==N.parent.activatedOn.value.node&&N.parent.activatedOn.value.nextLevelTypeActivated?.value!==f||!N.parent&&!U){oe.push(N);let Z={node:_,location:T,nextLevelTypeActivated:null,withParentNode:N.parent?.activatedOn?.value.node,skipped:(N.parent?.activatedOn?.value.skipped||ve?.(_,g,{location:h,rawLocation:b,resolve:v,rawNode:d}))??!1};N.activatedOn=Gy(N.activatedOn,Z);let Er=N.parent;for(;Er;)Er.activatedOn.value.nextLevelTypeActivated=Gy(Er.activatedOn.value.nextLevelTypeActivated,f),Er=Er.parent;Z.skipped||(E=!0,R.add(N),P(L,_,d,N,Kt,ue,Et))}}if(E||!U){if(s[f.name]=s[f.name]||new Set,s[f.name].add(_),Array.isArray(_)){let N=f.items;if(N!==void 0){let L=typeof N=="function";for(let ve=0;ve<_.length;ve++){let Kt=T.child([ve]),ue=L?N(_[ve],Kt.absolutePointer):N,Et=_[ve];ue?.directResolveAs&&(ue=ue.directResolveAs,Et={$ref:Et}),pr(ue)&&m(Et,ue,Kt,_,ve)}}}else if(O(_)){let N=Object.keys(f.properties);f.additionalProperties?N.push(...Object.keys(_).filter(L=>!N.includes(L))):f.extensionsPrefix&&N.push(...Object.keys(_).filter(L=>L.startsWith(f.extensionsPrefix))),w&&N.push(...Object.keys(d).filter(L=>L!=="$ref"&&!N.includes(L)));for(let L of N){let ve=_[L],Kt=T;ve===void 0&&(ve=d[L],Kt=h);let ue=Ft(f.properties,L);if(ue===void 0&&(ue=f.additionalProperties),typeof ue=="function"&&(ue=ue(ve,L)),ue===void 0&&f.extensionsPrefix&&L.startsWith(f.extensionsPrefix)&&(ue=cr),!pr(ue)&&ue?.directResolveAs&&(ue=ue.directResolveAs,ve={$ref:ve}),ue&&ue.name===void 0&&ue.resolvable!==!1&&(ue={name:"scalar",properties:{}}),F(d[L])&&ue?.name==="scalar"){m(d[L],ue,h.child([L]),d,L);continue}!pr(ue)||ue.name==="scalar"&&!F(ve)||m(ve,ue,Kt.child([L]),_,L)}}}let le=u[f.name]||(n[f.name]?.leave||[]).concat(p);for(let N of oe.reverse())if(N.isSkippedLevel)N.seen.delete(_);else if(N.activatedOn=Yy(N.activatedOn),N.parent){let L=N.parent;for(;L;)L.activatedOn.value.nextLevelTypeActivated=Yy(L.activatedOn.value.nextLevelTypeActivated),L=L.parent}for(let{context:N,visit:L,ruleId:ve,severity:Kt,message:ue}of le)!N.isSkippedLevel&&R.has(N)&&P(L,_,d,N,ve,Kt,ue)}if(S=h,w){let U=n.ref.leave;for(let{visit:E,ruleId:$,severity:oe,context:X,message:le}of U)R.has(X)&&E(d,{report:L=>J($,oe,le,L),resolve:v,rawNode:d,rawLocation:b,location:h,type:f,parent:y,key:g,parentLocations:{},specVersion:i.specVersion,config:i.config,getVisitorData:()=>H($)},{node:_,location:T,error:A})}function P(U,E,$,oe,X,le,N){U(E,{report:ve=>J(X,le,N,ve),resolve:v,rawNode:$,location:S,rawLocation:b,type:f,parent:y,key:g,parentLocations:sW(oe),specVersion:i.specVersion,config:i.config,ignoreNextVisitorsOnNode:()=>{a.add(`${S.absolutePointer}${S.pointer}`)},getVisitorData:()=>H(X)},iW(oe),oe)}function J(U,E,$,oe){let le=(oe.location?Array.isArray(oe.location)?oe.location:[oe.location]:[{...S,reportOnKey:!1}]).map(L=>({...S,reportOnKey:!1,...L})),N=oe.forceSeverity||E;N!=="off"&&i.problems.push({ruleId:oe.ruleId||U,severity:N,...oe,message:$?$.replace("{{message}}",oe.message):oe.message,suggest:oe.suggest||[],location:le})}function H(U){return i.visitorsData[U]=i.visitorsData[U]||{},i.visitorsData[U]}}}function sA(e){return e.trim().split(/\s+/).map(t=>t.replace(/^[a-z]/,r=>r.toUpperCase())).join("")}function Wy(e,t){switch(t){case"oas3":switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";case"Response":return"responses";case"Example":return"examples";case"RequestBody":return"requestBodies";case"Header":return"headers";case"SecuritySchema":return"securitySchemes";case"Link":return"links";case"Callback":return"callbacks";case"MediaTypesMap":return"mediaTypes";default:return null}case"oas2":switch(e){case"Schema":return"definitions";case"Parameter":return"parameters";case"Response":return"responses";default:return null}case"async2":switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";default:return null}case"async3":switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";default:return null}case"arazzo1":switch(e){case"Root.workflows_items.parameters_items":case"Root.workflows_items.steps_items.parameters_items":return"parameters";default:return null}case"overlay1":return null;case"openrpc1":switch(e){case"ContentDescriptor":return"contentDescriptors";case"Schema":return"schemas";case"Example":return"examples";case"Link":return"links";case"ErrorObject":return"errors";case"ExamplePairing":return"examplePairingObjects";case"Tag":return"tags";default:return null}default:return null}}function aA({version:e,dereference:t,rootDocument:r,resolvedRefMap:n,keepUrlRefs:o,componentRenamingConflicts:i="warn",componentNamesStrategy:s="basename"}){let a,c,p=new Map,l=Wy("Schema",e),u={ref:{leave(v,b,S){if(!S.location||S.node===void 0){xo(S,b.report,b.location);return}if(S.location.source===r.source&&S.location.source===b.location.source&&b.type.name!=="scalar"&&!t){mn(v.$ref).uri!==null&&v.$ref!==S.location.pointer&&(v.$ref=S.location.pointer);return}if(o&&pe(v.$ref))return;let w=Wy(b.type.name,e);w?t?(d(w,S,b),ss(v,S,b)):(v.$ref=d(w,S,b),m(v,S,b)):ss(v,S,b)}},Example:{leave(v,b){if(Ba(v)&&v.value===void 0){let S=b.resolve({$ref:v.externalValue});if(!S.location||S.node===void 0){xo(S,b.report,b.location);return}if(o&&pe(v.externalValue))return;v.value=b.resolve({$ref:v.externalValue}).node,delete v.externalValue}}},Root:{enter(v,b){c=b.location,e==="oas3"?a=v.components=v.components||{}:e==="oas2"?a=v:e==="async2"?a=v.components=v.components||{}:e==="async3"?a=v.components=v.components||{}:e==="arazzo1"?a=v.components=v.components||{}:e==="openrpc1"&&(a=v.components=v.components||{})}}};e==="oas3"&&(u.Discriminator={leave(v,b){if(typeof v.defaultMapping!="string"||!Or(v.defaultMapping))return;let S=b.resolve({$ref:v.defaultMapping});if(!S.location||S.node===void 0){xo(S,b.report,b.location.child("defaultMapping"));return}v.defaultMapping=d(l,S,b)},DiscriminatorMapping:{leave(v,b){for(let S of Object.keys(v)){let w=v[S];if(!Or(w))continue;let _=b.resolve({$ref:w});if(!_.location||_.node===void 0){xo(_,b.report,b.location.child(S));return}v[S]=d(l,_,b)}}}});function m(v,b,S){let w=Bn(S.location.source.absoluteRef,v.$ref);n.set(w,{document:r,isRemote:!1,node:b.node,nodePointer:v.$ref,resolved:!0})}function d(v,b,S){a[v]=a[v]||{};let w=g(b,v,S);return a[v][w]=b.node,e==="oas3"||e==="async2"||e==="async3"||e==="openrpc1"?`#/components/${v}/${w}`:`#/${v}/${w}`}function f(v,b,S){return F(v)&&S.resolve(v,c.absolutePointer).location?.absolutePointer===b.location.absolutePointer?!0:Ko(v,b.node)}function h(v,b,S){let{node:w}=v,_=O(w)&&De(w.title)?w.title.trim():"",T=sA(_).replace(new RegExp(`[^${vc}]`,"g"),"-"),A=v.location.child("title");return _===""?{key:T,problem:{message:"Schema must define a `title` when using `--component-names-strategy title`.",location:v.location,forceSeverity:"error"}}:b[T]&&!f(b[T],v,S)?{key:T,problem:{message:`Title "${_}" maps to component name \`${T}\`, already used by another schema. Rename one of the titles.`,location:A,from:p.get(T),forceSeverity:i}}:{key:T}}function y(v,b,S){let w=Og(v.location.pointer)||kg(v.location.source.absoluteRef),_=w;for(let T=2;b[_]&&!f(b[_],v,S);T++)_=`${w}-${T}`;return{name:_,prevName:w}}function g(v,b,S){let w=a[b];if(s==="title"&&b===l){let{key:A,problem:R}=h(v,w,S);if(!R)return p.set(A,v.location.child("title")),A;let{name:P}=y(v,w,S);return w[P]||(S.report(R),p.set(P,v.location)),P}let{name:_,prevName:T}=y(v,w,S);return!w[_]&&T!==_&&S.report({message:`Two schemas are referenced with the same name but different content. Renamed ${T} to ${_}.`,location:S.location,forceSeverity:i}),_}return u}async function Qy(e){let{document:t,config:r,types:n,externalRefResolver:o,dereference:i=!1,removeUnusedComponents:s=!1,keepUrlRefs:a=!1,componentRenamingConflicts:c,componentNamesStrategy:p="basename"}=e,l=sn(t.parsed),u=aa(l),m=r.getRulesForSpecVersion(u),d=Qr(r.extendTypes(n,l),r),f=Mo(m,r,"preprocessors",l),h=Mo(m,r,"decorators",l),y={problems:[],specVersion:l,config:r,refTypes:new Map,visitorsData:{}},g=await or({rootDocument:t,rootType:d.Root,externalRefResolver:o});f.length>0&&(Bt({document:t,rootType:d.Root,normalizedVisitors:Vt(f,d),resolvedRefMap:g,ctx:y}),g=await or({rootDocument:t,rootType:d.Root,externalRefResolver:o}));let v=Vt([{severity:"error",ruleId:"bundler",visitor:aA({version:u,dereference:i,rootDocument:t,resolvedRefMap:g,keepUrlRefs:a,componentRenamingConflicts:c,componentNamesStrategy:p})},...h.filter(b=>b.ruleId!=="remove-unused-components")],d);if(Bt({document:t,rootType:d.Root,normalizedVisitors:v,resolvedRefMap:g,ctx:y}),s||r.getDecoratorSettings("remove-unused-components",l).severity!=="off"){let b=await or({rootDocument:t,rootType:d.Root,externalRefResolver:o}),S=Vt([{severity:"error",ruleId:"remove-unused-components",visitor:u==="oas2"?bp({}):vp({})}],d);Bt({document:t,rootType:d.Root,normalizedVisitors:S,resolvedRefMap:b,ctx:y})}return{bundle:t,problems:y.problems.map(b=>r.addProblemToIgnore(b)),fileDependencies:o.getFiles(),rootType:d.Root,refTypes:y.refTypes,visitorsData:y.visitorsData}}function cA(e,t,r){let n={plugins:[],rootConfigDir:r},o={problems:[],specVersion:"config",refTypes:new Map,visitorsData:{[np]:n}};return Bt({document:e,rootType:En.ConfigRoot,normalizedVisitors:oA,resolvedRefMap:t,ctx:o}),n.plugins}function pA(e,t,r){let n={plugins:r},o={problems:[],specVersion:"config",refTypes:new Map,visitorsData:{[rp]:n}};return Bt({document:e,rootType:En.ConfigRoot,normalizedVisitors:iA,resolvedRefMap:t,ctx:o}),e.parsed??{}}async function aW(e){let{ref:t,doc:r,externalRefResolver:n=new Mt(e.config.resolve),base:o=null}=e;if(!(t||r))throw new Error(`Document or reference is required.
116
- `);let i=r===void 0?await n.resolveDocument(o,t,!0):r;if(i instanceof Error)throw i;return e.collectSpecData?.(i),Qy({document:i,...e,externalRefResolver:n,types:oo(sn(i.parsed))})}function Cl(e){return!De(e)}import*as lA from"node:url";var Jy=new Map,cW="v",pW=0;function uA(e){return Jy.has(e)}function dA(e){return Jy.get(e)}function fA(e,t){Jy.set(e,t)}async function mA(e){let t=lA.pathToFileURL(e);return t.searchParams.set(cW,String(pW)),import(t.href)}async function Zy({rawConfigDocument:e,configPath:t,externalRefResolver:r,customExtends:n,skipPluginEval:o}){let i=e===void 0?JS:e.parsed;if(n!==void 0&&O(i)&&(i.extends=n),O(i)&&(i?.extends?.some(Cl)||i?.scorecardClassic?.levels?.some(d=>d?.extends?.some(Cl))||i?.scorecard?.levels?.some(d=>d?.extends?.some(Cl))))throw new Error("Configuration format not detected in extends: values must be strings.");let s=e??{source:new Hn(t??"",JSON.stringify(i)),parsed:i},a=await or({rootDocument:s,rootType:En.ConfigRoot,externalRefResolver:r??new Mt(op(i?.resolve))}),c=[],p,l="";Je?p=[...(i?.plugins||[]).filter(f=>!De(f)),Vy]:(l=Pt.dirname(t??""),c=cA(s,a,l),p=[...await gA(c.map(f=>hA(f)?f.absolutePath:f),l,o),Vy]);let u=pA(s,tA(a),p);u.apis&&(u.apis=Object.fromEntries(Object.entries(u.apis).map(([d,f])=>{let h=Rl([u,f]);return[d,{...f,...h}]})));let m=c.length?c.map(d=>hA(d)&&d.isModule?d.rawPath:d.absolutePath&&Pt.relative(l,d.absolutePath)).filter(Lt):void 0;return{resolvedConfig:{...u,plugins:m},resolvedRefMap:a,plugins:p}}function uW(e){for(let t of ZS){let r=Pt.resolve(e,t);if(Xy.existsSync(r))return t}}function hA(e){return"isModule"in e}var Il=(e,t,r)=>{if(!De(e))return e;let n=Pt.resolve(Pt.dirname(t),e);if(Xy.existsSync(n))return{absolutePath:n,rawPath:e,isModule:!1};try{return{absolutePath:lW.createRequire(import.meta.url??__dirname).resolve(e,{paths:[r,import.meta.url?Pt.dirname(yA.fileURLToPath(import.meta.url)):__dirname]}),isModule:!0,rawPath:e}}catch{throw new Error(`Plugin "${e}" not found.`)}};async function gA(e,t,r=!1){if(!e)return[];let n=async c=>{if(!De(c))return c;try{let p=Pt.isAbsolute(c)?c:Il(c,Pt.join(t,wi),t).absolutePath;if(!uA(p)){let l=await mA(p),u=l.default||l,m={contentDir:t},d=Array.isArray(u)?u:[u];for(let y of d)y?.id&&Hy(y)&&Y.info(`Deprecated plugin format detected: ${y.id}
115
+ ${JSON.stringify(r,null,2)}`);me(t.rules,r.rules),me(t.oas2Rules,r.oas2Rules),_e(t.oas2Rules,r.rules),me(t.oas3_0Rules,r.oas3_0Rules),_e(t.oas3_0Rules,r.rules),me(t.oas3_1Rules,r.oas3_1Rules),_e(t.oas3_1Rules,r.rules),me(t.oas3_2Rules,r.oas3_2Rules),_e(t.oas3_2Rules,r.rules),me(t.async2Rules,r.async2Rules),_e(t.async2Rules,r.rules),me(t.async3Rules,r.async3Rules),_e(t.async3Rules,r.rules),me(t.arazzo1Rules,r.arazzo1Rules),_e(t.arazzo1Rules,r.rules),me(t.arazzo1_1Rules,r.arazzo1_1Rules),_e(t.arazzo1_1Rules,r.rules),me(t.overlay1Rules,r.overlay1Rules),_e(t.overlay1Rules,r.rules),me(t.openrpc1Rules,r.openrpc1Rules),_e(t.openrpc1Rules,r.rules),me(t.graphqlRules,r.graphqlRules),_e(t.graphqlRules,r.rules),me(t.preprocessors,r.preprocessors),me(t.oas2Preprocessors,r.oas2Preprocessors),_e(t.oas2Preprocessors,r.preprocessors),me(t.oas3_0Preprocessors,r.oas3_0Preprocessors),_e(t.oas3_0Preprocessors,r.preprocessors),me(t.oas3_1Preprocessors,r.oas3_1Preprocessors),_e(t.oas3_1Preprocessors,r.preprocessors),me(t.oas3_2Preprocessors,r.oas3_2Preprocessors),_e(t.oas3_2Preprocessors,r.preprocessors),me(t.async2Preprocessors,r.async2Preprocessors),_e(t.async2Preprocessors,r.preprocessors),me(t.async3Preprocessors,r.async3Preprocessors),_e(t.async3Preprocessors,r.preprocessors),me(t.arazzo1Preprocessors,r.arazzo1Preprocessors),_e(t.arazzo1Preprocessors,r.preprocessors),me(t.arazzo1_1Preprocessors,r.arazzo1_1Preprocessors),_e(t.arazzo1_1Preprocessors,r.preprocessors),me(t.overlay1Preprocessors,r.overlay1Preprocessors),_e(t.overlay1Preprocessors,r.preprocessors),me(t.openrpc1Preprocessors,r.openrpc1Preprocessors),_e(t.openrpc1Preprocessors,r.preprocessors),me(t.decorators,r.decorators),me(t.oas2Decorators,r.oas2Decorators),_e(t.oas2Decorators,r.decorators),me(t.oas3_0Decorators,r.oas3_0Decorators),_e(t.oas3_0Decorators,r.decorators),me(t.oas3_1Decorators,r.oas3_1Decorators),_e(t.oas3_1Decorators,r.decorators),me(t.oas3_2Decorators,r.oas3_2Decorators),_e(t.oas3_2Decorators,r.decorators),me(t.async2Decorators,r.async2Decorators),_e(t.async2Decorators,r.decorators),me(t.async3Decorators,r.async3Decorators),_e(t.async3Decorators,r.decorators),me(t.arazzo1Decorators,r.arazzo1Decorators),_e(t.arazzo1Decorators,r.decorators),me(t.arazzo1_1Decorators,r.arazzo1_1Decorators),_e(t.arazzo1_1Decorators,r.decorators),me(t.overlay1Decorators,r.overlay1Decorators),_e(t.overlay1Decorators,r.decorators),me(t.openrpc1Decorators,r.openrpc1Decorators),_e(t.openrpc1Decorators,r.decorators)}return t}var By=class extends Error{};function tA(e){return new Map(JSON.parse(JSON.stringify([...e])))}function Hy(e){return O(e)&&"id"in e}function rA(e){return typeof e=="function"}function Ky({node:e,ctx:t,plugins:r}){if(!e.extends)return e;let n=(e.extends||[]).filter(Ge).map(o=>{if(!pe(o)&&!oW.extname(o))return nA(o,r);let i=t.resolve({$ref:o});return i.location&&i.node!==void 0?i.node:null}).filter(Ge);return Rl([...n.map(o=>Ky({node:o,ctx:t,plugins:r})),{...e,extends:void 0}])}function Ol(e,t){if(O(e)&&Array.isArray(e.plugins)){let{plugins:r,rootConfigDir:n}=t.getVisitorData();r.push(...e.plugins.map(o=>Il(o,t.location.source.absoluteRef.replace(/^file:\/\//,""),n)))}}var oA=Vt([{severity:"error",ruleId:np,visitor:{ref:{},ConfigGovernance:{leave(e,t){Ol(e,t)}},ConfigApisProperties:{leave(e,t){Ol(e,t)}},[et.ScorecardClassicLevel]:{leave(e,t){Ol(e,t)}},ConfigRoot:{leave(e,t){Ol(e,t)}}}}],En);function kl(e,t){if(O(e)&&e.extends){let{plugins:r,skipPluginEval:n}=t.getVisitorData();if(n)return;let o=Ky({node:e,ctx:t,plugins:r});Object.assign(e,o),delete e.extends}}var iA=Vt([{severity:"error",ruleId:rp,visitor:{ref:{leave(e,t,r){ss(e,r,t)}},ConfigGovernance:{leave(e,t){kl(e,t)}},ConfigApisProperties:{leave(e,t){kl(e,t)}},[et.ScorecardClassicLevel]:{leave(e,t){kl(e,t)}},ConfigRoot:{leave(e,t){kl(e,t)}}}}],En);function Gy(e,t){return{prev:e,value:t}}function Yy(e){return e?.prev??null}function iW(e){let t={};for(;e.parent;)t[e.parent.type.name]=e.parent.activatedOn?.value.node,e=e.parent;return t}function sW(e){let t={};for(;e.parent;)e.parent.activatedOn?.value.location&&(t[e.parent.type.name]=e.parent.activatedOn?.value.location),e=e.parent;return t}function Bt(e){let{document:t,rootType:r,normalizedVisitors:n,resolvedRefMap:o,ctx:i}=e,s={},a=new Set,c=n.any.enter,p=n.any.leave,l={},u={};for(let d of Object.keys(n))d==="any"||d==="ref"||(l[d]=c.concat(n[d]?.enter||[]),u[d]=(n[d]?.leave||[]).concat(p));m(t.parsed,r,new sr(t.source,"#/"),void 0,"");function m(d,f,h,y,g){let v=(U,E=S.source.absoluteRef)=>{if(!F(U))return{location:h,node:U};let $=Bn(E,U.$ref),oe=o.get($);if(!oe)return{location:void 0,node:void 0};let{resolved:X,node:le,document:N,nodePointer:L,error:ve}=oe;return{location:X?new sr(N.source,L):ve instanceof Ur?new sr(ve.source,""):void 0,node:le,error:ve}},b=h,S=h,w=F(d),{node:_,location:T,error:A}=v(d),R=new Set;if(w){let U=n.ref.enter;for(let{visit:E,ruleId:$,severity:oe,message:X,context:le}of U)R.add(le),E(d,{report:L=>J($,oe,X,L),resolve:v,rawNode:d,rawLocation:b,location:h,type:f,parent:y,key:g,parentLocations:{},specVersion:i.specVersion,config:i.config,getVisitorData:()=>H($)},{node:_,location:T,error:A}),T?.source.absoluteRef&&i.refTypes&&i.refTypes.set(T?.source.absoluteRef,f)}if(_!==void 0&&T&&f.name!=="scalar"){S=T;let U=s[f.name]?.has?.(_),E=!1,$=l[f.name]||c.concat(n[f.name]?.enter||[]),oe=[],X=`${S.absolutePointer}${S.pointer}`;for(let{context:N,visit:L,skip:ve,ruleId:Kt,severity:ue,message:Et}of $){if(a.has(X))break;if(N.isSkippedLevel)N.parent.activatedOn&&!N.parent.activatedOn.value.nextLevelTypeActivated&&!N.seen.has(d)&&(N.seen.add(d),E=!0,oe.push(N));else if(N.parent&&N.parent.activatedOn&&N.activatedOn?.value.withParentNode!==N.parent.activatedOn.value.node&&N.parent.activatedOn.value.nextLevelTypeActivated?.value!==f||!N.parent&&!U){oe.push(N);let Z={node:_,location:T,nextLevelTypeActivated:null,withParentNode:N.parent?.activatedOn?.value.node,skipped:(N.parent?.activatedOn?.value.skipped||ve?.(_,g,{location:h,rawLocation:b,resolve:v,rawNode:d}))??!1};N.activatedOn=Gy(N.activatedOn,Z);let Er=N.parent;for(;Er;)Er.activatedOn.value.nextLevelTypeActivated=Gy(Er.activatedOn.value.nextLevelTypeActivated,f),Er=Er.parent;Z.skipped||(E=!0,R.add(N),P(L,_,d,N,Kt,ue,Et))}}if(E||!U){if(s[f.name]=s[f.name]||new Set,s[f.name].add(_),Array.isArray(_)){let N=f.items;if(N!==void 0){let L=typeof N=="function";for(let ve=0;ve<_.length;ve++){let Kt=T.child([ve]),ue=L?N(_[ve],Kt.absolutePointer):N,Et=_[ve];ue?.directResolveAs&&(ue=ue.directResolveAs,Et={$ref:Et}),pr(ue)&&m(Et,ue,Kt,_,ve)}}}else if(O(_)){let N=Object.keys(f.properties);f.additionalProperties?N.push(...Object.keys(_).filter(L=>!N.includes(L))):f.extensionsPrefix&&N.push(...Object.keys(_).filter(L=>L.startsWith(f.extensionsPrefix))),w&&N.push(...Object.keys(d).filter(L=>L!=="$ref"&&!N.includes(L)));for(let L of N){let ve=_[L],Kt=T;ve===void 0&&(ve=d[L],Kt=h);let ue=Ft(f.properties,L);if(ue===void 0&&(ue=f.additionalProperties),typeof ue=="function"&&(ue=ue(ve,L)),ue===void 0&&f.extensionsPrefix&&L.startsWith(f.extensionsPrefix)&&(ue=cr),!pr(ue)&&ue?.directResolveAs&&(ue=ue.directResolveAs,ve={$ref:ve}),ue&&ue.name===void 0&&ue.resolvable!==!1&&(ue={name:"scalar",properties:{}}),F(d[L])&&ue?.name==="scalar"){m(d[L],ue,h.child([L]),d,L);continue}!pr(ue)||ue.name==="scalar"&&!F(ve)||m(ve,ue,Kt.child([L]),_,L)}}}let le=u[f.name]||(n[f.name]?.leave||[]).concat(p);for(let N of oe.reverse())if(N.isSkippedLevel)N.seen.delete(_);else if(N.activatedOn=Yy(N.activatedOn),N.parent){let L=N.parent;for(;L;)L.activatedOn.value.nextLevelTypeActivated=Yy(L.activatedOn.value.nextLevelTypeActivated),L=L.parent}for(let{context:N,visit:L,ruleId:ve,severity:Kt,message:ue}of le)!N.isSkippedLevel&&R.has(N)&&P(L,_,d,N,ve,Kt,ue)}if(S=h,w){let U=n.ref.leave;for(let{visit:E,ruleId:$,severity:oe,context:X,message:le}of U)R.has(X)&&E(d,{report:L=>J($,oe,le,L),resolve:v,rawNode:d,rawLocation:b,location:h,type:f,parent:y,key:g,parentLocations:{},specVersion:i.specVersion,config:i.config,getVisitorData:()=>H($)},{node:_,location:T,error:A})}function P(U,E,$,oe,X,le,N){U(E,{report:ve=>J(X,le,N,ve),resolve:v,rawNode:$,location:S,rawLocation:b,type:f,parent:y,key:g,parentLocations:sW(oe),specVersion:i.specVersion,config:i.config,ignoreNextVisitorsOnNode:()=>{a.add(`${S.absolutePointer}${S.pointer}`)},getVisitorData:()=>H(X)},iW(oe),oe)}function J(U,E,$,oe){let le=(oe.location?Array.isArray(oe.location)?oe.location:[oe.location]:[{...S,reportOnKey:!1}]).map(L=>({...S,reportOnKey:!1,...L})),N=oe.forceSeverity||E;N!=="off"&&i.problems.push({ruleId:oe.ruleId||U,severity:N,...oe,message:$?$.replace("{{message}}",oe.message):oe.message,suggest:oe.suggest||[],location:le})}function H(U){return i.visitorsData[U]=i.visitorsData[U]||{},i.visitorsData[U]}}}function sA(e){return e.trim().split(/\s+/).map(t=>t.replace(/^[a-z]/,r=>r.toUpperCase())).join("")}function Wy(e,t){switch(t){case"oas3":switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";case"Response":return"responses";case"Example":return"examples";case"RequestBody":return"requestBodies";case"Header":return"headers";case"SecuritySchema":return"securitySchemes";case"Link":return"links";case"Callback":return"callbacks";case"MediaTypesMap":return"mediaTypes";default:return null}case"oas2":switch(e){case"Schema":return"definitions";case"Parameter":return"parameters";case"Response":return"responses";default:return null}case"async2":switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";default:return null}case"async3":switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";default:return null}case"arazzo1":switch(e){case"Root.workflows_items.parameters_items":case"Root.workflows_items.steps_items.parameters_items":return"parameters";default:return null}case"overlay1":return null;case"openrpc1":switch(e){case"ContentDescriptor":return"contentDescriptors";case"Schema":return"schemas";case"Example":return"examples";case"Link":return"links";case"ErrorObject":return"errors";case"ExamplePairing":return"examplePairingObjects";case"Tag":return"tags";default:return null}default:return null}}function aA({version:e,dereference:t,rootDocument:r,resolvedRefMap:n,keepUrlRefs:o,componentRenamingConflicts:i="warn",componentNamesStrategy:s="basename"}){let a,c,p=new Map,l=Wy("Schema",e),u={ref:{leave(v,b,S){if(!S.location||S.node===void 0){xo(S,b.report,b.location);return}if(S.location.source===r.source&&S.location.source===b.location.source&&b.type.name!=="scalar"&&!t){mn(v.$ref).uri!==null&&v.$ref!==S.location.pointer&&(v.$ref=S.location.pointer);return}if(o&&pe(v.$ref))return;let w=Wy(b.type.name,e);w?t?(d(w,S,b),ss(v,S,b)):(v.$ref=d(w,S,b),m(v,S,b)):ss(v,S,b)}},Example:{leave(v,b){if(Ba(v)&&v.value===void 0){let S=b.resolve({$ref:v.externalValue});if(!S.location||S.node===void 0){xo(S,b.report,b.location);return}if(o&&pe(v.externalValue))return;v.value=b.resolve({$ref:v.externalValue}).node,delete v.externalValue}}},Root:{enter(v,b){c=b.location,e==="oas3"?a=v.components=v.components||{}:e==="oas2"?a=v:e==="async2"?a=v.components=v.components||{}:e==="async3"?a=v.components=v.components||{}:e==="arazzo1"?a=v.components=v.components||{}:e==="openrpc1"&&(a=v.components=v.components||{})}}};e==="oas3"&&(u.Discriminator={leave(v,b){if(typeof v.defaultMapping!="string"||!Or(v.defaultMapping))return;let S=b.resolve({$ref:v.defaultMapping});if(!S.location||S.node===void 0){xo(S,b.report,b.location.child("defaultMapping"));return}v.defaultMapping=d(l,S,b)},DiscriminatorMapping:{leave(v,b){for(let S of Object.keys(v)){let w=v[S];if(!Or(w))continue;let _=b.resolve({$ref:w});if(!_.location||_.node===void 0){xo(_,b.report,b.location.child(S));return}v[S]=d(l,_,b)}}}});function m(v,b,S){let w=Bn(S.location.source.absoluteRef,v.$ref);n.set(w,{document:r,isRemote:!1,node:b.node,nodePointer:v.$ref,resolved:!0})}function d(v,b,S){a[v]=a[v]||{};let w=g(b,v,S);return a[v][w]=b.node,e==="oas3"||e==="async2"||e==="async3"||e==="openrpc1"?`#/components/${v}/${w}`:`#/${v}/${w}`}function f(v,b,S){return F(v)&&S.resolve(v,c.absolutePointer).location?.absolutePointer===b.location.absolutePointer?!0:Ko(v,b.node)}function h(v,b,S){let{node:w}=v,_=O(w)&&De(w.title)?w.title.trim():"",T=sA(_).replace(new RegExp(`[^${vc}]`,"g"),"-"),A=v.location.child("title");return _===""?{key:T,problem:{message:"Schema must define a `title` when using `--component-names-strategy title`.",location:v.location,forceSeverity:"error"}}:b[T]&&!f(b[T],v,S)?{key:T,problem:{message:`Title "${_}" maps to component name \`${T}\`, already used by another schema. Rename one of the titles.`,location:A,from:p.get(T),forceSeverity:i}}:{key:T}}function y(v,b,S){let w=Og(v.location.pointer)||kg(v.location.source.absoluteRef),_=w;for(let T=2;b[_]&&!f(b[_],v,S);T++)_=`${w}-${T}`;return{name:_,prevName:w}}function g(v,b,S){let w=a[b];if(s==="title"&&b===l){let{key:A,problem:R}=h(v,w,S);if(!R)return p.set(A,v.location.child("title")),A;let{name:P}=y(v,w,S);return w[P]||(S.report(R),p.set(P,v.location)),P}let{name:_,prevName:T}=y(v,w,S);return!w[_]&&T!==_&&S.report({message:`Two schemas are referenced with the same name but different content. Renamed ${T} to ${_}.`,location:S.location,forceSeverity:i}),_}return u}async function Qy(e){let{document:t,config:r,types:n,externalRefResolver:o,dereference:i=!1,removeUnusedComponents:s=!1,keepUrlRefs:a=!1,componentRenamingConflicts:c,componentNamesStrategy:p="basename"}=e,l=sn(t.parsed),u=aa(l),m=r.getRulesForSpecVersion(u),d=Qr(r.extendTypes(n,l),r),f=Mo(m,r,"preprocessors",l),h=Mo(m,r,"decorators",l),y={problems:[],specVersion:l,config:r,refTypes:new Map,visitorsData:{}},g=await or({rootDocument:t,rootType:d.Root,externalRefResolver:o});f.length>0&&(Bt({document:t,rootType:d.Root,normalizedVisitors:Vt(f,d),resolvedRefMap:g,ctx:y}),g=await or({rootDocument:t,rootType:d.Root,externalRefResolver:o}));let v=Vt([{severity:"error",ruleId:"bundler",visitor:aA({version:u,dereference:i,rootDocument:t,resolvedRefMap:g,keepUrlRefs:a,componentRenamingConflicts:c,componentNamesStrategy:p})},...h.filter(b=>b.ruleId!=="remove-unused-components")],d);if(Bt({document:t,rootType:d.Root,normalizedVisitors:v,resolvedRefMap:g,ctx:y}),s||r.getDecoratorSettings("remove-unused-components",l).severity!=="off"){let b=await or({rootDocument:t,rootType:d.Root,externalRefResolver:o}),S=Vt([{severity:"error",ruleId:"remove-unused-components",visitor:u==="oas2"?bp({}):vp({})}],d);Bt({document:t,rootType:d.Root,normalizedVisitors:S,resolvedRefMap:b,ctx:y})}return{bundle:t,problems:y.problems.map(b=>r.addProblemToIgnore(b)),fileDependencies:o.getFiles(),rootType:d.Root,refTypes:y.refTypes,visitorsData:y.visitorsData}}function cA(e,t,r){let n={plugins:[],rootConfigDir:r},o={problems:[],specVersion:"config",refTypes:new Map,visitorsData:{[np]:n}};return Bt({document:e,rootType:En.ConfigRoot,normalizedVisitors:oA,resolvedRefMap:t,ctx:o}),n.plugins}function pA(e,t,r,n=!1){let o={plugins:r,skipPluginEval:n},i={problems:[],specVersion:"config",refTypes:new Map,visitorsData:{[rp]:o}};return Bt({document:e,rootType:En.ConfigRoot,normalizedVisitors:iA,resolvedRefMap:t,ctx:i}),e.parsed??{}}async function aW(e){let{ref:t,doc:r,externalRefResolver:n=new Mt(e.config.resolve),base:o=null}=e;if(!(t||r))throw new Error(`Document or reference is required.
116
+ `);let i=r===void 0?await n.resolveDocument(o,t,!0):r;if(i instanceof Error)throw i;return e.collectSpecData?.(i),Qy({document:i,...e,externalRefResolver:n,types:oo(sn(i.parsed))})}function Cl(e){return!De(e)}import*as lA from"node:url";var Jy=new Map,cW="v",pW=0;function uA(e){return Jy.has(e)}function dA(e){return Jy.get(e)}function fA(e,t){Jy.set(e,t)}async function mA(e){let t=lA.pathToFileURL(e);return t.searchParams.set(cW,String(pW)),import(t.href)}async function Zy({rawConfigDocument:e,configPath:t,externalRefResolver:r,customExtends:n,skipPluginEval:o}){let i=e===void 0?JS:e.parsed;if(n!==void 0&&O(i)&&(i.extends=n),O(i)&&(i?.extends?.some(Cl)||i?.scorecardClassic?.levels?.some(d=>d?.extends?.some(Cl))||i?.scorecard?.levels?.some(d=>d?.extends?.some(Cl))))throw new Error("Configuration format not detected in extends: values must be strings.");let s=e??{source:new Hn(t??"",JSON.stringify(i)),parsed:i},a=await or({rootDocument:s,rootType:En.ConfigRoot,externalRefResolver:r??new Mt(op(i?.resolve))}),c=[],p,l="";Je?p=[...(i?.plugins||[]).filter(f=>!De(f)),Vy]:(l=Pt.dirname(t??""),c=cA(s,a,l),p=[...await gA(c.map(f=>hA(f)?f.absolutePath:f),l,o),Vy]);let u=pA(s,tA(a),p,o);u.apis&&!o&&(u.apis=Object.fromEntries(Object.entries(u.apis).map(([d,f])=>{let h=Rl([u,f]);return[d,{...f,...h}]})));let m=c.length?c.map(d=>hA(d)&&d.isModule?d.rawPath:d.absolutePath&&Pt.relative(l,d.absolutePath)).filter(Lt):void 0;return{resolvedConfig:{...u,plugins:m},resolvedRefMap:a,plugins:p}}function uW(e){for(let t of ZS){let r=Pt.resolve(e,t);if(Xy.existsSync(r))return t}}function hA(e){return"isModule"in e}var Il=(e,t,r)=>{if(!De(e))return e;let n=Pt.resolve(Pt.dirname(t),e);if(Xy.existsSync(n))return{absolutePath:n,rawPath:e,isModule:!1};try{return{absolutePath:lW.createRequire(import.meta.url??__dirname).resolve(e,{paths:[r,import.meta.url?Pt.dirname(yA.fileURLToPath(import.meta.url)):__dirname]}),isModule:!0,rawPath:e}}catch{throw new Error(`Plugin "${e}" not found.`)}};async function gA(e,t,r=!1){if(!e)return[];let n=async c=>{if(!De(c))return c;try{let p=Pt.isAbsolute(c)?c:Il(c,Pt.join(t,wi),t).absolutePath;if(!uA(p)){let l=await mA(p),u=l.default||l,m={contentDir:t},d=Array.isArray(u)?u:[u];for(let y of d)y?.id&&Hy(y)&&Y.info(`Deprecated plugin format detected: ${y.id}
117
117
  `);let f=Hy(u)?u:rA(u)?await u(m):await u?.default?.(m),h=Array.isArray(f)?f:[f];f&&fA(p,h.map(y=>({...y,path:c,absolutePath:p})))}return dA(p)}catch(p){throw new Error(`Failed to load plugin "${c}": ${p.message}
118
118
 
119
119
  ${p.stack}`)}},o=new Map,i=uW(t);i&&e.push(i);let s=new Set;if(r){let c=[];for(let p of e){if(!De(p)){c.push(p);continue}let l=Pt.isAbsolute(p)?p:Il(p,Pt.join(t,wi),t).absolutePath;s.has(l)||(s.add(l),c.push({absolutePath:l}))}return c}return(await Promise.all(e.map(async c=>{if(De(c)){if(pe(c))throw new Error(G.red("We don't support remote plugins yet."));if(s.has(c))return;s.add(c)}let p=await n(c);if(!p)return;let l=Array.isArray(p)?p:[p];return(await Promise.all(l.map(async u=>{if(!u)return;let m=u.id;if(typeof m!="string")throw new Error(G.red(`Plugin must define \`id\` property in ${G.blue(c.toString())}.`));let d=u.absolutePath??c.toString(),f=o.get(m);if(f){if(d!==f)throw new Error(G.red(`Plugin "id" must be unique. Plugin ${G.blue(d)} uses id "${G.blue(m)}" already seen in ${G.blue(d)}`));return}o.set(m,d);let h={id:m,...u.configs?{configs:u.configs}:{},...u.typeExtension?{typeExtension:u.typeExtension}:{}};if(u.rules){if(!u.rules.oas3&&!u.rules.oas2&&!u.rules.async2&&!u.rules.async3&&!u.rules.arazzo1&&!u.rules.overlay1&&!u.rules.openrpc1&&!u.rules.graphql)throw new Error(`Plugin rules must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo\`, \`overlay1\`, \`openrpc1\`, or \`graphql\` rules "${c}.`);h.rules={},u.rules.oas3&&(h.rules.oas3=Le(u.rules.oas3,m)),u.rules.oas2&&(h.rules.oas2=Le(u.rules.oas2,m)),u.rules.async2&&(h.rules.async2=Le(u.rules.async2,m)),u.rules.async3&&(h.rules.async3=Le(u.rules.async3,m)),u.rules.arazzo1&&(h.rules.arazzo1=Le(u.rules.arazzo1,m)),u.rules.overlay1&&(h.rules.overlay1=Le(u.rules.overlay1,m)),u.rules.openrpc1&&(h.rules.openrpc1=Le(u.rules.openrpc1,m)),u.rules.graphql&&(h.rules.graphql=Le(u.rules.graphql,m))}if(u.preprocessors){if(!u.preprocessors.oas3&&!u.preprocessors.oas2&&!u.preprocessors.async2&&!u.preprocessors.async3&&!u.preprocessors.arazzo1&&!u.preprocessors.overlay1&&!u.preprocessors.openrpc1)throw new Error(`Plugin \`preprocessors\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, \`overlay1\`, or \`openrpc1\` preprocessors "${c}.`);h.preprocessors={},u.preprocessors.oas3&&(h.preprocessors.oas3=Le(u.preprocessors.oas3,m)),u.preprocessors.oas2&&(h.preprocessors.oas2=Le(u.preprocessors.oas2,m)),u.preprocessors.async2&&(h.preprocessors.async2=Le(u.preprocessors.async2,m)),u.preprocessors.async3&&(h.preprocessors.async3=Le(u.preprocessors.async3,m)),u.preprocessors.arazzo1&&(h.preprocessors.arazzo1=Le(u.preprocessors.arazzo1,m)),u.preprocessors.overlay1&&(h.preprocessors.overlay1=Le(u.preprocessors.overlay1,m)),u.preprocessors.openrpc1&&(h.preprocessors.openrpc1=Le(u.preprocessors.openrpc1,m))}if(u.decorators){if(!u.decorators.oas3&&!u.decorators.oas2&&!u.decorators.async2&&!u.decorators.async3&&!u.decorators.arazzo1&&!u.decorators.overlay1&&!u.decorators.openrpc1)throw new Error(`Plugin \`decorators\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, \`overlay1\`, or \`openrpc1\` decorators "${c}.`);h.decorators={},u.decorators.oas3&&(h.decorators.oas3=Le(u.decorators.oas3,m)),u.decorators.oas2&&(h.decorators.oas2=Le(u.decorators.oas2,m)),u.decorators.async2&&(h.decorators.async2=Le(u.decorators.async2,m)),u.decorators.async3&&(h.decorators.async3=Le(u.decorators.async3,m)),u.decorators.arazzo1&&(h.decorators.arazzo1=Le(u.decorators.arazzo1,m)),u.decorators.overlay1&&(h.decorators.overlay1=Le(u.decorators.overlay1,m)),u.decorators.openrpc1&&(h.decorators.openrpc1=Le(u.decorators.openrpc1,m))}return u.assertions&&(h.assertions=u.assertions),{...u,...h}}))).filter(Lt)}))).filter(Lt).flat()}function nA(e,t){let{pluginId:r,configName:n}=eA(e),o=t.find(s=>s.id===r);if(!o)throw new Error(`Invalid config ${G.red(e)}: plugin ${r} is not included.`);let i=o.configs?.[n];if(!i)throw new Error(r?`Invalid config ${G.red(e)}: plugin ${r} doesn't export config with name ${n}.`:`Invalid config ${G.red(e)}: there is no such built-in config.`);return i}function dW(e,t){let r=Object.create(null);for(let n of Object.keys(e)){let o=e[n],i=pe(n)?n:Ha(t,n);r[i]=Object.create(null);for(let s of Object.keys(o))r[i][s]=new Set(o[s])}return r}async function vA(e,t){let r=e?Wl(e):Je?"":process.cwd(),n=r?Ha(r,ra):ra;if(La?.existsSync&&!pe(n)&&!La.existsSync(n))return{};let o=await t.resolveDocument(null,n,!0);return o instanceof Error||!o.parsed?{}:dW(o.parsed||{},r)}async function fW(e={}){let{configPath:t=xA(),customExtends:r,externalRefResolver:n,skipPluginEval:o}=e,i=n??new Mt,s=t?await i.resolveDocument(null,t,!0):void 0;if(s instanceof Error)throw s;let{resolvedConfig:a,resolvedRefMap:c,plugins:p}=await Zy({rawConfigDocument:s?wA(s):void 0,customExtends:r,configPath:t,externalRefResolver:n,skipPluginEval:o}),l=await vA(t,i);return new _i(a,{configPath:t,document:s,resolvedRefMap:c,plugins:p,ignore:l})}function xA(e){if(!La?.existsSync)return;let t=e?bA.resolve(e,wi):wi;return La.existsSync(t)?t:void 0}async function SA(e,{configPath:t,externalRefResolver:r,ignore:n}={}){let i=ko(typeof e=="string"?e:"",t??"");typeof e!="string"&&e&&(i.parsed=e);let{resolvedConfig:s,resolvedRefMap:a,plugins:c}=await Zy({rawConfigDocument:wA(i),configPath:t,externalRefResolver:r});return new _i(s,{configPath:t,document:i,resolvedRefMap:a,plugins:c,ignore:n})}function wA(e){if(!e.parsed)return e;let{plugins:t,resolve:r,...n}=e.parsed,o={...structuredClone(n),plugins:t?.slice(),...r&&{resolve:{...r}}};return{...e,parsed:o}}var jo=Tr(FT(),1);var Z6=150,eJ=3;function Bl(e,t){ys.enabled=t;let{start:r,end:n={line:r.line,col:r.col+1},source:o}=e,i=o.getLines(),s=r.line,a=Math.max(Math.min(n.line,i.length),r.line),c=Math.max(a-s-eJ+1,0);c<2&&(c=0);let p=[],l=0;for(let m=s;m<=a&&!(c>0&&m>=a-c);m++){let d=i[m-1]||"";d!==""&&(l=Vl(d));let f=m===s?r.col-1:l,h=m===a?n.col-1:d.length;p.push([`${m}`,u(d,f,h,G.red)]),t||p.push(["",VT(d,f,h)])}return c>0&&(p.push(["\u2026",`${$g(l)}${G.gray(`< ${c} more lines >`)}`]),p.push([`${a}`,u(i[a-1],-1,n.col-1,G.red)]),t||p.push(["",VT(i[a-1],-1,n.col-1)])),tJ([[`${s-2}`,u(i[s-1-2])],[`${s-1}`,u(i[s-1-1])],...p,[`${a+1}`,u(i[a-1+1])],[`${a+2}`,u(i[a-1+2])]]);function u(m,d=-1,f=1/0,h=G.gray){return!t||!m?m:(d===-1&&(d=Vl(m)),f=Math.min(f,m.length),m.substr(0,d)+h(m.substring(d,f))+m.substr(f))}}function tJ(e){let t=e.filter(([o,i])=>i!==void 0),r=Math.max(...t.map(([o])=>o.length)),n=Math.min(...t.map(([o,i])=>i===""?1/0:Vl(i)));return t.map(([o,i])=>G.gray(nJ(r,o)+" |")+(i?" "+rJ(i.substring(n)):"")).join(`