@kubb/agent 4.33.2 → 4.33.4
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.
- package/.output/nitro.json +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +13 -7
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/node_modules/@babel/runtime/package.json +1 -1
- package/.output/server/node_modules/@readme/openapi-parser/package.json +3 -3
- package/.output/server/node_modules/@redocly/config/lib/asyncapi-config-schema.js +53 -0
- package/.output/server/node_modules/@redocly/config/lib/default-theme-config-schema.js +2 -0
- package/.output/server/node_modules/@redocly/config/lib/ex-theme-config-schemas.js +2 -1
- package/.output/server/node_modules/@redocly/config/lib/remove-property-recursively.js +7 -4
- package/.output/server/node_modules/@redocly/config/package.json +2 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-in.js +54 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-out.js +54 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas2/index.js +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas3/index.js +1 -1
- package/.output/server/node_modules/@redocly/openapi-core/package.json +2 -2
- package/.output/server/node_modules/ajv/.runkit_example.js +23 -0
- package/.output/server/node_modules/ajv/LICENSE +22 -0
- package/.output/server/node_modules/ajv/README.md +207 -0
- package/.output/server/node_modules/ajv/dist/2019.d.ts +19 -0
- package/.output/server/node_modules/ajv/dist/2019.js +61 -0
- package/.output/server/node_modules/ajv/dist/2019.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/2020.d.ts +19 -0
- package/.output/server/node_modules/ajv/dist/2020.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/ajv.d.ts +18 -0
- package/.output/server/node_modules/ajv/dist/ajv.js +50 -0
- package/.output/server/node_modules/ajv/dist/ajv.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/codegen/code.d.ts +40 -0
- package/.output/server/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/codegen/index.d.ts +79 -0
- package/.output/server/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/codegen/scope.d.ts +79 -0
- package/.output/server/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/errors.d.ts +13 -0
- package/.output/server/node_modules/ajv/dist/compile/errors.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/index.d.ts +80 -0
- package/.output/server/node_modules/ajv/dist/compile/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/jtd/parse.d.ts +4 -0
- package/.output/server/node_modules/ajv/dist/compile/jtd/parse.js +350 -0
- package/.output/server/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/jtd/serialize.d.ts +4 -0
- package/.output/server/node_modules/ajv/dist/compile/jtd/serialize.js +229 -0
- package/.output/server/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/jtd/types.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/compile/jtd/types.js +14 -0
- package/.output/server/node_modules/ajv/dist/compile/jtd/types.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/names.d.ts +20 -0
- package/.output/server/node_modules/ajv/dist/compile/names.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/ref_error.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/resolve.d.ts +12 -0
- package/.output/server/node_modules/ajv/dist/compile/resolve.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/rules.d.ts +28 -0
- package/.output/server/node_modules/ajv/dist/compile/rules.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/util.d.ts +40 -0
- package/.output/server/node_modules/ajv/dist/compile/util.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/applicability.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +4 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/dataType.d.ts +17 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/defaults.d.ts +2 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/index.d.ts +42 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/keyword.d.ts +8 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/subschema.d.ts +47 -0
- package/.output/server/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/core.d.ts +173 -0
- package/.output/server/node_modules/ajv/dist/core.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/jtd.d.ts +47 -0
- package/.output/server/node_modules/ajv/dist/jtd.js +72 -0
- package/.output/server/node_modules/ajv/dist/jtd.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +2 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +28 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +53 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +17 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +57 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +14 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +37 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +90 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +39 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +2 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-draft-06.json +137 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
- package/.output/server/node_modules/ajv/dist/refs/json-schema-secure.json +88 -0
- package/.output/server/node_modules/ajv/dist/refs/jtd-schema.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/refs/jtd-schema.js +118 -0
- package/.output/server/node_modules/ajv/dist/refs/jtd-schema.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/runtime/equal.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/runtime/equal.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/runtime/parseJson.d.ts +18 -0
- package/.output/server/node_modules/ajv/dist/runtime/parseJson.js +185 -0
- package/.output/server/node_modules/ajv/dist/runtime/parseJson.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/runtime/quote.d.ts +5 -0
- package/.output/server/node_modules/ajv/dist/runtime/quote.js +30 -0
- package/.output/server/node_modules/ajv/dist/runtime/quote.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/runtime/re2.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/runtime/re2.js +6 -0
- package/.output/server/node_modules/ajv/dist/runtime/re2.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/runtime/timestamp.d.ts +5 -0
- package/.output/server/node_modules/ajv/dist/runtime/timestamp.js +42 -0
- package/.output/server/node_modules/ajv/dist/runtime/timestamp.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/runtime/ucs2length.d.ts +5 -0
- package/.output/server/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/runtime/uri.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/runtime/validation_error.d.ts +7 -0
- package/.output/server/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/standalone/index.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/standalone/index.js +90 -0
- package/.output/server/node_modules/ajv/dist/standalone/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/standalone/instance.d.ts +12 -0
- package/.output/server/node_modules/ajv/dist/standalone/instance.js +35 -0
- package/.output/server/node_modules/ajv/dist/standalone/instance.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/types/index.d.ts +183 -0
- package/.output/server/node_modules/ajv/dist/types/index.js +3 -0
- package/.output/server/node_modules/ajv/dist/types/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/types/json-schema.d.ts +125 -0
- package/.output/server/node_modules/ajv/dist/types/json-schema.js +3 -0
- package/.output/server/node_modules/ajv/dist/types/json-schema.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/types/jtd-schema.d.ts +174 -0
- package/.output/server/node_modules/ajv/dist/types/jtd-schema.js +3 -0
- package/.output/server/node_modules/ajv/dist/types/jtd-schema.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +8 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +4 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +7 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +21 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +13 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +5 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +4 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/code.d.ts +17 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/core/id.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/core/index.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/core/ref.d.ts +8 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +5 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +10 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/draft2020.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/draft2020.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/draft7.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +5 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +5 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/errors.d.ts +9 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/errors.js +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/errors.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/format/format.d.ts +8 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/format/index.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +71 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +5 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/elements.js +24 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/elements.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/enum.js +43 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +9 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/error.js +20 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/error.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +10 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/index.js +29 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +5 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/metadata.js +25 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +4 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/nullable.js +22 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +15 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +22 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/properties.js +149 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +4 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/ref.js +67 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +10 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/type.js +69 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/type.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/union.js +12 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/union.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +5 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/values.js +51 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/jtd/values.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/metadata.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/next.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/next.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/const.d.ts +6 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +5 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +8 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/index.d.ts +16 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +11 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +3 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +8 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +8 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/required.d.ts +8 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +9 -0
- package/.output/server/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
- package/.output/server/node_modules/ajv/lib/2019.ts +81 -0
- package/.output/server/node_modules/ajv/lib/2020.ts +75 -0
- package/.output/server/node_modules/ajv/lib/ajv.ts +70 -0
- package/.output/server/node_modules/ajv/lib/compile/codegen/code.ts +169 -0
- package/.output/server/node_modules/ajv/lib/compile/codegen/index.ts +852 -0
- package/.output/server/node_modules/ajv/lib/compile/codegen/scope.ts +215 -0
- package/.output/server/node_modules/ajv/lib/compile/errors.ts +184 -0
- package/.output/server/node_modules/ajv/lib/compile/index.ts +324 -0
- package/.output/server/node_modules/ajv/lib/compile/jtd/parse.ts +411 -0
- package/.output/server/node_modules/ajv/lib/compile/jtd/serialize.ts +266 -0
- package/.output/server/node_modules/ajv/lib/compile/jtd/types.ts +16 -0
- package/.output/server/node_modules/ajv/lib/compile/names.ts +27 -0
- package/.output/server/node_modules/ajv/lib/compile/ref_error.ts +13 -0
- package/.output/server/node_modules/ajv/lib/compile/resolve.ts +149 -0
- package/.output/server/node_modules/ajv/lib/compile/rules.ts +50 -0
- package/.output/server/node_modules/ajv/lib/compile/util.ts +213 -0
- package/.output/server/node_modules/ajv/lib/compile/validate/applicability.ts +22 -0
- package/.output/server/node_modules/ajv/lib/compile/validate/boolSchema.ts +47 -0
- package/.output/server/node_modules/ajv/lib/compile/validate/dataType.ts +230 -0
- package/.output/server/node_modules/ajv/lib/compile/validate/defaults.ts +32 -0
- package/.output/server/node_modules/ajv/lib/compile/validate/index.ts +582 -0
- package/.output/server/node_modules/ajv/lib/compile/validate/keyword.ts +171 -0
- package/.output/server/node_modules/ajv/lib/compile/validate/subschema.ts +135 -0
- package/.output/server/node_modules/ajv/lib/core.ts +891 -0
- package/.output/server/node_modules/ajv/lib/jtd.ts +132 -0
- package/.output/server/node_modules/ajv/lib/refs/data.json +13 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +28 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +53 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +17 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +57 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +14 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +37 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +90 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +39 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +30 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +48 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +17 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +51 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +37 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +90 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +55 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-draft-06.json +137 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-draft-07.json +151 -0
- package/.output/server/node_modules/ajv/lib/refs/json-schema-secure.json +88 -0
- package/.output/server/node_modules/ajv/lib/refs/jtd-schema.ts +130 -0
- package/.output/server/node_modules/ajv/lib/runtime/equal.ts +7 -0
- package/.output/server/node_modules/ajv/lib/runtime/parseJson.ts +177 -0
- package/.output/server/node_modules/ajv/lib/runtime/quote.ts +31 -0
- package/.output/server/node_modules/ajv/lib/runtime/re2.ts +6 -0
- package/.output/server/node_modules/ajv/lib/runtime/timestamp.ts +46 -0
- package/.output/server/node_modules/ajv/lib/runtime/ucs2length.ts +20 -0
- package/.output/server/node_modules/ajv/lib/runtime/uri.ts +6 -0
- package/.output/server/node_modules/ajv/lib/runtime/validation_error.ts +13 -0
- package/.output/server/node_modules/ajv/lib/standalone/index.ts +100 -0
- package/.output/server/node_modules/ajv/lib/standalone/instance.ts +36 -0
- package/.output/server/node_modules/ajv/lib/types/index.ts +244 -0
- package/.output/server/node_modules/ajv/lib/types/json-schema.ts +187 -0
- package/.output/server/node_modules/ajv/lib/types/jtd-schema.ts +273 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +56 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +118 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +22 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +14 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/contains.ts +109 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +112 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +11 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/if.ts +80 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/index.ts +53 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/items.ts +59 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +36 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/not.ts +38 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +82 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +91 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +12 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/properties.ts +57 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +50 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +13 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/code.ts +168 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/core/id.ts +10 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/core/index.ts +16 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/core/ref.ts +129 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/discriminator/index.ts +113 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/discriminator/types.ts +12 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/draft2020.ts +23 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/draft7.ts +17 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +31 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +51 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/dynamic/index.ts +9 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +14 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +10 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/errors.ts +18 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/format/format.ts +120 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/format/index.ts +6 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +89 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/elements.ts +32 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/enum.ts +45 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/error.ts +23 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/index.ts +37 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +24 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +21 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +15 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/properties.ts +184 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/ref.ts +76 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/type.ts +75 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/union.ts +12 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/jtd/values.ts +58 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/metadata.ts +17 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/next.ts +8 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +7 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +47 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +85 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/const.ts +28 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +23 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/enum.ts +54 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/index.ts +49 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +16 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +26 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +30 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +42 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +26 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +34 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/pattern.ts +28 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/required.ts +98 -0
- package/.output/server/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +79 -0
- package/.output/server/node_modules/ajv/package.json +1 -1
- package/.output/server/node_modules/oas/dist/{chunk-SH63AK3O.js → chunk-5EP6HY2E.js} +159 -70
- package/.output/server/node_modules/oas/dist/{chunk-L3V5TF63.js → chunk-7MARUOFZ.js} +1 -9
- package/.output/server/node_modules/oas/dist/{chunk-BOVZLW7Q.js → chunk-HGVFNEKW.js} +517 -126
- package/.output/server/node_modules/oas/dist/{chunk-JMLIY2LK.js → chunk-LSH3X5NA.js} +124 -191
- package/.output/server/node_modules/oas/dist/{chunk-TTCGKV5E.js → chunk-S27IGTVG.js} +4 -1
- package/.output/server/node_modules/oas/dist/chunk-VA3NKXX7.js +9 -0
- package/.output/server/node_modules/oas/dist/index.js +6 -6
- package/.output/server/node_modules/oas/dist/types.js +1 -5
- package/.output/server/node_modules/oas/dist/utils.js +6 -6
- package/.output/server/node_modules/oas/package.json +8 -6
- package/.output/server/node_modules/oas-normalize/package.json +5 -5
- package/.output/server/package.json +7 -7
- package/package.json +16 -16
- package/.output/server/node_modules/oas/dist/chunk-LV26LN7C.js +0 -27
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Operation,
|
|
3
|
-
Webhook
|
|
4
|
-
|
|
3
|
+
Webhook,
|
|
4
|
+
buildDiscriminatorOneOf,
|
|
5
|
+
findDiscriminatorChildren
|
|
6
|
+
} from "./chunk-HGVFNEKW.js";
|
|
5
7
|
import {
|
|
6
|
-
|
|
8
|
+
SERVER_VARIABLE_REGEX,
|
|
7
9
|
supportedMethods
|
|
8
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VA3NKXX7.js";
|
|
9
11
|
import {
|
|
10
|
-
|
|
12
|
+
dereferenceRef,
|
|
13
|
+
getDereferencingOptions,
|
|
11
14
|
isPrimitive
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5EP6HY2E.js";
|
|
13
16
|
import {
|
|
14
17
|
CODE_SAMPLES,
|
|
15
18
|
HEADERS,
|
|
@@ -20,107 +23,14 @@ import {
|
|
|
20
23
|
getExtension,
|
|
21
24
|
hasRootExtension,
|
|
22
25
|
validateParameterOrdering
|
|
23
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-S27IGTVG.js";
|
|
24
27
|
import {
|
|
28
|
+
isOpenAPI31,
|
|
25
29
|
isRef
|
|
26
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7MARUOFZ.js";
|
|
27
31
|
|
|
28
32
|
// src/index.ts
|
|
29
33
|
import { dereference } from "@readme/openapi-parser";
|
|
30
|
-
import { match, pathToRegexp } from "path-to-regexp";
|
|
31
|
-
|
|
32
|
-
// src/lib/build-discriminator-one-of.ts
|
|
33
|
-
function hasDiscriminatorWithoutPolymorphism(schema) {
|
|
34
|
-
if (!schema || typeof schema !== "object") return false;
|
|
35
|
-
if (!("discriminator" in schema)) return false;
|
|
36
|
-
if ("oneOf" in schema || "anyOf" in schema) return false;
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
function allOfReferencesSchema(schema, targetSchemaName) {
|
|
40
|
-
if (!schema || typeof schema !== "object") return false;
|
|
41
|
-
if (!("allOf" in schema) || !Array.isArray(schema.allOf)) return false;
|
|
42
|
-
return schema.allOf.some((item) => {
|
|
43
|
-
if (isRef(item)) {
|
|
44
|
-
const refParts = item.$ref.split("/");
|
|
45
|
-
const refSchemaName = refParts[refParts.length - 1];
|
|
46
|
-
return refSchemaName === targetSchemaName;
|
|
47
|
-
}
|
|
48
|
-
return false;
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function findDiscriminatorChildren(api) {
|
|
52
|
-
const childrenMap = /* @__PURE__ */ new Map();
|
|
53
|
-
if (!api?.components?.schemas || typeof api.components.schemas !== "object") {
|
|
54
|
-
return childrenMap;
|
|
55
|
-
}
|
|
56
|
-
const schemas = api.components.schemas;
|
|
57
|
-
const schemaNames = Object.keys(schemas);
|
|
58
|
-
const discriminatorSchemas = schemaNames.filter((name) => {
|
|
59
|
-
return hasDiscriminatorWithoutPolymorphism(schemas[name]);
|
|
60
|
-
});
|
|
61
|
-
for (const baseName of discriminatorSchemas) {
|
|
62
|
-
const baseSchema = schemas[baseName];
|
|
63
|
-
const discriminator = baseSchema.discriminator;
|
|
64
|
-
let childSchemaNames;
|
|
65
|
-
if (discriminator.mapping && typeof discriminator.mapping === "object") {
|
|
66
|
-
const mappingRefs = Object.values(discriminator.mapping);
|
|
67
|
-
if (mappingRefs.length > 0) {
|
|
68
|
-
childSchemaNames = mappingRefs.map((ref) => {
|
|
69
|
-
const parts = ref.split("/");
|
|
70
|
-
return parts[parts.length - 1];
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
if (!childSchemaNames || childSchemaNames.length === 0) {
|
|
75
|
-
childSchemaNames = schemaNames.filter((name) => {
|
|
76
|
-
if (name === baseName) return false;
|
|
77
|
-
return allOfReferencesSchema(schemas[name], baseName);
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
if (childSchemaNames.length > 0) {
|
|
81
|
-
childrenMap.set(baseName, childSchemaNames);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return childrenMap;
|
|
85
|
-
}
|
|
86
|
-
function buildDiscriminatorOneOf(api, childrenMap) {
|
|
87
|
-
if (!api?.components?.schemas || typeof api.components.schemas !== "object") {
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
if (childrenMap.size === 0) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
const schemas = api.components.schemas;
|
|
94
|
-
for (const [schemaName, childNames] of childrenMap) {
|
|
95
|
-
const schema = schemas[schemaName];
|
|
96
|
-
if (!schema) continue;
|
|
97
|
-
const oneOf = [];
|
|
98
|
-
for (const childName of childNames) {
|
|
99
|
-
if (schemas[childName]) {
|
|
100
|
-
oneOf.push(cloneObject(schemas[childName]));
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
if (oneOf.length > 0) {
|
|
104
|
-
schema.oneOf = oneOf;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
for (const [parentSchemaName, childNames] of childrenMap) {
|
|
108
|
-
for (const childName of childNames) {
|
|
109
|
-
const childSchema = schemas[childName];
|
|
110
|
-
if (!childSchema || !("allOf" in childSchema) || !Array.isArray(childSchema.allOf)) {
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
for (let i = 0; i < childSchema.allOf.length; i++) {
|
|
114
|
-
const item = childSchema.allOf[i];
|
|
115
|
-
if (item && typeof item === "object" && "x-readme-ref-name" in item && item["x-readme-ref-name"] === parentSchemaName && "oneOf" in item) {
|
|
116
|
-
const clonedItem = cloneObject(item);
|
|
117
|
-
delete clonedItem.oneOf;
|
|
118
|
-
childSchema.allOf[i] = clonedItem;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
34
|
|
|
125
35
|
// src/lib/get-auth.ts
|
|
126
36
|
function getKey(user, scheme) {
|
|
@@ -143,10 +53,11 @@ function getKey(user, scheme) {
|
|
|
143
53
|
function getByScheme(user, scheme = {}, selectedApp) {
|
|
144
54
|
if (user?.keys?.length) {
|
|
145
55
|
if (selectedApp) {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
56
|
+
const userKey = user.keys.find((k) => k.name === selectedApp);
|
|
57
|
+
if (!userKey) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
return getKey(userKey, scheme);
|
|
150
61
|
}
|
|
151
62
|
return getKey(user.keys[0], scheme);
|
|
152
63
|
}
|
|
@@ -154,19 +65,21 @@ function getByScheme(user, scheme = {}, selectedApp) {
|
|
|
154
65
|
}
|
|
155
66
|
function getAuth(api, user, selectedApp) {
|
|
156
67
|
return Object.keys(api?.components?.securitySchemes || {}).map((scheme) => {
|
|
68
|
+
const securityScheme = dereferenceRef(api.components?.securitySchemes?.[scheme], api);
|
|
69
|
+
if (!securityScheme || isRef(securityScheme)) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
157
72
|
return {
|
|
158
73
|
[scheme]: getByScheme(
|
|
159
74
|
user,
|
|
160
75
|
{
|
|
161
|
-
|
|
162
|
-
// `ReferenceObject` type.
|
|
163
|
-
...api.components.securitySchemes[scheme],
|
|
76
|
+
...securityScheme,
|
|
164
77
|
_key: scheme
|
|
165
78
|
},
|
|
166
79
|
selectedApp
|
|
167
80
|
)
|
|
168
81
|
};
|
|
169
|
-
}).reduce((prev, next) => Object.assign(prev, next), {});
|
|
82
|
+
}).filter((item) => item !== void 0).reduce((prev, next) => Object.assign(prev, next), {});
|
|
170
83
|
}
|
|
171
84
|
|
|
172
85
|
// src/lib/get-user-variable.ts
|
|
@@ -179,11 +92,17 @@ function getUserVariable(user, property, selectedApp) {
|
|
|
179
92
|
key = user.keys[0];
|
|
180
93
|
}
|
|
181
94
|
}
|
|
182
|
-
return key[property] || user[property] || null;
|
|
95
|
+
return key?.[property] || user[property] || null;
|
|
183
96
|
}
|
|
184
97
|
|
|
185
|
-
// src/
|
|
186
|
-
|
|
98
|
+
// src/lib/urls.ts
|
|
99
|
+
import { match, pathToRegexp } from "path-to-regexp";
|
|
100
|
+
function stripTrailingSlash(url) {
|
|
101
|
+
if (url[url.length - 1] === "/") {
|
|
102
|
+
return url.slice(0, -1);
|
|
103
|
+
}
|
|
104
|
+
return url;
|
|
105
|
+
}
|
|
187
106
|
function ensureProtocol(url) {
|
|
188
107
|
if (url.match(/^\/\//)) {
|
|
189
108
|
return `https:${url}`;
|
|
@@ -193,17 +112,11 @@ function ensureProtocol(url) {
|
|
|
193
112
|
}
|
|
194
113
|
return url;
|
|
195
114
|
}
|
|
196
|
-
function
|
|
197
|
-
if (url[url.length - 1] === "/") {
|
|
198
|
-
return url.slice(0, -1);
|
|
199
|
-
}
|
|
200
|
-
return url;
|
|
201
|
-
}
|
|
202
|
-
function normalizedUrl(api, selected) {
|
|
115
|
+
function normalizedURL(api, selected) {
|
|
203
116
|
const exampleDotCom = "https://example.com";
|
|
204
117
|
let url;
|
|
205
118
|
try {
|
|
206
|
-
url = api.servers[selected].url;
|
|
119
|
+
url = api.servers?.[selected].url;
|
|
207
120
|
if (!url) throw new Error("no url");
|
|
208
121
|
url = stripTrailingSlash(url);
|
|
209
122
|
if (url.startsWith("/") && !url.startsWith("//")) {
|
|
@@ -216,7 +129,7 @@ function normalizedUrl(api, selected) {
|
|
|
216
129
|
}
|
|
217
130
|
return ensureProtocol(url);
|
|
218
131
|
}
|
|
219
|
-
function
|
|
132
|
+
function transformURLIntoRegex(url) {
|
|
220
133
|
return stripTrailingSlash(url.replace(SERVER_VARIABLE_REGEX, "([-_a-zA-Z0-9:.[\\]]+)"));
|
|
221
134
|
}
|
|
222
135
|
function normalizePath(path) {
|
|
@@ -226,7 +139,7 @@ function normalizePath(path) {
|
|
|
226
139
|
}
|
|
227
140
|
function generatePathMatches(paths, pathName, origin) {
|
|
228
141
|
const prunedPathName = pathName.split("?")[0];
|
|
229
|
-
|
|
142
|
+
const matches = Object.keys(paths).map((path) => {
|
|
230
143
|
const cleanedPath = normalizePath(path);
|
|
231
144
|
let matchResult;
|
|
232
145
|
try {
|
|
@@ -251,7 +164,8 @@ function generatePathMatches(paths, pathName, origin) {
|
|
|
251
164
|
operation: paths[path],
|
|
252
165
|
match: matchResult
|
|
253
166
|
};
|
|
254
|
-
}).filter(
|
|
167
|
+
}).filter((item) => item !== false);
|
|
168
|
+
return matches.filter((p) => p.match);
|
|
255
169
|
}
|
|
256
170
|
function filterPathMethods(pathMatches, targetMethod) {
|
|
257
171
|
const regExp = pathToRegexp(targetMethod);
|
|
@@ -266,21 +180,26 @@ function filterPathMethods(pathMatches, targetMethod) {
|
|
|
266
180
|
};
|
|
267
181
|
}
|
|
268
182
|
return false;
|
|
269
|
-
}).filter(Boolean);
|
|
183
|
+
}).filter((item) => Boolean(item));
|
|
270
184
|
}
|
|
271
185
|
function findTargetPath(pathMatches) {
|
|
186
|
+
if (!pathMatches.length) {
|
|
187
|
+
return void 0;
|
|
188
|
+
}
|
|
272
189
|
let minCount = Object.keys(pathMatches[0].url.slugs).length;
|
|
273
|
-
let
|
|
190
|
+
let found;
|
|
274
191
|
for (let m = 0; m < pathMatches.length; m += 1) {
|
|
275
192
|
const selection = pathMatches[m];
|
|
276
193
|
const paramCount = Object.keys(selection.url.slugs).length;
|
|
277
194
|
if (paramCount <= minCount) {
|
|
278
195
|
minCount = paramCount;
|
|
279
|
-
|
|
196
|
+
found = selection;
|
|
280
197
|
}
|
|
281
198
|
}
|
|
282
|
-
return
|
|
199
|
+
return found;
|
|
283
200
|
}
|
|
201
|
+
|
|
202
|
+
// src/index.ts
|
|
284
203
|
var Oas = class _Oas {
|
|
285
204
|
/**
|
|
286
205
|
* An OpenAPI API Definition.
|
|
@@ -349,18 +268,11 @@ var Oas = class _Oas {
|
|
|
349
268
|
return this.api;
|
|
350
269
|
}
|
|
351
270
|
url(selected = 0, variables) {
|
|
352
|
-
const url =
|
|
271
|
+
const url = normalizedURL(this.api, selected);
|
|
353
272
|
return this.replaceUrl(url, variables || this.defaultVariables(selected)).trim();
|
|
354
273
|
}
|
|
355
274
|
variables(selected = 0) {
|
|
356
|
-
|
|
357
|
-
try {
|
|
358
|
-
variables = this.api.servers[selected].variables;
|
|
359
|
-
if (!variables) throw new Error("no variables");
|
|
360
|
-
} catch {
|
|
361
|
-
variables = {};
|
|
362
|
-
}
|
|
363
|
-
return variables;
|
|
275
|
+
return this.api.servers?.[selected]?.variables || {};
|
|
364
276
|
}
|
|
365
277
|
defaultVariables(selected = 0) {
|
|
366
278
|
const variables = this.variables(selected);
|
|
@@ -371,7 +283,7 @@ var Oas = class _Oas {
|
|
|
371
283
|
return defaults;
|
|
372
284
|
}
|
|
373
285
|
splitUrl(selected = 0) {
|
|
374
|
-
const url =
|
|
286
|
+
const url = normalizedURL(this.api, selected);
|
|
375
287
|
const variables = this.variables(selected);
|
|
376
288
|
return url.split(/({.+?})/).filter(Boolean).map((part, i) => {
|
|
377
289
|
const isVariable = part.match(/[{}]/);
|
|
@@ -410,7 +322,7 @@ var Oas = class _Oas {
|
|
|
410
322
|
*/
|
|
411
323
|
splitVariables(baseUrl) {
|
|
412
324
|
const matchedServer = (this.api.servers || []).map((server, i) => {
|
|
413
|
-
const rgx =
|
|
325
|
+
const rgx = transformURLIntoRegex(server.url);
|
|
414
326
|
const found = new RegExp(rgx).exec(baseUrl);
|
|
415
327
|
if (!found) {
|
|
416
328
|
return false;
|
|
@@ -423,7 +335,7 @@ var Oas = class _Oas {
|
|
|
423
335
|
selected: i,
|
|
424
336
|
variables
|
|
425
337
|
};
|
|
426
|
-
}).filter(
|
|
338
|
+
}).filter((item) => item !== false);
|
|
427
339
|
return matchedServer.length ? matchedServer[0] : false;
|
|
428
340
|
}
|
|
429
341
|
/**
|
|
@@ -452,15 +364,15 @@ var Oas = class _Oas {
|
|
|
452
364
|
const data = variables[key];
|
|
453
365
|
if (typeof data === "object") {
|
|
454
366
|
if (!Array.isArray(data) && data !== null && "default" in data) {
|
|
455
|
-
return data.default;
|
|
367
|
+
return String(data.default);
|
|
456
368
|
}
|
|
457
369
|
} else {
|
|
458
|
-
return data;
|
|
370
|
+
return String(data);
|
|
459
371
|
}
|
|
460
372
|
}
|
|
461
373
|
const userVariable = getUserVariable(this.user, key);
|
|
462
374
|
if (userVariable) {
|
|
463
|
-
return userVariable;
|
|
375
|
+
return String(userVariable);
|
|
464
376
|
}
|
|
465
377
|
return original;
|
|
466
378
|
})
|
|
@@ -477,14 +389,21 @@ var Oas = class _Oas {
|
|
|
477
389
|
parameters: []
|
|
478
390
|
};
|
|
479
391
|
if (opts.isWebhook) {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
392
|
+
if (isOpenAPI31(this.api)) {
|
|
393
|
+
const webhookPath = dereferenceRef(this.api?.webhooks?.[path], this.api);
|
|
394
|
+
if (webhookPath && !isRef(webhookPath)) {
|
|
395
|
+
if (webhookPath?.[method]) {
|
|
396
|
+
operation = webhookPath[method];
|
|
397
|
+
return new Webhook(this.api, path, method, operation);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
484
400
|
}
|
|
485
401
|
}
|
|
486
|
-
if (this?.api?.paths?.[path]
|
|
487
|
-
|
|
402
|
+
if (this?.api?.paths?.[path]) {
|
|
403
|
+
const pathItem = dereferenceRef(this.api.paths[path], this.api);
|
|
404
|
+
if (pathItem?.[method]) {
|
|
405
|
+
operation = dereferenceRef(pathItem[method], this.api);
|
|
406
|
+
}
|
|
488
407
|
}
|
|
489
408
|
return new Operation(this.api, path, method, operation);
|
|
490
409
|
}
|
|
@@ -514,8 +433,8 @@ var Oas = class _Oas {
|
|
|
514
433
|
[, pathName] = url.split(new RegExp(targetServer.url, "i"));
|
|
515
434
|
}
|
|
516
435
|
if (!matchedServer || !pathName) {
|
|
517
|
-
const matchedServerAndPath = servers.map((server) => {
|
|
518
|
-
const rgx =
|
|
436
|
+
const matchedServerAndPath = (servers || []).map((server) => {
|
|
437
|
+
const rgx = transformURLIntoRegex(server.url);
|
|
519
438
|
const found = new RegExp(rgx).exec(url);
|
|
520
439
|
if (!found) {
|
|
521
440
|
return void 0;
|
|
@@ -524,7 +443,7 @@ var Oas = class _Oas {
|
|
|
524
443
|
matchedServer: server,
|
|
525
444
|
pathName: url.split(new RegExp(rgx)).slice(-1).pop()
|
|
526
445
|
};
|
|
527
|
-
}).filter(
|
|
446
|
+
}).filter((item) => item !== void 0);
|
|
528
447
|
if (!matchedServerAndPath.length) {
|
|
529
448
|
return void 0;
|
|
530
449
|
}
|
|
@@ -535,6 +454,7 @@ var Oas = class _Oas {
|
|
|
535
454
|
}
|
|
536
455
|
if (pathName === void 0) return void 0;
|
|
537
456
|
if (pathName === "") pathName = "/";
|
|
457
|
+
if (!paths || !targetServer) return void 0;
|
|
538
458
|
const annotatedPaths = generatePathMatches(paths, pathName, targetServer.url);
|
|
539
459
|
if (!annotatedPaths.length) return void 0;
|
|
540
460
|
return annotatedPaths;
|
|
@@ -634,16 +554,24 @@ var Oas = class _Oas {
|
|
|
634
554
|
*/
|
|
635
555
|
getPaths() {
|
|
636
556
|
const paths = {};
|
|
637
|
-
|
|
557
|
+
if (!this.api.paths) {
|
|
558
|
+
return paths;
|
|
559
|
+
}
|
|
560
|
+
Object.keys(this.api.paths).forEach((path) => {
|
|
638
561
|
if (path.startsWith("x-")) {
|
|
639
562
|
return;
|
|
640
563
|
}
|
|
641
564
|
paths[path] = {};
|
|
642
|
-
|
|
643
|
-
|
|
565
|
+
const pathItem = this.api.paths[path];
|
|
566
|
+
if (!pathItem) {
|
|
567
|
+
return;
|
|
568
|
+
} else if (isRef(pathItem)) {
|
|
569
|
+
this.api.paths[path] = dereferenceRef(pathItem, this.api);
|
|
644
570
|
}
|
|
645
|
-
Object.keys(
|
|
646
|
-
if (!supportedMethods.includes(method))
|
|
571
|
+
Object.keys(pathItem).forEach((method) => {
|
|
572
|
+
if (!supportedMethods.includes(method)) {
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
647
575
|
paths[path][method] = this.operation(path, method);
|
|
648
576
|
});
|
|
649
577
|
});
|
|
@@ -658,18 +586,31 @@ var Oas = class _Oas {
|
|
|
658
586
|
*/
|
|
659
587
|
getWebhooks() {
|
|
660
588
|
const webhooks = {};
|
|
661
|
-
|
|
662
|
-
|
|
589
|
+
if (!isOpenAPI31(this.api) || !this.api.webhooks) {
|
|
590
|
+
return webhooks;
|
|
591
|
+
}
|
|
592
|
+
Object.keys(this.api.webhooks).forEach((id) => {
|
|
663
593
|
webhooks[id] = {};
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
594
|
+
const webhookPath = dereferenceRef(this.api.webhooks?.[id], this.api);
|
|
595
|
+
if (webhookPath) {
|
|
596
|
+
Object.keys(webhookPath).forEach((method) => {
|
|
597
|
+
if (!supportedMethods.includes(method)) {
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
webhooks[id][method] = this.operation(id, method, {
|
|
601
|
+
isWebhook: true
|
|
602
|
+
});
|
|
603
|
+
});
|
|
604
|
+
}
|
|
667
605
|
});
|
|
668
606
|
return webhooks;
|
|
669
607
|
}
|
|
670
608
|
/**
|
|
671
609
|
* Return an array of all tag names that exist on this API definition.
|
|
672
610
|
*
|
|
611
|
+
* If the API definition uses the `x-disable-tag-sorting` extension then tags will be returned in
|
|
612
|
+
* the order they're defined.
|
|
613
|
+
*
|
|
673
614
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#openapi-object}
|
|
674
615
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#openapi-object}
|
|
675
616
|
* @param setIfMissing If a tag is not present on an operation that operations path will be added
|
|
@@ -677,9 +618,7 @@ var Oas = class _Oas {
|
|
|
677
618
|
*/
|
|
678
619
|
getTags(setIfMissing = false) {
|
|
679
620
|
const allTags = /* @__PURE__ */ new Set();
|
|
680
|
-
const oasTags = this.api.tags?.map((tag) =>
|
|
681
|
-
return tag.name;
|
|
682
|
-
}) || [];
|
|
621
|
+
const oasTags = this.api.tags?.map((tag) => tag.name) || [];
|
|
683
622
|
const disableTagSorting = getExtension("disable-tag-sorting", this.api);
|
|
684
623
|
Object.entries(this.getPaths()).forEach(([path, operations]) => {
|
|
685
624
|
Object.values(operations).forEach((operation) => {
|
|
@@ -760,11 +699,13 @@ var Oas = class _Oas {
|
|
|
760
699
|
}
|
|
761
700
|
if (extension in data) {
|
|
762
701
|
if ([CODE_SAMPLES, HEADERS, PARAMETER_ORDERING, SAMPLES_LANGUAGES].includes(extension)) {
|
|
763
|
-
if (
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
702
|
+
if (data[extension] !== void 0) {
|
|
703
|
+
if (!Array.isArray(data[extension])) {
|
|
704
|
+
throw new TypeError(`"x-readme.${extension}" must be of type "Array"`);
|
|
705
|
+
}
|
|
706
|
+
if (extension === PARAMETER_ORDERING) {
|
|
707
|
+
validateParameterOrdering(data[extension], `x-readme.${extension}`);
|
|
708
|
+
}
|
|
768
709
|
}
|
|
769
710
|
} else if (extension === OAUTH_OPTIONS) {
|
|
770
711
|
if (typeof data[extension] !== "object") {
|
|
@@ -814,7 +755,7 @@ var Oas = class _Oas {
|
|
|
814
755
|
*/
|
|
815
756
|
getCircularReferences() {
|
|
816
757
|
if (!this.dereferencing.complete) {
|
|
817
|
-
throw new Error("
|
|
758
|
+
throw new Error(".dereference() must be called first in order for this method to obtain circular references.");
|
|
818
759
|
}
|
|
819
760
|
return this.dereferencing.circularRefs;
|
|
820
761
|
}
|
|
@@ -835,36 +776,24 @@ var Oas = class _Oas {
|
|
|
835
776
|
});
|
|
836
777
|
}
|
|
837
778
|
this.dereferencing.processing = true;
|
|
838
|
-
const discriminatorChildrenMap = findDiscriminatorChildren(this.api);
|
|
779
|
+
const { children: discriminatorChildrenMap } = findDiscriminatorChildren(this.api);
|
|
839
780
|
const { api, promises } = this;
|
|
840
781
|
if (api?.components?.schemas && typeof api.components.schemas === "object") {
|
|
841
782
|
Object.keys(api.components.schemas).forEach((schemaName) => {
|
|
842
|
-
if (isPrimitive(api.components
|
|
783
|
+
if (isPrimitive(api.components?.schemas?.[schemaName]) || Array.isArray(api.components?.schemas?.[schemaName]) || api.components?.schemas?.[schemaName] === null) {
|
|
843
784
|
return;
|
|
844
785
|
}
|
|
845
786
|
if (opts.preserveRefAsJSONSchemaTitle) {
|
|
846
|
-
api.components
|
|
787
|
+
(api.components?.schemas?.[schemaName]).title = schemaName;
|
|
847
788
|
}
|
|
848
|
-
api.components
|
|
789
|
+
(api.components?.schemas?.[schemaName])["x-readme-ref-name"] = schemaName;
|
|
849
790
|
});
|
|
850
791
|
}
|
|
851
792
|
const circularRefs = /* @__PURE__ */ new Set();
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
// We shouldn't be resolving external pointers at this point so just ignore them.
|
|
855
|
-
external: false
|
|
856
|
-
},
|
|
857
|
-
dereference: {
|
|
858
|
-
// If circular `$refs` are ignored they'll remain in the OAS as `$ref: String`, otherwise
|
|
859
|
-
// `$ref‘ just won't exist. This allows us to do easy circular reference detection.
|
|
860
|
-
circular: "ignore",
|
|
861
|
-
onCircular: (path) => {
|
|
862
|
-
circularRefs.add(`#${path.split("#")[1]}`);
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
}).then((dereferenced) => {
|
|
793
|
+
const dereferencingOptions = getDereferencingOptions(circularRefs);
|
|
794
|
+
return dereference(api, dereferencingOptions).then((dereferenced) => {
|
|
866
795
|
this.api = dereferenced;
|
|
867
|
-
if (
|
|
796
|
+
if (this.api?.components?.schemas && discriminatorChildrenMap.size > 0) {
|
|
868
797
|
buildDiscriminatorOneOf(this.api, discriminatorChildrenMap);
|
|
869
798
|
}
|
|
870
799
|
this.promises = promises;
|
|
@@ -879,6 +808,10 @@ var Oas = class _Oas {
|
|
|
879
808
|
}
|
|
880
809
|
}).then(() => {
|
|
881
810
|
return this.promises.map((deferred) => deferred.resolve());
|
|
811
|
+
}).catch((err) => {
|
|
812
|
+
this.dereferencing.processing = false;
|
|
813
|
+
this.promises.map((deferred) => deferred.reject(err));
|
|
814
|
+
throw err;
|
|
882
815
|
});
|
|
883
816
|
}
|
|
884
817
|
};
|
|
@@ -886,4 +819,4 @@ var Oas = class _Oas {
|
|
|
886
819
|
export {
|
|
887
820
|
Oas
|
|
888
821
|
};
|
|
889
|
-
//# sourceMappingURL=chunk-
|
|
822
|
+
//# sourceMappingURL=chunk-LSH3X5NA.js.map
|
|
@@ -60,6 +60,9 @@ function getExtension(extension, api, operation) {
|
|
|
60
60
|
return void 0;
|
|
61
61
|
}
|
|
62
62
|
function validateParameterOrdering(ordering, extension) {
|
|
63
|
+
if (!ordering) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
63
66
|
const defaultValue = extensionDefaults[PARAMETER_ORDERING];
|
|
64
67
|
const requiredLength = defaultValue.length;
|
|
65
68
|
const defaultsHuman = `${defaultValue.slice(0, -1).join(", ")}, and ${defaultValue.slice(-1)}`;
|
|
@@ -89,4 +92,4 @@ export {
|
|
|
89
92
|
getExtension,
|
|
90
93
|
validateParameterOrdering
|
|
91
94
|
};
|
|
92
|
-
//# sourceMappingURL=chunk-
|
|
95
|
+
//# sourceMappingURL=chunk-S27IGTVG.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/utils.ts
|
|
2
|
+
var supportedMethods = ["get", "put", "post", "delete", "options", "head", "patch", "trace"];
|
|
3
|
+
var SERVER_VARIABLE_REGEX = /{([-_a-zA-Z0-9:.[\]]+)}/g;
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
supportedMethods,
|
|
7
|
+
SERVER_VARIABLE_REGEX
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=chunk-VA3NKXX7.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Oas
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-LSH3X5NA.js";
|
|
4
|
+
import "./chunk-HGVFNEKW.js";
|
|
5
|
+
import "./chunk-VA3NKXX7.js";
|
|
6
|
+
import "./chunk-5EP6HY2E.js";
|
|
7
|
+
import "./chunk-S27IGTVG.js";
|
|
8
|
+
import "./chunk-7MARUOFZ.js";
|
|
9
9
|
export {
|
|
10
10
|
Oas as default
|
|
11
11
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
SERVER_VARIABLE_REGEX,
|
|
3
3
|
supportedMethods
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VA3NKXX7.js";
|
|
5
5
|
import {
|
|
6
6
|
getParameterContentType,
|
|
7
7
|
matches_mimetype_default,
|
|
8
8
|
types
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-5EP6HY2E.js";
|
|
10
|
+
import "./chunk-S27IGTVG.js";
|
|
11
|
+
import "./chunk-7MARUOFZ.js";
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
SERVER_VARIABLE_REGEX,
|
|
14
14
|
getParameterContentType,
|
|
15
15
|
types as jsonSchemaTypes,
|
|
16
16
|
matches_mimetype_default as matchesMimeType,
|