@scalar/openapi-parser 0.8.6 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/configuration/index.js +27 -1
  4. package/dist/index.js +26 -1
  5. package/dist/lib/Validator/Validator.js +127 -1
  6. package/dist/{utils/load/plugins → plugins/fetch-urls}/fetchUrls.d.ts +1 -1
  7. package/dist/plugins/fetch-urls/fetchUrls.d.ts.map +1 -0
  8. package/dist/plugins/fetch-urls/fetchUrls.js +45 -0
  9. package/dist/plugins/fetch-urls/index.d.ts +2 -0
  10. package/dist/plugins/fetch-urls/index.d.ts.map +1 -0
  11. package/dist/plugins/fetch-urls/index.js +1 -0
  12. package/dist/plugins/read-files/index.d.ts +2 -0
  13. package/dist/plugins/read-files/index.d.ts.map +1 -0
  14. package/dist/plugins/read-files/index.js +1 -0
  15. package/dist/plugins/read-files/readFiles.d.ts +3 -0
  16. package/dist/plugins/read-files/readFiles.d.ts.map +1 -0
  17. package/dist/plugins/read-files/readFiles.js +56 -0
  18. package/dist/polyfills/path.js +120 -1
  19. package/dist/schemas/v2.0/schema.json.js +1623 -1
  20. package/dist/schemas/v3.0/schema.json.js +1673 -1
  21. package/dist/schemas/v3.1/schema.json.js +1451 -1
  22. package/dist/utils/betterAjvErrors/helpers.js +108 -1
  23. package/dist/utils/betterAjvErrors/index.js +15 -1
  24. package/dist/utils/betterAjvErrors/utils.js +31 -1
  25. package/dist/utils/betterAjvErrors/validation-errors/additional-prop.js +20 -1
  26. package/dist/utils/betterAjvErrors/validation-errors/base.js +34 -1
  27. package/dist/utils/betterAjvErrors/validation-errors/default.js +20 -1
  28. package/dist/utils/betterAjvErrors/validation-errors/enum.js +58 -1
  29. package/dist/utils/betterAjvErrors/validation-errors/pattern.js +20 -1
  30. package/dist/utils/betterAjvErrors/validation-errors/required.js +19 -1
  31. package/dist/utils/betterAjvErrors/validation-errors/unevaluated-prop.js +20 -1
  32. package/dist/utils/dereference.js +21 -1
  33. package/dist/utils/details.js +25 -1
  34. package/dist/utils/escapeJsonPointer.js +10 -1
  35. package/dist/utils/filter.js +17 -1
  36. package/dist/utils/getEntrypoint.js +8 -1
  37. package/dist/utils/getListOfReferences.js +27 -1
  38. package/dist/utils/getSegmentsFromPath.js +18 -1
  39. package/dist/utils/isFilesystem.js +11 -1
  40. package/dist/utils/isJson.js +11 -1
  41. package/dist/utils/isObject.js +6 -1
  42. package/dist/utils/isYaml.js +19 -1
  43. package/dist/utils/load/load.js +121 -1
  44. package/dist/utils/makeFilesystem.js +25 -1
  45. package/dist/utils/normalize.js +25 -1
  46. package/dist/utils/openapi/actions/details.js +13 -1
  47. package/dist/utils/openapi/actions/files.js +11 -1
  48. package/dist/utils/openapi/actions/get.js +13 -1
  49. package/dist/utils/openapi/actions/toJson.js +13 -1
  50. package/dist/utils/openapi/actions/toYaml.js +13 -1
  51. package/dist/utils/openapi/commands/dereferenceCommand.js +29 -1
  52. package/dist/utils/openapi/commands/filterCommand.js +28 -1
  53. package/dist/utils/openapi/commands/loadCommand.js +44 -1
  54. package/dist/utils/openapi/commands/upgradeCommand.js +31 -1
  55. package/dist/utils/openapi/commands/validateCommand.js +35 -1
  56. package/dist/utils/openapi/openapi.js +18 -1
  57. package/dist/utils/openapi/utils/queueTask.js +11 -1
  58. package/dist/utils/openapi/utils/workThroughQueue.js +67 -1
  59. package/dist/utils/resolveReferences.js +153 -1
  60. package/dist/utils/toJson.js +3 -1
  61. package/dist/utils/toYaml.js +5 -1
  62. package/dist/utils/transformErrors.js +23 -1
  63. package/dist/utils/traverse.js +26 -1
  64. package/dist/utils/unescapeJsonPointer.js +11 -1
  65. package/dist/utils/upgrade.js +20 -1
  66. package/dist/utils/upgradeFromThreeToThreeOne.js +122 -1
  67. package/dist/utils/upgradeFromTwoToThree.js +174 -1
  68. package/dist/utils/validate.js +18 -1
  69. package/package.json +15 -13
  70. package/dist/utils/load/plugins/fetchUrls.d.ts.map +0 -1
  71. package/dist/utils/load/plugins/fetchUrls.js +0 -1
  72. package/dist/utils/load/plugins/readFiles.d.ts +0 -3
  73. package/dist/utils/load/plugins/readFiles.d.ts.map +0 -1
  74. package/dist/utils/load/plugins/readFiles.js +0 -1
@@ -1 +1,1451 @@
1
- var e="https://spec.openapis.org/oas/3.1/schema/2022-10-07",t="https://json-schema.org/draft/2020-12/schema",r="The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0",s="object",o={openapi:{type:"string",pattern:"^3\\.1\\.\\d+(-.+)?$"},info:{$ref:"#/$defs/info"},jsonSchemaDialect:{type:"string",format:"uri",default:"https://spec.openapis.org/oas/3.1/dialect/base"},servers:{type:"array",items:{$ref:"#/$defs/server"},default:[{url:"/"}]},paths:{$ref:"#/$defs/paths"},webhooks:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},components:{$ref:"#/$defs/components"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},tags:{type:"array",items:{$ref:"#/$defs/tag"}},externalDocs:{$ref:"#/$defs/external-documentation"}},i=["openapi","info"],p=[{required:["paths"]},{required:["components"]},{required:["webhooks"]}],n="#/$defs/specification-extensions",a=!1,f={info:{$comment:"https://spec.openapis.org/oas/v3.1.0#info-object",type:"object",properties:{title:{type:"string"},summary:{type:"string"},description:{type:"string"},termsOfService:{type:"string",format:"uri"},contact:{$ref:"#/$defs/contact"},license:{$ref:"#/$defs/license"},version:{type:"string"}},required:["title","version"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},contact:{$comment:"https://spec.openapis.org/oas/v3.1.0#contact-object",type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},email:{type:"string",format:"email"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},license:{$comment:"https://spec.openapis.org/oas/v3.1.0#license-object",type:"object",properties:{name:{type:"string"},identifier:{type:"string"},url:{type:"string",format:"uri"}},required:["name"],dependentSchemas:{identifier:{not:{required:["url"]}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},server:{$comment:"https://spec.openapis.org/oas/v3.1.0#server-object",type:"object",properties:{url:{type:"string"},description:{type:"string"},variables:{type:"object",additionalProperties:{$ref:"#/$defs/server-variable"}}},required:["url"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"server-variable":{$comment:"https://spec.openapis.org/oas/v3.1.0#server-variable-object",type:"object",properties:{enum:{type:"array",items:{type:"string"},minItems:1},default:{type:"string"},description:{type:"string"}},required:["default"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},components:{$comment:"https://spec.openapis.org/oas/v3.1.0#components-object",type:"object",properties:{schemas:{type:"object",additionalProperties:{$ref:"#/$defs/schema"}},responses:{type:"object",additionalProperties:{$ref:"#/$defs/response-or-reference"}},parameters:{type:"object",additionalProperties:{$ref:"#/$defs/parameter-or-reference"}},examples:{type:"object",additionalProperties:{$ref:"#/$defs/example-or-reference"}},requestBodies:{type:"object",additionalProperties:{$ref:"#/$defs/request-body-or-reference"}},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},securitySchemes:{type:"object",additionalProperties:{$ref:"#/$defs/security-scheme-or-reference"}},links:{type:"object",additionalProperties:{$ref:"#/$defs/link-or-reference"}},callbacks:{type:"object",additionalProperties:{$ref:"#/$defs/callbacks-or-reference"}},pathItems:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}}},patternProperties:{"^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$":{$comment:"Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected",propertyNames:{pattern:"^[a-zA-Z0-9._-]+$"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},paths:{$comment:"https://spec.openapis.org/oas/v3.1.0#paths-object",type:"object",patternProperties:{"^/":{$ref:"#/$defs/path-item"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"path-item":{$comment:"https://spec.openapis.org/oas/v3.1.0#path-item-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},servers:{type:"array",items:{$ref:"#/$defs/server"}},parameters:{type:"array",items:{$ref:"#/$defs/parameter-or-reference"}},get:{$ref:"#/$defs/operation"},put:{$ref:"#/$defs/operation"},post:{$ref:"#/$defs/operation"},delete:{$ref:"#/$defs/operation"},options:{$ref:"#/$defs/operation"},head:{$ref:"#/$defs/operation"},patch:{$ref:"#/$defs/operation"},trace:{$ref:"#/$defs/operation"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"path-item-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/path-item"}},operation:{$comment:"https://spec.openapis.org/oas/v3.1.0#operation-object",type:"object",properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/$defs/external-documentation"},operationId:{type:"string"},parameters:{type:"array",items:{$ref:"#/$defs/parameter-or-reference"}},requestBody:{$ref:"#/$defs/request-body-or-reference"},responses:{$ref:"#/$defs/responses"},callbacks:{type:"object",additionalProperties:{$ref:"#/$defs/callbacks-or-reference"}},deprecated:{default:!1,type:"boolean"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},servers:{type:"array",items:{$ref:"#/$defs/server"}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"external-documentation":{$comment:"https://spec.openapis.org/oas/v3.1.0#external-documentation-object",type:"object",properties:{description:{type:"string"},url:{type:"string",format:"uri"}},required:["url"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},parameter:{$comment:"https://spec.openapis.org/oas/v3.1.0#parameter-object",type:"object",properties:{name:{type:"string"},in:{enum:["query","header","path","cookie"]},description:{type:"string"},required:{default:!1,type:"boolean"},deprecated:{default:!1,type:"boolean"},schema:{$ref:"#/$defs/schema"},content:{$ref:"#/$defs/content",minProperties:1,maxProperties:1}},required:["name","in"],oneOf:[{required:["schema"]},{required:["content"]}],if:{properties:{in:{const:"query"}},required:["in"]},then:{properties:{allowEmptyValue:{default:!1,type:"boolean"}}},dependentSchemas:{schema:{properties:{style:{type:"string"},explode:{type:"boolean"}},allOf:[{$ref:"#/$defs/examples"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie"},{$ref:"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form"}],$defs:{"styles-for-path":{if:{properties:{in:{const:"path"}},required:["in"]},then:{properties:{name:{pattern:"[^/#?]+$"},style:{default:"simple",enum:["matrix","label","simple"]},required:{const:!0}},required:["required"]}},"styles-for-header":{if:{properties:{in:{const:"header"}},required:["in"]},then:{properties:{style:{default:"simple",const:"simple"}}}},"styles-for-query":{if:{properties:{in:{const:"query"}},required:["in"]},then:{properties:{style:{default:"form",enum:["form","spaceDelimited","pipeDelimited","deepObject"]},allowReserved:{default:!1,type:"boolean"}}}},"styles-for-cookie":{if:{properties:{in:{const:"cookie"}},required:["in"]},then:{properties:{style:{default:"form",const:"form"}}}},"styles-for-form":{if:{properties:{style:{const:"form"}},required:["style"]},then:{properties:{explode:{default:!0}}},else:{properties:{explode:{default:!1}}}}}}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"parameter-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/parameter"}},"request-body":{$comment:"https://spec.openapis.org/oas/v3.1.0#request-body-object",type:"object",properties:{description:{type:"string"},content:{$ref:"#/$defs/content"},required:{default:!1,type:"boolean"}},required:["content"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"request-body-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/request-body"}},content:{$comment:"https://spec.openapis.org/oas/v3.1.0#fixed-fields-10",type:"object",additionalProperties:{$ref:"#/$defs/media-type"},propertyNames:{format:"media-range"}},"media-type":{$comment:"https://spec.openapis.org/oas/v3.1.0#media-type-object",type:"object",properties:{schema:{$ref:"#/$defs/schema"},encoding:{type:"object",additionalProperties:{$ref:"#/$defs/encoding"}}},allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/examples"}],unevaluatedProperties:!1},encoding:{$comment:"https://spec.openapis.org/oas/v3.1.0#encoding-object",type:"object",properties:{contentType:{type:"string",format:"media-range"},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},style:{default:"form",enum:["form","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{default:!1,type:"boolean"}},allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/encoding/$defs/explode-default"}],unevaluatedProperties:!1,$defs:{"explode-default":{if:{properties:{style:{const:"form"}},required:["style"]},then:{properties:{explode:{default:!0}}},else:{properties:{explode:{default:!1}}}}}},responses:{$comment:"https://spec.openapis.org/oas/v3.1.0#responses-object",type:"object",properties:{default:{$ref:"#/$defs/response-or-reference"}},patternProperties:{"^[1-5](?:[0-9]{2}|XX)$":{$ref:"#/$defs/response-or-reference"}},minProperties:1,$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},response:{$comment:"https://spec.openapis.org/oas/v3.1.0#response-object",type:"object",properties:{description:{type:"string"},headers:{type:"object",additionalProperties:{$ref:"#/$defs/header-or-reference"}},content:{$ref:"#/$defs/content"},links:{type:"object",additionalProperties:{$ref:"#/$defs/link-or-reference"}}},required:["description"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"response-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/response"}},callbacks:{$comment:"https://spec.openapis.org/oas/v3.1.0#callback-object",type:"object",$ref:"#/$defs/specification-extensions",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},"callbacks-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/callbacks"}},example:{$comment:"https://spec.openapis.org/oas/v3.1.0#example-object",type:"object",properties:{summary:{type:"string"},description:{type:"string"},value:!0,externalValue:{type:"string",format:"uri"}},not:{required:["value","externalValue"]},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"example-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/example"}},link:{$comment:"https://spec.openapis.org/oas/v3.1.0#link-object",type:"object",properties:{operationRef:{type:"string",format:"uri-reference"},operationId:{type:"string"},parameters:{$ref:"#/$defs/map-of-strings"},requestBody:!0,description:{type:"string"},body:{$ref:"#/$defs/server"}},oneOf:[{required:["operationRef"]},{required:["operationId"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"link-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/link"}},header:{$comment:"https://spec.openapis.org/oas/v3.1.0#header-object",type:"object",properties:{description:{type:"string"},required:{default:!1,type:"boolean"},deprecated:{default:!1,type:"boolean"},schema:{$ref:"#/$defs/schema"},content:{$ref:"#/$defs/content",minProperties:1,maxProperties:1}},oneOf:[{required:["schema"]},{required:["content"]}],dependentSchemas:{schema:{properties:{style:{default:"simple",const:"simple"},explode:{default:!1,type:"boolean"}},$ref:"#/$defs/examples"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"header-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/header"}},tag:{$comment:"https://spec.openapis.org/oas/v3.1.0#tag-object",type:"object",properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/$defs/external-documentation"}},required:["name"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},reference:{$comment:"https://spec.openapis.org/oas/v3.1.0#reference-object",type:"object",properties:{$ref:{type:"string",format:"uri-reference"},summary:{type:"string"},description:{type:"string"}},unevaluatedProperties:!1},schema:{$comment:"https://spec.openapis.org/oas/v3.1.0#schema-object",$dynamicAnchor:"meta",type:["object","boolean"]},"security-scheme":{$comment:"https://spec.openapis.org/oas/v3.1.0#security-scheme-object",type:"object",properties:{type:{enum:["apiKey","http","mutualTLS","oauth2","openIdConnect"]},description:{type:"string"}},required:["type"],allOf:[{$ref:"#/$defs/specification-extensions"},{$ref:"#/$defs/security-scheme/$defs/type-apikey"},{$ref:"#/$defs/security-scheme/$defs/type-http"},{$ref:"#/$defs/security-scheme/$defs/type-http-bearer"},{$ref:"#/$defs/security-scheme/$defs/type-oauth2"},{$ref:"#/$defs/security-scheme/$defs/type-oidc"}],unevaluatedProperties:!1,$defs:{"type-apikey":{if:{properties:{type:{const:"apiKey"}},required:["type"]},then:{properties:{name:{type:"string"},in:{enum:["query","header","cookie"]}},required:["name","in"]}},"type-http":{if:{properties:{type:{const:"http"}},required:["type"]},then:{properties:{scheme:{type:"string"}},required:["scheme"]}},"type-http-bearer":{if:{properties:{type:{const:"http"},scheme:{type:"string",pattern:"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}},required:["type","scheme"]},then:{properties:{bearerFormat:{type:"string"}}}},"type-oauth2":{if:{properties:{type:{const:"oauth2"}},required:["type"]},then:{properties:{flows:{$ref:"#/$defs/oauth-flows"}},required:["flows"]}},"type-oidc":{if:{properties:{type:{const:"openIdConnect"}},required:["type"]},then:{properties:{openIdConnectUrl:{type:"string",format:"uri"}},required:["openIdConnectUrl"]}}}},"security-scheme-or-reference":{if:{type:"object",required:["$ref"]},then:{$ref:"#/$defs/reference"},else:{$ref:"#/$defs/security-scheme"}},"oauth-flows":{type:"object",properties:{implicit:{$ref:"#/$defs/oauth-flows/$defs/implicit"},password:{$ref:"#/$defs/oauth-flows/$defs/password"},clientCredentials:{$ref:"#/$defs/oauth-flows/$defs/client-credentials"},authorizationCode:{$ref:"#/$defs/oauth-flows/$defs/authorization-code"}},$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:{implicit:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["authorizationUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},password:{type:"object",properties:{tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"client-credentials":{type:"object",properties:{tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1},"authorization-code":{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/$defs/map-of-strings"}},required:["authorizationUrl","tokenUrl","scopes"],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1}}},"security-requirement":{$comment:"https://spec.openapis.org/oas/v3.1.0#security-requirement-object",type:"object",additionalProperties:{type:"array",items:{type:"string"}}},"specification-extensions":{$comment:"https://spec.openapis.org/oas/v3.1.0#specification-extensions",patternProperties:{"^x-":!0}},examples:{properties:{example:!0,examples:{type:"object",additionalProperties:{$ref:"#/$defs/example-or-reference"}}}},"map-of-strings":{type:"object",additionalProperties:{type:"string"}}},c={$id:e,$schema:t,description:r,type:s,properties:o,required:i,anyOf:p,$ref:n,unevaluatedProperties:a,$defs:f};export{f as $defs,e as $id,n as $ref,t as $schema,p as anyOf,c as default,r as description,o as properties,i as required,s as type,a as unevaluatedProperties};
1
+ var $id = "https://spec.openapis.org/oas/3.1/schema/2022-10-07";
2
+ var $schema = "https://json-schema.org/draft/2020-12/schema";
3
+ var description = "The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0";
4
+ var type = "object";
5
+ var properties = {
6
+ openapi: {
7
+ type: "string",
8
+ pattern: "^3\\.1\\.\\d+(-.+)?$"
9
+ },
10
+ info: {
11
+ $ref: "#/$defs/info"
12
+ },
13
+ jsonSchemaDialect: {
14
+ type: "string",
15
+ format: "uri",
16
+ "default": "https://spec.openapis.org/oas/3.1/dialect/base"
17
+ },
18
+ servers: {
19
+ type: "array",
20
+ items: {
21
+ $ref: "#/$defs/server"
22
+ },
23
+ "default": [
24
+ {
25
+ url: "/"
26
+ }
27
+ ]
28
+ },
29
+ paths: {
30
+ $ref: "#/$defs/paths"
31
+ },
32
+ webhooks: {
33
+ type: "object",
34
+ additionalProperties: {
35
+ $ref: "#/$defs/path-item-or-reference"
36
+ }
37
+ },
38
+ components: {
39
+ $ref: "#/$defs/components"
40
+ },
41
+ security: {
42
+ type: "array",
43
+ items: {
44
+ $ref: "#/$defs/security-requirement"
45
+ }
46
+ },
47
+ tags: {
48
+ type: "array",
49
+ items: {
50
+ $ref: "#/$defs/tag"
51
+ }
52
+ },
53
+ externalDocs: {
54
+ $ref: "#/$defs/external-documentation"
55
+ }
56
+ };
57
+ var required = [
58
+ "openapi",
59
+ "info"
60
+ ];
61
+ var anyOf = [
62
+ {
63
+ required: [
64
+ "paths"
65
+ ]
66
+ },
67
+ {
68
+ required: [
69
+ "components"
70
+ ]
71
+ },
72
+ {
73
+ required: [
74
+ "webhooks"
75
+ ]
76
+ }
77
+ ];
78
+ var $ref = "#/$defs/specification-extensions";
79
+ var unevaluatedProperties = false;
80
+ var $defs = {
81
+ info: {
82
+ $comment: "https://spec.openapis.org/oas/v3.1.0#info-object",
83
+ type: "object",
84
+ properties: {
85
+ title: {
86
+ type: "string"
87
+ },
88
+ summary: {
89
+ type: "string"
90
+ },
91
+ description: {
92
+ type: "string"
93
+ },
94
+ termsOfService: {
95
+ type: "string",
96
+ format: "uri"
97
+ },
98
+ contact: {
99
+ $ref: "#/$defs/contact"
100
+ },
101
+ license: {
102
+ $ref: "#/$defs/license"
103
+ },
104
+ version: {
105
+ type: "string"
106
+ }
107
+ },
108
+ required: [
109
+ "title",
110
+ "version"
111
+ ],
112
+ $ref: "#/$defs/specification-extensions",
113
+ unevaluatedProperties: false
114
+ },
115
+ contact: {
116
+ $comment: "https://spec.openapis.org/oas/v3.1.0#contact-object",
117
+ type: "object",
118
+ properties: {
119
+ name: {
120
+ type: "string"
121
+ },
122
+ url: {
123
+ type: "string",
124
+ format: "uri"
125
+ },
126
+ email: {
127
+ type: "string",
128
+ format: "email"
129
+ }
130
+ },
131
+ $ref: "#/$defs/specification-extensions",
132
+ unevaluatedProperties: false
133
+ },
134
+ license: {
135
+ $comment: "https://spec.openapis.org/oas/v3.1.0#license-object",
136
+ type: "object",
137
+ properties: {
138
+ name: {
139
+ type: "string"
140
+ },
141
+ identifier: {
142
+ type: "string"
143
+ },
144
+ url: {
145
+ type: "string",
146
+ format: "uri"
147
+ }
148
+ },
149
+ required: [
150
+ "name"
151
+ ],
152
+ dependentSchemas: {
153
+ identifier: {
154
+ not: {
155
+ required: [
156
+ "url"
157
+ ]
158
+ }
159
+ }
160
+ },
161
+ $ref: "#/$defs/specification-extensions",
162
+ unevaluatedProperties: false
163
+ },
164
+ server: {
165
+ $comment: "https://spec.openapis.org/oas/v3.1.0#server-object",
166
+ type: "object",
167
+ properties: {
168
+ url: {
169
+ type: "string"
170
+ },
171
+ description: {
172
+ type: "string"
173
+ },
174
+ variables: {
175
+ type: "object",
176
+ additionalProperties: {
177
+ $ref: "#/$defs/server-variable"
178
+ }
179
+ }
180
+ },
181
+ required: [
182
+ "url"
183
+ ],
184
+ $ref: "#/$defs/specification-extensions",
185
+ unevaluatedProperties: false
186
+ },
187
+ "server-variable": {
188
+ $comment: "https://spec.openapis.org/oas/v3.1.0#server-variable-object",
189
+ type: "object",
190
+ properties: {
191
+ "enum": {
192
+ type: "array",
193
+ items: {
194
+ type: "string"
195
+ },
196
+ minItems: 1
197
+ },
198
+ "default": {
199
+ type: "string"
200
+ },
201
+ description: {
202
+ type: "string"
203
+ }
204
+ },
205
+ required: [
206
+ "default"
207
+ ],
208
+ $ref: "#/$defs/specification-extensions",
209
+ unevaluatedProperties: false
210
+ },
211
+ components: {
212
+ $comment: "https://spec.openapis.org/oas/v3.1.0#components-object",
213
+ type: "object",
214
+ properties: {
215
+ schemas: {
216
+ type: "object",
217
+ additionalProperties: {
218
+ $ref: "#/$defs/schema"
219
+ }
220
+ },
221
+ responses: {
222
+ type: "object",
223
+ additionalProperties: {
224
+ $ref: "#/$defs/response-or-reference"
225
+ }
226
+ },
227
+ parameters: {
228
+ type: "object",
229
+ additionalProperties: {
230
+ $ref: "#/$defs/parameter-or-reference"
231
+ }
232
+ },
233
+ examples: {
234
+ type: "object",
235
+ additionalProperties: {
236
+ $ref: "#/$defs/example-or-reference"
237
+ }
238
+ },
239
+ requestBodies: {
240
+ type: "object",
241
+ additionalProperties: {
242
+ $ref: "#/$defs/request-body-or-reference"
243
+ }
244
+ },
245
+ headers: {
246
+ type: "object",
247
+ additionalProperties: {
248
+ $ref: "#/$defs/header-or-reference"
249
+ }
250
+ },
251
+ securitySchemes: {
252
+ type: "object",
253
+ additionalProperties: {
254
+ $ref: "#/$defs/security-scheme-or-reference"
255
+ }
256
+ },
257
+ links: {
258
+ type: "object",
259
+ additionalProperties: {
260
+ $ref: "#/$defs/link-or-reference"
261
+ }
262
+ },
263
+ callbacks: {
264
+ type: "object",
265
+ additionalProperties: {
266
+ $ref: "#/$defs/callbacks-or-reference"
267
+ }
268
+ },
269
+ pathItems: {
270
+ type: "object",
271
+ additionalProperties: {
272
+ $ref: "#/$defs/path-item-or-reference"
273
+ }
274
+ }
275
+ },
276
+ patternProperties: {
277
+ "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": {
278
+ $comment: "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected",
279
+ propertyNames: {
280
+ pattern: "^[a-zA-Z0-9._-]+$"
281
+ }
282
+ }
283
+ },
284
+ $ref: "#/$defs/specification-extensions",
285
+ unevaluatedProperties: false
286
+ },
287
+ paths: {
288
+ $comment: "https://spec.openapis.org/oas/v3.1.0#paths-object",
289
+ type: "object",
290
+ patternProperties: {
291
+ "^/": {
292
+ $ref: "#/$defs/path-item"
293
+ }
294
+ },
295
+ $ref: "#/$defs/specification-extensions",
296
+ unevaluatedProperties: false
297
+ },
298
+ "path-item": {
299
+ $comment: "https://spec.openapis.org/oas/v3.1.0#path-item-object",
300
+ type: "object",
301
+ properties: {
302
+ summary: {
303
+ type: "string"
304
+ },
305
+ description: {
306
+ type: "string"
307
+ },
308
+ servers: {
309
+ type: "array",
310
+ items: {
311
+ $ref: "#/$defs/server"
312
+ }
313
+ },
314
+ parameters: {
315
+ type: "array",
316
+ items: {
317
+ $ref: "#/$defs/parameter-or-reference"
318
+ }
319
+ },
320
+ get: {
321
+ $ref: "#/$defs/operation"
322
+ },
323
+ put: {
324
+ $ref: "#/$defs/operation"
325
+ },
326
+ post: {
327
+ $ref: "#/$defs/operation"
328
+ },
329
+ "delete": {
330
+ $ref: "#/$defs/operation"
331
+ },
332
+ options: {
333
+ $ref: "#/$defs/operation"
334
+ },
335
+ head: {
336
+ $ref: "#/$defs/operation"
337
+ },
338
+ patch: {
339
+ $ref: "#/$defs/operation"
340
+ },
341
+ trace: {
342
+ $ref: "#/$defs/operation"
343
+ }
344
+ },
345
+ $ref: "#/$defs/specification-extensions",
346
+ unevaluatedProperties: false
347
+ },
348
+ "path-item-or-reference": {
349
+ "if": {
350
+ type: "object",
351
+ required: [
352
+ "$ref"
353
+ ]
354
+ },
355
+ then: {
356
+ $ref: "#/$defs/reference"
357
+ },
358
+ "else": {
359
+ $ref: "#/$defs/path-item"
360
+ }
361
+ },
362
+ operation: {
363
+ $comment: "https://spec.openapis.org/oas/v3.1.0#operation-object",
364
+ type: "object",
365
+ properties: {
366
+ tags: {
367
+ type: "array",
368
+ items: {
369
+ type: "string"
370
+ }
371
+ },
372
+ summary: {
373
+ type: "string"
374
+ },
375
+ description: {
376
+ type: "string"
377
+ },
378
+ externalDocs: {
379
+ $ref: "#/$defs/external-documentation"
380
+ },
381
+ operationId: {
382
+ type: "string"
383
+ },
384
+ parameters: {
385
+ type: "array",
386
+ items: {
387
+ $ref: "#/$defs/parameter-or-reference"
388
+ }
389
+ },
390
+ requestBody: {
391
+ $ref: "#/$defs/request-body-or-reference"
392
+ },
393
+ responses: {
394
+ $ref: "#/$defs/responses"
395
+ },
396
+ callbacks: {
397
+ type: "object",
398
+ additionalProperties: {
399
+ $ref: "#/$defs/callbacks-or-reference"
400
+ }
401
+ },
402
+ deprecated: {
403
+ "default": false,
404
+ type: "boolean"
405
+ },
406
+ security: {
407
+ type: "array",
408
+ items: {
409
+ $ref: "#/$defs/security-requirement"
410
+ }
411
+ },
412
+ servers: {
413
+ type: "array",
414
+ items: {
415
+ $ref: "#/$defs/server"
416
+ }
417
+ }
418
+ },
419
+ $ref: "#/$defs/specification-extensions",
420
+ unevaluatedProperties: false
421
+ },
422
+ "external-documentation": {
423
+ $comment: "https://spec.openapis.org/oas/v3.1.0#external-documentation-object",
424
+ type: "object",
425
+ properties: {
426
+ description: {
427
+ type: "string"
428
+ },
429
+ url: {
430
+ type: "string",
431
+ format: "uri"
432
+ }
433
+ },
434
+ required: [
435
+ "url"
436
+ ],
437
+ $ref: "#/$defs/specification-extensions",
438
+ unevaluatedProperties: false
439
+ },
440
+ parameter: {
441
+ $comment: "https://spec.openapis.org/oas/v3.1.0#parameter-object",
442
+ type: "object",
443
+ properties: {
444
+ name: {
445
+ type: "string"
446
+ },
447
+ "in": {
448
+ "enum": [
449
+ "query",
450
+ "header",
451
+ "path",
452
+ "cookie"
453
+ ]
454
+ },
455
+ description: {
456
+ type: "string"
457
+ },
458
+ required: {
459
+ "default": false,
460
+ type: "boolean"
461
+ },
462
+ deprecated: {
463
+ "default": false,
464
+ type: "boolean"
465
+ },
466
+ schema: {
467
+ $ref: "#/$defs/schema"
468
+ },
469
+ content: {
470
+ $ref: "#/$defs/content",
471
+ minProperties: 1,
472
+ maxProperties: 1
473
+ }
474
+ },
475
+ required: [
476
+ "name",
477
+ "in"
478
+ ],
479
+ oneOf: [
480
+ {
481
+ required: [
482
+ "schema"
483
+ ]
484
+ },
485
+ {
486
+ required: [
487
+ "content"
488
+ ]
489
+ }
490
+ ],
491
+ "if": {
492
+ properties: {
493
+ "in": {
494
+ "const": "query"
495
+ }
496
+ },
497
+ required: [
498
+ "in"
499
+ ]
500
+ },
501
+ then: {
502
+ properties: {
503
+ allowEmptyValue: {
504
+ "default": false,
505
+ type: "boolean"
506
+ }
507
+ }
508
+ },
509
+ dependentSchemas: {
510
+ schema: {
511
+ properties: {
512
+ style: {
513
+ type: "string"
514
+ },
515
+ explode: {
516
+ type: "boolean"
517
+ }
518
+ },
519
+ allOf: [
520
+ {
521
+ $ref: "#/$defs/examples"
522
+ },
523
+ {
524
+ $ref: "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path"
525
+ },
526
+ {
527
+ $ref: "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header"
528
+ },
529
+ {
530
+ $ref: "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query"
531
+ },
532
+ {
533
+ $ref: "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie"
534
+ },
535
+ {
536
+ $ref: "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form"
537
+ }
538
+ ],
539
+ $defs: {
540
+ "styles-for-path": {
541
+ "if": {
542
+ properties: {
543
+ "in": {
544
+ "const": "path"
545
+ }
546
+ },
547
+ required: [
548
+ "in"
549
+ ]
550
+ },
551
+ then: {
552
+ properties: {
553
+ name: {
554
+ pattern: "[^/#?]+$"
555
+ },
556
+ style: {
557
+ "default": "simple",
558
+ "enum": [
559
+ "matrix",
560
+ "label",
561
+ "simple"
562
+ ]
563
+ },
564
+ required: {
565
+ "const": true
566
+ }
567
+ },
568
+ required: [
569
+ "required"
570
+ ]
571
+ }
572
+ },
573
+ "styles-for-header": {
574
+ "if": {
575
+ properties: {
576
+ "in": {
577
+ "const": "header"
578
+ }
579
+ },
580
+ required: [
581
+ "in"
582
+ ]
583
+ },
584
+ then: {
585
+ properties: {
586
+ style: {
587
+ "default": "simple",
588
+ "const": "simple"
589
+ }
590
+ }
591
+ }
592
+ },
593
+ "styles-for-query": {
594
+ "if": {
595
+ properties: {
596
+ "in": {
597
+ "const": "query"
598
+ }
599
+ },
600
+ required: [
601
+ "in"
602
+ ]
603
+ },
604
+ then: {
605
+ properties: {
606
+ style: {
607
+ "default": "form",
608
+ "enum": [
609
+ "form",
610
+ "spaceDelimited",
611
+ "pipeDelimited",
612
+ "deepObject"
613
+ ]
614
+ },
615
+ allowReserved: {
616
+ "default": false,
617
+ type: "boolean"
618
+ }
619
+ }
620
+ }
621
+ },
622
+ "styles-for-cookie": {
623
+ "if": {
624
+ properties: {
625
+ "in": {
626
+ "const": "cookie"
627
+ }
628
+ },
629
+ required: [
630
+ "in"
631
+ ]
632
+ },
633
+ then: {
634
+ properties: {
635
+ style: {
636
+ "default": "form",
637
+ "const": "form"
638
+ }
639
+ }
640
+ }
641
+ },
642
+ "styles-for-form": {
643
+ "if": {
644
+ properties: {
645
+ style: {
646
+ "const": "form"
647
+ }
648
+ },
649
+ required: [
650
+ "style"
651
+ ]
652
+ },
653
+ then: {
654
+ properties: {
655
+ explode: {
656
+ "default": true
657
+ }
658
+ }
659
+ },
660
+ "else": {
661
+ properties: {
662
+ explode: {
663
+ "default": false
664
+ }
665
+ }
666
+ }
667
+ }
668
+ }
669
+ }
670
+ },
671
+ $ref: "#/$defs/specification-extensions",
672
+ unevaluatedProperties: false
673
+ },
674
+ "parameter-or-reference": {
675
+ "if": {
676
+ type: "object",
677
+ required: [
678
+ "$ref"
679
+ ]
680
+ },
681
+ then: {
682
+ $ref: "#/$defs/reference"
683
+ },
684
+ "else": {
685
+ $ref: "#/$defs/parameter"
686
+ }
687
+ },
688
+ "request-body": {
689
+ $comment: "https://spec.openapis.org/oas/v3.1.0#request-body-object",
690
+ type: "object",
691
+ properties: {
692
+ description: {
693
+ type: "string"
694
+ },
695
+ content: {
696
+ $ref: "#/$defs/content"
697
+ },
698
+ required: {
699
+ "default": false,
700
+ type: "boolean"
701
+ }
702
+ },
703
+ required: [
704
+ "content"
705
+ ],
706
+ $ref: "#/$defs/specification-extensions",
707
+ unevaluatedProperties: false
708
+ },
709
+ "request-body-or-reference": {
710
+ "if": {
711
+ type: "object",
712
+ required: [
713
+ "$ref"
714
+ ]
715
+ },
716
+ then: {
717
+ $ref: "#/$defs/reference"
718
+ },
719
+ "else": {
720
+ $ref: "#/$defs/request-body"
721
+ }
722
+ },
723
+ content: {
724
+ $comment: "https://spec.openapis.org/oas/v3.1.0#fixed-fields-10",
725
+ type: "object",
726
+ additionalProperties: {
727
+ $ref: "#/$defs/media-type"
728
+ },
729
+ propertyNames: {
730
+ format: "media-range"
731
+ }
732
+ },
733
+ "media-type": {
734
+ $comment: "https://spec.openapis.org/oas/v3.1.0#media-type-object",
735
+ type: "object",
736
+ properties: {
737
+ schema: {
738
+ $ref: "#/$defs/schema"
739
+ },
740
+ encoding: {
741
+ type: "object",
742
+ additionalProperties: {
743
+ $ref: "#/$defs/encoding"
744
+ }
745
+ }
746
+ },
747
+ allOf: [
748
+ {
749
+ $ref: "#/$defs/specification-extensions"
750
+ },
751
+ {
752
+ $ref: "#/$defs/examples"
753
+ }
754
+ ],
755
+ unevaluatedProperties: false
756
+ },
757
+ encoding: {
758
+ $comment: "https://spec.openapis.org/oas/v3.1.0#encoding-object",
759
+ type: "object",
760
+ properties: {
761
+ contentType: {
762
+ type: "string",
763
+ format: "media-range"
764
+ },
765
+ headers: {
766
+ type: "object",
767
+ additionalProperties: {
768
+ $ref: "#/$defs/header-or-reference"
769
+ }
770
+ },
771
+ style: {
772
+ "default": "form",
773
+ "enum": [
774
+ "form",
775
+ "spaceDelimited",
776
+ "pipeDelimited",
777
+ "deepObject"
778
+ ]
779
+ },
780
+ explode: {
781
+ type: "boolean"
782
+ },
783
+ allowReserved: {
784
+ "default": false,
785
+ type: "boolean"
786
+ }
787
+ },
788
+ allOf: [
789
+ {
790
+ $ref: "#/$defs/specification-extensions"
791
+ },
792
+ {
793
+ $ref: "#/$defs/encoding/$defs/explode-default"
794
+ }
795
+ ],
796
+ unevaluatedProperties: false,
797
+ $defs: {
798
+ "explode-default": {
799
+ "if": {
800
+ properties: {
801
+ style: {
802
+ "const": "form"
803
+ }
804
+ },
805
+ required: [
806
+ "style"
807
+ ]
808
+ },
809
+ then: {
810
+ properties: {
811
+ explode: {
812
+ "default": true
813
+ }
814
+ }
815
+ },
816
+ "else": {
817
+ properties: {
818
+ explode: {
819
+ "default": false
820
+ }
821
+ }
822
+ }
823
+ }
824
+ }
825
+ },
826
+ responses: {
827
+ $comment: "https://spec.openapis.org/oas/v3.1.0#responses-object",
828
+ type: "object",
829
+ properties: {
830
+ "default": {
831
+ $ref: "#/$defs/response-or-reference"
832
+ }
833
+ },
834
+ patternProperties: {
835
+ "^[1-5](?:[0-9]{2}|XX)$": {
836
+ $ref: "#/$defs/response-or-reference"
837
+ }
838
+ },
839
+ minProperties: 1,
840
+ $ref: "#/$defs/specification-extensions",
841
+ unevaluatedProperties: false
842
+ },
843
+ response: {
844
+ $comment: "https://spec.openapis.org/oas/v3.1.0#response-object",
845
+ type: "object",
846
+ properties: {
847
+ description: {
848
+ type: "string"
849
+ },
850
+ headers: {
851
+ type: "object",
852
+ additionalProperties: {
853
+ $ref: "#/$defs/header-or-reference"
854
+ }
855
+ },
856
+ content: {
857
+ $ref: "#/$defs/content"
858
+ },
859
+ links: {
860
+ type: "object",
861
+ additionalProperties: {
862
+ $ref: "#/$defs/link-or-reference"
863
+ }
864
+ }
865
+ },
866
+ required: [
867
+ "description"
868
+ ],
869
+ $ref: "#/$defs/specification-extensions",
870
+ unevaluatedProperties: false
871
+ },
872
+ "response-or-reference": {
873
+ "if": {
874
+ type: "object",
875
+ required: [
876
+ "$ref"
877
+ ]
878
+ },
879
+ then: {
880
+ $ref: "#/$defs/reference"
881
+ },
882
+ "else": {
883
+ $ref: "#/$defs/response"
884
+ }
885
+ },
886
+ callbacks: {
887
+ $comment: "https://spec.openapis.org/oas/v3.1.0#callback-object",
888
+ type: "object",
889
+ $ref: "#/$defs/specification-extensions",
890
+ additionalProperties: {
891
+ $ref: "#/$defs/path-item-or-reference"
892
+ }
893
+ },
894
+ "callbacks-or-reference": {
895
+ "if": {
896
+ type: "object",
897
+ required: [
898
+ "$ref"
899
+ ]
900
+ },
901
+ then: {
902
+ $ref: "#/$defs/reference"
903
+ },
904
+ "else": {
905
+ $ref: "#/$defs/callbacks"
906
+ }
907
+ },
908
+ example: {
909
+ $comment: "https://spec.openapis.org/oas/v3.1.0#example-object",
910
+ type: "object",
911
+ properties: {
912
+ summary: {
913
+ type: "string"
914
+ },
915
+ description: {
916
+ type: "string"
917
+ },
918
+ value: true,
919
+ externalValue: {
920
+ type: "string",
921
+ format: "uri"
922
+ }
923
+ },
924
+ not: {
925
+ required: [
926
+ "value",
927
+ "externalValue"
928
+ ]
929
+ },
930
+ $ref: "#/$defs/specification-extensions",
931
+ unevaluatedProperties: false
932
+ },
933
+ "example-or-reference": {
934
+ "if": {
935
+ type: "object",
936
+ required: [
937
+ "$ref"
938
+ ]
939
+ },
940
+ then: {
941
+ $ref: "#/$defs/reference"
942
+ },
943
+ "else": {
944
+ $ref: "#/$defs/example"
945
+ }
946
+ },
947
+ link: {
948
+ $comment: "https://spec.openapis.org/oas/v3.1.0#link-object",
949
+ type: "object",
950
+ properties: {
951
+ operationRef: {
952
+ type: "string",
953
+ format: "uri-reference"
954
+ },
955
+ operationId: {
956
+ type: "string"
957
+ },
958
+ parameters: {
959
+ $ref: "#/$defs/map-of-strings"
960
+ },
961
+ requestBody: true,
962
+ description: {
963
+ type: "string"
964
+ },
965
+ body: {
966
+ $ref: "#/$defs/server"
967
+ }
968
+ },
969
+ oneOf: [
970
+ {
971
+ required: [
972
+ "operationRef"
973
+ ]
974
+ },
975
+ {
976
+ required: [
977
+ "operationId"
978
+ ]
979
+ }
980
+ ],
981
+ $ref: "#/$defs/specification-extensions",
982
+ unevaluatedProperties: false
983
+ },
984
+ "link-or-reference": {
985
+ "if": {
986
+ type: "object",
987
+ required: [
988
+ "$ref"
989
+ ]
990
+ },
991
+ then: {
992
+ $ref: "#/$defs/reference"
993
+ },
994
+ "else": {
995
+ $ref: "#/$defs/link"
996
+ }
997
+ },
998
+ header: {
999
+ $comment: "https://spec.openapis.org/oas/v3.1.0#header-object",
1000
+ type: "object",
1001
+ properties: {
1002
+ description: {
1003
+ type: "string"
1004
+ },
1005
+ required: {
1006
+ "default": false,
1007
+ type: "boolean"
1008
+ },
1009
+ deprecated: {
1010
+ "default": false,
1011
+ type: "boolean"
1012
+ },
1013
+ schema: {
1014
+ $ref: "#/$defs/schema"
1015
+ },
1016
+ content: {
1017
+ $ref: "#/$defs/content",
1018
+ minProperties: 1,
1019
+ maxProperties: 1
1020
+ }
1021
+ },
1022
+ oneOf: [
1023
+ {
1024
+ required: [
1025
+ "schema"
1026
+ ]
1027
+ },
1028
+ {
1029
+ required: [
1030
+ "content"
1031
+ ]
1032
+ }
1033
+ ],
1034
+ dependentSchemas: {
1035
+ schema: {
1036
+ properties: {
1037
+ style: {
1038
+ "default": "simple",
1039
+ "const": "simple"
1040
+ },
1041
+ explode: {
1042
+ "default": false,
1043
+ type: "boolean"
1044
+ }
1045
+ },
1046
+ $ref: "#/$defs/examples"
1047
+ }
1048
+ },
1049
+ $ref: "#/$defs/specification-extensions",
1050
+ unevaluatedProperties: false
1051
+ },
1052
+ "header-or-reference": {
1053
+ "if": {
1054
+ type: "object",
1055
+ required: [
1056
+ "$ref"
1057
+ ]
1058
+ },
1059
+ then: {
1060
+ $ref: "#/$defs/reference"
1061
+ },
1062
+ "else": {
1063
+ $ref: "#/$defs/header"
1064
+ }
1065
+ },
1066
+ tag: {
1067
+ $comment: "https://spec.openapis.org/oas/v3.1.0#tag-object",
1068
+ type: "object",
1069
+ properties: {
1070
+ name: {
1071
+ type: "string"
1072
+ },
1073
+ description: {
1074
+ type: "string"
1075
+ },
1076
+ externalDocs: {
1077
+ $ref: "#/$defs/external-documentation"
1078
+ }
1079
+ },
1080
+ required: [
1081
+ "name"
1082
+ ],
1083
+ $ref: "#/$defs/specification-extensions",
1084
+ unevaluatedProperties: false
1085
+ },
1086
+ reference: {
1087
+ $comment: "https://spec.openapis.org/oas/v3.1.0#reference-object",
1088
+ type: "object",
1089
+ properties: {
1090
+ $ref: {
1091
+ type: "string",
1092
+ format: "uri-reference"
1093
+ },
1094
+ summary: {
1095
+ type: "string"
1096
+ },
1097
+ description: {
1098
+ type: "string"
1099
+ }
1100
+ },
1101
+ unevaluatedProperties: false
1102
+ },
1103
+ schema: {
1104
+ $comment: "https://spec.openapis.org/oas/v3.1.0#schema-object",
1105
+ $dynamicAnchor: "meta",
1106
+ type: [
1107
+ "object",
1108
+ "boolean"
1109
+ ]
1110
+ },
1111
+ "security-scheme": {
1112
+ $comment: "https://spec.openapis.org/oas/v3.1.0#security-scheme-object",
1113
+ type: "object",
1114
+ properties: {
1115
+ type: {
1116
+ "enum": [
1117
+ "apiKey",
1118
+ "http",
1119
+ "mutualTLS",
1120
+ "oauth2",
1121
+ "openIdConnect"
1122
+ ]
1123
+ },
1124
+ description: {
1125
+ type: "string"
1126
+ }
1127
+ },
1128
+ required: [
1129
+ "type"
1130
+ ],
1131
+ allOf: [
1132
+ {
1133
+ $ref: "#/$defs/specification-extensions"
1134
+ },
1135
+ {
1136
+ $ref: "#/$defs/security-scheme/$defs/type-apikey"
1137
+ },
1138
+ {
1139
+ $ref: "#/$defs/security-scheme/$defs/type-http"
1140
+ },
1141
+ {
1142
+ $ref: "#/$defs/security-scheme/$defs/type-http-bearer"
1143
+ },
1144
+ {
1145
+ $ref: "#/$defs/security-scheme/$defs/type-oauth2"
1146
+ },
1147
+ {
1148
+ $ref: "#/$defs/security-scheme/$defs/type-oidc"
1149
+ }
1150
+ ],
1151
+ unevaluatedProperties: false,
1152
+ $defs: {
1153
+ "type-apikey": {
1154
+ "if": {
1155
+ properties: {
1156
+ type: {
1157
+ "const": "apiKey"
1158
+ }
1159
+ },
1160
+ required: [
1161
+ "type"
1162
+ ]
1163
+ },
1164
+ then: {
1165
+ properties: {
1166
+ name: {
1167
+ type: "string"
1168
+ },
1169
+ "in": {
1170
+ "enum": [
1171
+ "query",
1172
+ "header",
1173
+ "cookie"
1174
+ ]
1175
+ }
1176
+ },
1177
+ required: [
1178
+ "name",
1179
+ "in"
1180
+ ]
1181
+ }
1182
+ },
1183
+ "type-http": {
1184
+ "if": {
1185
+ properties: {
1186
+ type: {
1187
+ "const": "http"
1188
+ }
1189
+ },
1190
+ required: [
1191
+ "type"
1192
+ ]
1193
+ },
1194
+ then: {
1195
+ properties: {
1196
+ scheme: {
1197
+ type: "string"
1198
+ }
1199
+ },
1200
+ required: [
1201
+ "scheme"
1202
+ ]
1203
+ }
1204
+ },
1205
+ "type-http-bearer": {
1206
+ "if": {
1207
+ properties: {
1208
+ type: {
1209
+ "const": "http"
1210
+ },
1211
+ scheme: {
1212
+ type: "string",
1213
+ pattern: "^[Bb][Ee][Aa][Rr][Ee][Rr]$"
1214
+ }
1215
+ },
1216
+ required: [
1217
+ "type",
1218
+ "scheme"
1219
+ ]
1220
+ },
1221
+ then: {
1222
+ properties: {
1223
+ bearerFormat: {
1224
+ type: "string"
1225
+ }
1226
+ }
1227
+ }
1228
+ },
1229
+ "type-oauth2": {
1230
+ "if": {
1231
+ properties: {
1232
+ type: {
1233
+ "const": "oauth2"
1234
+ }
1235
+ },
1236
+ required: [
1237
+ "type"
1238
+ ]
1239
+ },
1240
+ then: {
1241
+ properties: {
1242
+ flows: {
1243
+ $ref: "#/$defs/oauth-flows"
1244
+ }
1245
+ },
1246
+ required: [
1247
+ "flows"
1248
+ ]
1249
+ }
1250
+ },
1251
+ "type-oidc": {
1252
+ "if": {
1253
+ properties: {
1254
+ type: {
1255
+ "const": "openIdConnect"
1256
+ }
1257
+ },
1258
+ required: [
1259
+ "type"
1260
+ ]
1261
+ },
1262
+ then: {
1263
+ properties: {
1264
+ openIdConnectUrl: {
1265
+ type: "string",
1266
+ format: "uri"
1267
+ }
1268
+ },
1269
+ required: [
1270
+ "openIdConnectUrl"
1271
+ ]
1272
+ }
1273
+ }
1274
+ }
1275
+ },
1276
+ "security-scheme-or-reference": {
1277
+ "if": {
1278
+ type: "object",
1279
+ required: [
1280
+ "$ref"
1281
+ ]
1282
+ },
1283
+ then: {
1284
+ $ref: "#/$defs/reference"
1285
+ },
1286
+ "else": {
1287
+ $ref: "#/$defs/security-scheme"
1288
+ }
1289
+ },
1290
+ "oauth-flows": {
1291
+ type: "object",
1292
+ properties: {
1293
+ implicit: {
1294
+ $ref: "#/$defs/oauth-flows/$defs/implicit"
1295
+ },
1296
+ password: {
1297
+ $ref: "#/$defs/oauth-flows/$defs/password"
1298
+ },
1299
+ clientCredentials: {
1300
+ $ref: "#/$defs/oauth-flows/$defs/client-credentials"
1301
+ },
1302
+ authorizationCode: {
1303
+ $ref: "#/$defs/oauth-flows/$defs/authorization-code"
1304
+ }
1305
+ },
1306
+ $ref: "#/$defs/specification-extensions",
1307
+ unevaluatedProperties: false,
1308
+ $defs: {
1309
+ implicit: {
1310
+ type: "object",
1311
+ properties: {
1312
+ authorizationUrl: {
1313
+ type: "string",
1314
+ format: "uri"
1315
+ },
1316
+ refreshUrl: {
1317
+ type: "string",
1318
+ format: "uri"
1319
+ },
1320
+ scopes: {
1321
+ $ref: "#/$defs/map-of-strings"
1322
+ }
1323
+ },
1324
+ required: [
1325
+ "authorizationUrl",
1326
+ "scopes"
1327
+ ],
1328
+ $ref: "#/$defs/specification-extensions",
1329
+ unevaluatedProperties: false
1330
+ },
1331
+ password: {
1332
+ type: "object",
1333
+ properties: {
1334
+ tokenUrl: {
1335
+ type: "string",
1336
+ format: "uri"
1337
+ },
1338
+ refreshUrl: {
1339
+ type: "string",
1340
+ format: "uri"
1341
+ },
1342
+ scopes: {
1343
+ $ref: "#/$defs/map-of-strings"
1344
+ }
1345
+ },
1346
+ required: [
1347
+ "tokenUrl",
1348
+ "scopes"
1349
+ ],
1350
+ $ref: "#/$defs/specification-extensions",
1351
+ unevaluatedProperties: false
1352
+ },
1353
+ "client-credentials": {
1354
+ type: "object",
1355
+ properties: {
1356
+ tokenUrl: {
1357
+ type: "string",
1358
+ format: "uri"
1359
+ },
1360
+ refreshUrl: {
1361
+ type: "string",
1362
+ format: "uri"
1363
+ },
1364
+ scopes: {
1365
+ $ref: "#/$defs/map-of-strings"
1366
+ }
1367
+ },
1368
+ required: [
1369
+ "tokenUrl",
1370
+ "scopes"
1371
+ ],
1372
+ $ref: "#/$defs/specification-extensions",
1373
+ unevaluatedProperties: false
1374
+ },
1375
+ "authorization-code": {
1376
+ type: "object",
1377
+ properties: {
1378
+ authorizationUrl: {
1379
+ type: "string",
1380
+ format: "uri"
1381
+ },
1382
+ tokenUrl: {
1383
+ type: "string",
1384
+ format: "uri"
1385
+ },
1386
+ refreshUrl: {
1387
+ type: "string",
1388
+ format: "uri"
1389
+ },
1390
+ scopes: {
1391
+ $ref: "#/$defs/map-of-strings"
1392
+ }
1393
+ },
1394
+ required: [
1395
+ "authorizationUrl",
1396
+ "tokenUrl",
1397
+ "scopes"
1398
+ ],
1399
+ $ref: "#/$defs/specification-extensions",
1400
+ unevaluatedProperties: false
1401
+ }
1402
+ }
1403
+ },
1404
+ "security-requirement": {
1405
+ $comment: "https://spec.openapis.org/oas/v3.1.0#security-requirement-object",
1406
+ type: "object",
1407
+ additionalProperties: {
1408
+ type: "array",
1409
+ items: {
1410
+ type: "string"
1411
+ }
1412
+ }
1413
+ },
1414
+ "specification-extensions": {
1415
+ $comment: "https://spec.openapis.org/oas/v3.1.0#specification-extensions",
1416
+ patternProperties: {
1417
+ "^x-": true
1418
+ }
1419
+ },
1420
+ examples: {
1421
+ properties: {
1422
+ example: true,
1423
+ examples: {
1424
+ type: "object",
1425
+ additionalProperties: {
1426
+ $ref: "#/$defs/example-or-reference"
1427
+ }
1428
+ }
1429
+ }
1430
+ },
1431
+ "map-of-strings": {
1432
+ type: "object",
1433
+ additionalProperties: {
1434
+ type: "string"
1435
+ }
1436
+ }
1437
+ };
1438
+ var OpenApi31 = {
1439
+ $id: $id,
1440
+ $schema: $schema,
1441
+ description: description,
1442
+ type: type,
1443
+ properties: properties,
1444
+ required: required,
1445
+ anyOf: anyOf,
1446
+ $ref: $ref,
1447
+ unevaluatedProperties: unevaluatedProperties,
1448
+ $defs: $defs
1449
+ };
1450
+
1451
+ export { $defs, $id, $ref, $schema, anyOf, OpenApi31 as default, description, properties, required, type, unevaluatedProperties };