@depup/redocly__openapi-core 2.22.1-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -0
- package/changes.json +14 -0
- package/lib/bundle/bundle-document.d.ts +33 -0
- package/lib/bundle/bundle-document.d.ts.map +1 -0
- package/lib/bundle/bundle-document.js +85 -0
- package/lib/bundle/bundle-document.js.map +1 -0
- package/lib/bundle/bundle-oas.d.ts +15 -0
- package/lib/bundle/bundle-oas.d.ts.map +1 -0
- package/lib/bundle/bundle-oas.js +55 -0
- package/lib/bundle/bundle-oas.js.map +1 -0
- package/lib/bundle/bundle-visitor.d.ts +15 -0
- package/lib/bundle/bundle-visitor.d.ts.map +1 -0
- package/lib/bundle/bundle-visitor.js +257 -0
- package/lib/bundle/bundle-visitor.js.map +1 -0
- package/lib/bundle/bundle.d.ts +26 -0
- package/lib/bundle/bundle.d.ts.map +1 -0
- package/lib/bundle/bundle.js +74 -0
- package/lib/bundle/bundle.js.map +1 -0
- package/lib/config/all.d.ts +4 -0
- package/lib/config/all.d.ts.map +1 -0
- package/lib/config/all.js +310 -0
- package/lib/config/all.js.map +1 -0
- package/lib/config/builtIn.d.ts +4 -0
- package/lib/config/builtIn.d.ts.map +1 -0
- package/lib/config/builtIn.js +58 -0
- package/lib/config/builtIn.js.map +1 -0
- package/lib/config/bundle-extends.d.ts +8 -0
- package/lib/config/bundle-extends.d.ts.map +1 -0
- package/lib/config/bundle-extends.js +27 -0
- package/lib/config/bundle-extends.js.map +1 -0
- package/lib/config/config-resolvers.d.ts +23 -0
- package/lib/config/config-resolvers.d.ts.map +1 -0
- package/lib/config/config-resolvers.js +335 -0
- package/lib/config/config-resolvers.js.map +1 -0
- package/lib/config/config.d.ts +47 -0
- package/lib/config/config.d.ts.map +1 -0
- package/lib/config/config.js +338 -0
- package/lib/config/config.js.map +1 -0
- package/lib/config/constants.d.ts +10 -0
- package/lib/config/constants.d.ts.map +1 -0
- package/lib/config/constants.js +13 -0
- package/lib/config/constants.js.map +1 -0
- package/lib/config/get-resolve-config.d.ts +3 -0
- package/lib/config/get-resolve-config.d.ts.map +1 -0
- package/lib/config/get-resolve-config.js +9 -0
- package/lib/config/get-resolve-config.js.map +1 -0
- package/lib/config/group-assertion-rules.d.ts +3 -0
- package/lib/config/group-assertion-rules.d.ts.map +1 -0
- package/lib/config/group-assertion-rules.js +51 -0
- package/lib/config/group-assertion-rules.js.map +1 -0
- package/lib/config/index.d.ts +8 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/config/index.js +8 -0
- package/lib/config/index.js.map +1 -0
- package/lib/config/load.d.ts +19 -0
- package/lib/config/load.d.ts.map +1 -0
- package/lib/config/load.js +98 -0
- package/lib/config/load.js.map +1 -0
- package/lib/config/minimal.d.ts +4 -0
- package/lib/config/minimal.d.ts.map +1 -0
- package/lib/config/minimal.js +289 -0
- package/lib/config/minimal.js.map +1 -0
- package/lib/config/recommended-strict.d.ts +4 -0
- package/lib/config/recommended-strict.d.ts.map +1 -0
- package/lib/config/recommended-strict.js +289 -0
- package/lib/config/recommended-strict.js.map +1 -0
- package/lib/config/recommended.d.ts +4 -0
- package/lib/config/recommended.d.ts.map +1 -0
- package/lib/config/recommended.js +289 -0
- package/lib/config/recommended.js.map +1 -0
- package/lib/config/rules.d.ts +11 -0
- package/lib/config/rules.d.ts.map +1 -0
- package/lib/config/rules.js +35 -0
- package/lib/config/rules.js.map +1 -0
- package/lib/config/spec.d.ts +4 -0
- package/lib/config/spec.d.ts.map +1 -0
- package/lib/config/spec.js +289 -0
- package/lib/config/spec.js.map +1 -0
- package/lib/config/types.d.ts +158 -0
- package/lib/config/types.d.ts.map +1 -0
- package/lib/config/types.js +2 -0
- package/lib/config/types.js.map +1 -0
- package/lib/config/utils.d.ts +14 -0
- package/lib/config/utils.d.ts.map +1 -0
- package/lib/config/utils.js +129 -0
- package/lib/config/utils.js.map +1 -0
- package/lib/config/visitors.d.ts +50 -0
- package/lib/config/visitors.d.ts.map +1 -0
- package/lib/config/visitors.js +99 -0
- package/lib/config/visitors.js.map +1 -0
- package/lib/decorators/arazzo/index.d.ts +2 -0
- package/lib/decorators/arazzo/index.d.ts.map +1 -0
- package/lib/decorators/arazzo/index.js +2 -0
- package/lib/decorators/arazzo/index.js.map +1 -0
- package/lib/decorators/async2/index.d.ts +2 -0
- package/lib/decorators/async2/index.d.ts.map +1 -0
- package/lib/decorators/async2/index.js +2 -0
- package/lib/decorators/async2/index.js.map +1 -0
- package/lib/decorators/async3/index.d.ts +2 -0
- package/lib/decorators/async3/index.d.ts.map +1 -0
- package/lib/decorators/async3/index.js +2 -0
- package/lib/decorators/async3/index.js.map +1 -0
- package/lib/decorators/common/filters/filter-helper.d.ts +4 -0
- package/lib/decorators/common/filters/filter-helper.d.ts.map +1 -0
- package/lib/decorators/common/filters/filter-helper.js +65 -0
- package/lib/decorators/common/filters/filter-helper.js.map +1 -0
- package/lib/decorators/common/filters/filter-in.d.ts +3 -0
- package/lib/decorators/common/filters/filter-in.d.ts.map +1 -0
- package/lib/decorators/common/filters/filter-in.js +67 -0
- package/lib/decorators/common/filters/filter-in.js.map +1 -0
- package/lib/decorators/common/filters/filter-out.d.ts +3 -0
- package/lib/decorators/common/filters/filter-out.d.ts.map +1 -0
- package/lib/decorators/common/filters/filter-out.js +67 -0
- package/lib/decorators/common/filters/filter-out.js.map +1 -0
- package/lib/decorators/common/info-description-override.d.ts +3 -0
- package/lib/decorators/common/info-description-override.d.ts.map +1 -0
- package/lib/decorators/common/info-description-override.js +21 -0
- package/lib/decorators/common/info-description-override.js.map +1 -0
- package/lib/decorators/common/info-override.d.ts +3 -0
- package/lib/decorators/common/info-override.d.ts.map +1 -0
- package/lib/decorators/common/info-override.js +14 -0
- package/lib/decorators/common/info-override.js.map +1 -0
- package/lib/decorators/common/media-type-examples-override.d.ts +3 -0
- package/lib/decorators/common/media-type-examples-override.d.ts.map +1 -0
- package/lib/decorators/common/media-type-examples-override.js +58 -0
- package/lib/decorators/common/media-type-examples-override.js.map +1 -0
- package/lib/decorators/common/operation-description-override.d.ts +3 -0
- package/lib/decorators/common/operation-description-override.d.ts.map +1 -0
- package/lib/decorators/common/operation-description-override.js +27 -0
- package/lib/decorators/common/operation-description-override.js.map +1 -0
- package/lib/decorators/common/remove-x-internal.d.ts +3 -0
- package/lib/decorators/common/remove-x-internal.d.ts.map +1 -0
- package/lib/decorators/common/remove-x-internal.js +68 -0
- package/lib/decorators/common/remove-x-internal.js.map +1 -0
- package/lib/decorators/common/tag-description-override.d.ts +3 -0
- package/lib/decorators/common/tag-description-override.d.ts.map +1 -0
- package/lib/decorators/common/tag-description-override.js +23 -0
- package/lib/decorators/common/tag-description-override.js.map +1 -0
- package/lib/decorators/oas2/index.d.ts +12 -0
- package/lib/decorators/oas2/index.d.ts.map +1 -0
- package/lib/decorators/oas2/index.js +19 -0
- package/lib/decorators/oas2/index.js.map +1 -0
- package/lib/decorators/oas2/remove-unused-components.d.ts +3 -0
- package/lib/decorators/oas2/remove-unused-components.d.ts.map +1 -0
- package/lib/decorators/oas2/remove-unused-components.js +88 -0
- package/lib/decorators/oas2/remove-unused-components.js.map +1 -0
- package/lib/decorators/oas3/index.d.ts +13 -0
- package/lib/decorators/oas3/index.d.ts.map +1 -0
- package/lib/decorators/oas3/index.js +21 -0
- package/lib/decorators/oas3/index.js.map +1 -0
- package/lib/decorators/oas3/remove-unused-components.d.ts +3 -0
- package/lib/decorators/oas3/remove-unused-components.d.ts.map +1 -0
- package/lib/decorators/oas3/remove-unused-components.js +116 -0
- package/lib/decorators/oas3/remove-unused-components.js.map +1 -0
- package/lib/decorators/openrpc/index.d.ts +2 -0
- package/lib/decorators/openrpc/index.d.ts.map +1 -0
- package/lib/decorators/openrpc/index.js +2 -0
- package/lib/decorators/openrpc/index.js.map +1 -0
- package/lib/decorators/overlay1/index.d.ts +2 -0
- package/lib/decorators/overlay1/index.d.ts.map +1 -0
- package/lib/decorators/overlay1/index.js +2 -0
- package/lib/decorators/overlay1/index.js.map +1 -0
- package/lib/detect-spec.d.ts +5 -0
- package/lib/detect-spec.d.ts.map +1 -0
- package/lib/detect-spec.js +79 -0
- package/lib/detect-spec.js.map +1 -0
- package/lib/env.d.ts +3 -0
- package/lib/env.d.ts.map +1 -0
- package/lib/env.js +5 -0
- package/lib/env.js.map +1 -0
- package/lib/errors/yaml-parse-error.d.ts +9 -0
- package/lib/errors/yaml-parse-error.d.ts.map +1 -0
- package/lib/errors/yaml-parse-error.js +14 -0
- package/lib/errors/yaml-parse-error.js.map +1 -0
- package/lib/format/codeframes.d.ts +23 -0
- package/lib/format/codeframes.d.ts.map +1 -0
- package/lib/format/codeframes.js +177 -0
- package/lib/format/codeframes.js.map +1 -0
- package/lib/format/format.d.ts +23 -0
- package/lib/format/format.d.ts.map +1 -0
- package/lib/format/format.js +365 -0
- package/lib/format/format.js.map +1 -0
- package/lib/index.d.ts +58 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +49 -0
- package/lib/index.js.map +1 -0
- package/lib/js-yaml/index.d.ts +4 -0
- package/lib/js-yaml/index.d.ts.map +1 -0
- package/lib/js-yaml/index.js +11 -0
- package/lib/js-yaml/index.js.map +1 -0
- package/lib/lint-entity.d.ts +24 -0
- package/lib/lint-entity.d.ts.map +1 -0
- package/lib/lint-entity.js +171 -0
- package/lib/lint-entity.js.map +1 -0
- package/lib/lint.d.ts +31 -0
- package/lib/lint.d.ts.map +1 -0
- package/lib/lint.js +123 -0
- package/lib/lint.js.map +1 -0
- package/lib/logger.d.ts +26 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +56 -0
- package/lib/logger.js.map +1 -0
- package/lib/oas-types.d.ts +877 -0
- package/lib/oas-types.d.ts.map +1 -0
- package/lib/oas-types.js +35 -0
- package/lib/oas-types.js.map +1 -0
- package/lib/ref-utils.d.ts +32 -0
- package/lib/ref-utils.d.ts.map +1 -0
- package/lib/ref-utils.js +109 -0
- package/lib/ref-utils.js.map +1 -0
- package/lib/resolve.d.ts +57 -0
- package/lib/resolve.d.ts.map +1 -0
- package/lib/resolve.js +326 -0
- package/lib/resolve.js.map +1 -0
- package/lib/rules/ajv.d.ts +20 -0
- package/lib/rules/ajv.d.ts.map +1 -0
- package/lib/rules/ajv.js +106 -0
- package/lib/rules/ajv.js.map +1 -0
- package/lib/rules/arazzo/criteria-unique.d.ts +3 -0
- package/lib/rules/arazzo/criteria-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/criteria-unique.js +68 -0
- package/lib/rules/arazzo/criteria-unique.js.map +1 -0
- package/lib/rules/arazzo/index.d.ts +4 -0
- package/lib/rules/arazzo/index.d.ts.map +1 -0
- package/lib/rules/arazzo/index.js +52 -0
- package/lib/rules/arazzo/index.js.map +1 -0
- package/lib/rules/arazzo/outputs-defined.d.ts +3 -0
- package/lib/rules/arazzo/outputs-defined.d.ts.map +1 -0
- package/lib/rules/arazzo/outputs-defined.js +139 -0
- package/lib/rules/arazzo/outputs-defined.js.map +1 -0
- package/lib/rules/arazzo/parameters-unique.d.ts +3 -0
- package/lib/rules/arazzo/parameters-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/parameters-unique.js +27 -0
- package/lib/rules/arazzo/parameters-unique.js.map +1 -0
- package/lib/rules/arazzo/requestBody-replacements-unique.d.ts +3 -0
- package/lib/rules/arazzo/requestBody-replacements-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/requestBody-replacements-unique.js +30 -0
- package/lib/rules/arazzo/requestBody-replacements-unique.js.map +1 -0
- package/lib/rules/arazzo/sourceDescription-type.d.ts +3 -0
- package/lib/rules/arazzo/sourceDescription-type.d.ts.map +1 -0
- package/lib/rules/arazzo/sourceDescription-type.js +19 -0
- package/lib/rules/arazzo/sourceDescription-type.js.map +1 -0
- package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts +3 -0
- package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/sourceDescriptions-name-unique.js +21 -0
- package/lib/rules/arazzo/sourceDescriptions-name-unique.js.map +1 -0
- package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts +3 -0
- package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts.map +1 -0
- package/lib/rules/arazzo/sourceDescriptions-not-empty.js +15 -0
- package/lib/rules/arazzo/sourceDescriptions-not-empty.js.map +1 -0
- package/lib/rules/arazzo/step-onFailure-unique.d.ts +3 -0
- package/lib/rules/arazzo/step-onFailure-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/step-onFailure-unique.js +27 -0
- package/lib/rules/arazzo/step-onFailure-unique.js.map +1 -0
- package/lib/rules/arazzo/step-onSuccess-unique.d.ts +3 -0
- package/lib/rules/arazzo/step-onSuccess-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/step-onSuccess-unique.js +27 -0
- package/lib/rules/arazzo/step-onSuccess-unique.js.map +1 -0
- package/lib/rules/arazzo/stepId-unique.d.ts +3 -0
- package/lib/rules/arazzo/stepId-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/stepId-unique.js +23 -0
- package/lib/rules/arazzo/stepId-unique.js.map +1 -0
- package/lib/rules/arazzo/workflow-dependsOn.d.ts +3 -0
- package/lib/rules/arazzo/workflow-dependsOn.d.ts.map +1 -0
- package/lib/rules/arazzo/workflow-dependsOn.js +53 -0
- package/lib/rules/arazzo/workflow-dependsOn.js.map +1 -0
- package/lib/rules/arazzo/workflowId-unique.d.ts +3 -0
- package/lib/rules/arazzo/workflowId-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/workflowId-unique.js +19 -0
- package/lib/rules/arazzo/workflowId-unique.js.map +1 -0
- package/lib/rules/async2/channels-kebab-case.d.ts +3 -0
- package/lib/rules/async2/channels-kebab-case.d.ts.map +1 -0
- package/lib/rules/async2/channels-kebab-case.js +16 -0
- package/lib/rules/async2/channels-kebab-case.js.map +1 -0
- package/lib/rules/async2/index.d.ts +4 -0
- package/lib/rules/async2/index.d.ts.map +1 -0
- package/lib/rules/async2/index.js +32 -0
- package/lib/rules/async2/index.js.map +1 -0
- package/lib/rules/async2/no-channel-trailing-slash.d.ts +3 -0
- package/lib/rules/async2/no-channel-trailing-slash.d.ts.map +1 -0
- package/lib/rules/async2/no-channel-trailing-slash.js +13 -0
- package/lib/rules/async2/no-channel-trailing-slash.js.map +1 -0
- package/lib/rules/async3/channels-kebab-case.d.ts +3 -0
- package/lib/rules/async3/channels-kebab-case.d.ts.map +1 -0
- package/lib/rules/async3/channels-kebab-case.js +16 -0
- package/lib/rules/async3/channels-kebab-case.js.map +1 -0
- package/lib/rules/async3/index.d.ts +4 -0
- package/lib/rules/async3/index.d.ts.map +1 -0
- package/lib/rules/async3/index.js +32 -0
- package/lib/rules/async3/index.js.map +1 -0
- package/lib/rules/async3/no-channel-trailing-slash.d.ts +3 -0
- package/lib/rules/async3/no-channel-trailing-slash.d.ts.map +1 -0
- package/lib/rules/async3/no-channel-trailing-slash.js +13 -0
- package/lib/rules/async3/no-channel-trailing-slash.js.map +1 -0
- package/lib/rules/catalog-entity/entity-key-valid.d.ts +3 -0
- package/lib/rules/catalog-entity/entity-key-valid.d.ts.map +1 -0
- package/lib/rules/catalog-entity/entity-key-valid.js +39 -0
- package/lib/rules/catalog-entity/entity-key-valid.js.map +1 -0
- package/lib/rules/common/assertions/asserts.d.ts +30 -0
- package/lib/rules/common/assertions/asserts.d.ts.map +1 -0
- package/lib/rules/common/assertions/asserts.js +272 -0
- package/lib/rules/common/assertions/asserts.js.map +1 -0
- package/lib/rules/common/assertions/index.d.ts +28 -0
- package/lib/rules/common/assertions/index.d.ts.map +1 -0
- package/lib/rules/common/assertions/index.js +22 -0
- package/lib/rules/common/assertions/index.js.map +1 -0
- package/lib/rules/common/assertions/utils.d.ts +21 -0
- package/lib/rules/common/assertions/utils.d.ts.map +1 -0
- package/lib/rules/common/assertions/utils.js +215 -0
- package/lib/rules/common/assertions/utils.js.map +1 -0
- package/lib/rules/common/info-contact.d.ts +3 -0
- package/lib/rules/common/info-contact.d.ts.map +1 -0
- package/lib/rules/common/info-contact.js +14 -0
- package/lib/rules/common/info-contact.js.map +1 -0
- package/lib/rules/common/info-license-strict.d.ts +3 -0
- package/lib/rules/common/info-license-strict.d.ts.map +1 -0
- package/lib/rules/common/info-license-strict.js +23 -0
- package/lib/rules/common/info-license-strict.js.map +1 -0
- package/lib/rules/common/info-license.d.ts +3 -0
- package/lib/rules/common/info-license.d.ts.map +1 -0
- package/lib/rules/common/info-license.js +14 -0
- package/lib/rules/common/info-license.js.map +1 -0
- package/lib/rules/common/no-ambiguous-paths.d.ts +3 -0
- package/lib/rules/common/no-ambiguous-paths.d.ts.map +1 -0
- package/lib/rules/common/no-ambiguous-paths.js +42 -0
- package/lib/rules/common/no-ambiguous-paths.js.map +1 -0
- package/lib/rules/common/no-duplicated-tag-names.d.ts +3 -0
- package/lib/rules/common/no-duplicated-tag-names.d.ts.map +1 -0
- package/lib/rules/common/no-duplicated-tag-names.js +21 -0
- package/lib/rules/common/no-duplicated-tag-names.js.map +1 -0
- package/lib/rules/common/no-enum-type-mismatch.d.ts +3 -0
- package/lib/rules/common/no-enum-type-mismatch.d.ts.map +1 -0
- package/lib/rules/common/no-enum-type-mismatch.js +38 -0
- package/lib/rules/common/no-enum-type-mismatch.js.map +1 -0
- package/lib/rules/common/no-http-verbs-in-paths.d.ts +3 -0
- package/lib/rules/common/no-http-verbs-in-paths.d.ts.map +1 -0
- package/lib/rules/common/no-http-verbs-in-paths.js +31 -0
- package/lib/rules/common/no-http-verbs-in-paths.js.map +1 -0
- package/lib/rules/common/no-identical-paths.d.ts +3 -0
- package/lib/rules/common/no-identical-paths.d.ts.map +1 -0
- package/lib/rules/common/no-identical-paths.js +21 -0
- package/lib/rules/common/no-identical-paths.js.map +1 -0
- package/lib/rules/common/no-invalid-parameter-examples.d.ts +2 -0
- package/lib/rules/common/no-invalid-parameter-examples.d.ts.map +1 -0
- package/lib/rules/common/no-invalid-parameter-examples.js +32 -0
- package/lib/rules/common/no-invalid-parameter-examples.js.map +1 -0
- package/lib/rules/common/no-invalid-schema-examples.d.ts +3 -0
- package/lib/rules/common/no-invalid-schema-examples.d.ts.map +1 -0
- package/lib/rules/common/no-invalid-schema-examples.js +34 -0
- package/lib/rules/common/no-invalid-schema-examples.js.map +1 -0
- package/lib/rules/common/no-path-trailing-slash.d.ts +3 -0
- package/lib/rules/common/no-path-trailing-slash.d.ts.map +1 -0
- package/lib/rules/common/no-path-trailing-slash.js +13 -0
- package/lib/rules/common/no-path-trailing-slash.js.map +1 -0
- package/lib/rules/common/no-required-schema-properties-undefined.d.ts +3 -0
- package/lib/rules/common/no-required-schema-properties-undefined.d.ts.map +1 -0
- package/lib/rules/common/no-required-schema-properties-undefined.js +78 -0
- package/lib/rules/common/no-required-schema-properties-undefined.js.map +1 -0
- package/lib/rules/common/no-schema-type-mismatch.d.ts +3 -0
- package/lib/rules/common/no-schema-type-mismatch.d.ts.map +1 -0
- package/lib/rules/common/no-schema-type-mismatch.js +19 -0
- package/lib/rules/common/no-schema-type-mismatch.js.map +1 -0
- package/lib/rules/common/no-unresolved-refs.d.ts +6 -0
- package/lib/rules/common/no-unresolved-refs.d.ts.map +1 -0
- package/lib/rules/common/no-unresolved-refs.js +42 -0
- package/lib/rules/common/no-unresolved-refs.js.map +1 -0
- package/lib/rules/common/operation-2xx-response.d.ts +3 -0
- package/lib/rules/common/operation-2xx-response.d.ts.map +1 -0
- package/lib/rules/common/operation-2xx-response.js +20 -0
- package/lib/rules/common/operation-2xx-response.js.map +1 -0
- package/lib/rules/common/operation-4xx-response.d.ts +3 -0
- package/lib/rules/common/operation-4xx-response.d.ts.map +1 -0
- package/lib/rules/common/operation-4xx-response.js +20 -0
- package/lib/rules/common/operation-4xx-response.js.map +1 -0
- package/lib/rules/common/operation-description.d.ts +3 -0
- package/lib/rules/common/operation-description.d.ts.map +1 -0
- package/lib/rules/common/operation-description.js +9 -0
- package/lib/rules/common/operation-description.js.map +1 -0
- package/lib/rules/common/operation-operationId-unique.d.ts +3 -0
- package/lib/rules/common/operation-operationId-unique.d.ts.map +1 -0
- package/lib/rules/common/operation-operationId-unique.js +17 -0
- package/lib/rules/common/operation-operationId-unique.js.map +1 -0
- package/lib/rules/common/operation-operationId-url-safe.d.ts +3 -0
- package/lib/rules/common/operation-operationId-url-safe.d.ts.map +1 -0
- package/lib/rules/common/operation-operationId-url-safe.js +15 -0
- package/lib/rules/common/operation-operationId-url-safe.js.map +1 -0
- package/lib/rules/common/operation-operationId.d.ts +3 -0
- package/lib/rules/common/operation-operationId.d.ts.map +1 -0
- package/lib/rules/common/operation-operationId.js +13 -0
- package/lib/rules/common/operation-operationId.js.map +1 -0
- package/lib/rules/common/operation-parameters-unique.d.ts +3 -0
- package/lib/rules/common/operation-parameters-unique.d.ts.map +1 -0
- package/lib/rules/common/operation-parameters-unique.js +37 -0
- package/lib/rules/common/operation-parameters-unique.js.map +1 -0
- package/lib/rules/common/operation-singular-tag.d.ts +3 -0
- package/lib/rules/common/operation-singular-tag.d.ts.map +1 -0
- package/lib/rules/common/operation-singular-tag.js +13 -0
- package/lib/rules/common/operation-singular-tag.js.map +1 -0
- package/lib/rules/common/operation-summary.d.ts +3 -0
- package/lib/rules/common/operation-summary.d.ts.map +1 -0
- package/lib/rules/common/operation-summary.js +9 -0
- package/lib/rules/common/operation-summary.js.map +1 -0
- package/lib/rules/common/operation-tag-defined.d.ts +3 -0
- package/lib/rules/common/operation-tag-defined.d.ts.map +1 -0
- package/lib/rules/common/operation-tag-defined.js +27 -0
- package/lib/rules/common/operation-tag-defined.js.map +1 -0
- package/lib/rules/common/parameter-description.d.ts +3 -0
- package/lib/rules/common/parameter-description.d.ts.map +1 -0
- package/lib/rules/common/parameter-description.js +19 -0
- package/lib/rules/common/parameter-description.js.map +1 -0
- package/lib/rules/common/path-declaration-must-exist.d.ts +3 -0
- package/lib/rules/common/path-declaration-must-exist.d.ts.map +1 -0
- package/lib/rules/common/path-declaration-must-exist.js +13 -0
- package/lib/rules/common/path-declaration-must-exist.js.map +1 -0
- package/lib/rules/common/path-http-verbs-order.d.ts +3 -0
- package/lib/rules/common/path-http-verbs-order.d.ts.map +1 -0
- package/lib/rules/common/path-http-verbs-order.js +23 -0
- package/lib/rules/common/path-http-verbs-order.js.map +1 -0
- package/lib/rules/common/path-not-include-query.d.ts +3 -0
- package/lib/rules/common/path-not-include-query.d.ts.map +1 -0
- package/lib/rules/common/path-not-include-query.js +15 -0
- package/lib/rules/common/path-not-include-query.js.map +1 -0
- package/lib/rules/common/path-params-defined.d.ts +3 -0
- package/lib/rules/common/path-params-defined.d.ts.map +1 -0
- package/lib/rules/common/path-params-defined.js +145 -0
- package/lib/rules/common/path-params-defined.js.map +1 -0
- package/lib/rules/common/path-segment-plural.d.ts +3 -0
- package/lib/rules/common/path-segment-plural.d.ts.map +1 -0
- package/lib/rules/common/path-segment-plural.js +30 -0
- package/lib/rules/common/path-segment-plural.js.map +1 -0
- package/lib/rules/common/paths-kebab-case.d.ts +3 -0
- package/lib/rules/common/paths-kebab-case.d.ts.map +1 -0
- package/lib/rules/common/paths-kebab-case.js +17 -0
- package/lib/rules/common/paths-kebab-case.js.map +1 -0
- package/lib/rules/common/required-string-property-missing-min-length.d.ts +3 -0
- package/lib/rules/common/required-string-property-missing-min-length.d.ts.map +1 -0
- package/lib/rules/common/required-string-property-missing-min-length.js +34 -0
- package/lib/rules/common/required-string-property-missing-min-length.js.map +1 -0
- package/lib/rules/common/response-contains-header.d.ts +3 -0
- package/lib/rules/common/response-contains-header.d.ts.map +1 -0
- package/lib/rules/common/response-contains-header.js +26 -0
- package/lib/rules/common/response-contains-header.js.map +1 -0
- package/lib/rules/common/scalar-property-missing-example.d.ts +3 -0
- package/lib/rules/common/scalar-property-missing-example.d.ts.map +1 -0
- package/lib/rules/common/scalar-property-missing-example.js +39 -0
- package/lib/rules/common/scalar-property-missing-example.js.map +1 -0
- package/lib/rules/common/security-defined.d.ts +3 -0
- package/lib/rules/common/security-defined.d.ts.map +1 -0
- package/lib/rules/common/security-defined.js +62 -0
- package/lib/rules/common/security-defined.js.map +1 -0
- package/lib/rules/common/spec-strict-refs.d.ts +3 -0
- package/lib/rules/common/spec-strict-refs.d.ts.map +1 -0
- package/lib/rules/common/spec-strict-refs.js +27 -0
- package/lib/rules/common/spec-strict-refs.js.map +1 -0
- package/lib/rules/common/struct.d.ts +3 -0
- package/lib/rules/common/struct.d.ts.map +1 -0
- package/lib/rules/common/struct.js +150 -0
- package/lib/rules/common/struct.js.map +1 -0
- package/lib/rules/common/tag-description.d.ts +3 -0
- package/lib/rules/common/tag-description.d.ts.map +1 -0
- package/lib/rules/common/tag-description.js +9 -0
- package/lib/rules/common/tag-description.js.map +1 -0
- package/lib/rules/common/tags-alphabetical.d.ts +3 -0
- package/lib/rules/common/tags-alphabetical.d.ts.map +1 -0
- package/lib/rules/common/tags-alphabetical.js +18 -0
- package/lib/rules/common/tags-alphabetical.js.map +1 -0
- package/lib/rules/oas2/boolean-parameter-prefixes.d.ts +6 -0
- package/lib/rules/oas2/boolean-parameter-prefixes.d.ts.map +1 -0
- package/lib/rules/oas2/boolean-parameter-prefixes.js +19 -0
- package/lib/rules/oas2/boolean-parameter-prefixes.js.map +1 -0
- package/lib/rules/oas2/index.d.ts +4 -0
- package/lib/rules/oas2/index.d.ts.map +1 -0
- package/lib/rules/oas2/index.js +93 -0
- package/lib/rules/oas2/index.js.map +1 -0
- package/lib/rules/oas2/request-mime-type.d.ts +3 -0
- package/lib/rules/oas2/request-mime-type.d.ts.map +1 -0
- package/lib/rules/oas2/request-mime-type.js +14 -0
- package/lib/rules/oas2/request-mime-type.js.map +1 -0
- package/lib/rules/oas2/response-contains-property.d.ts +3 -0
- package/lib/rules/oas2/response-contains-property.d.ts.map +1 -0
- package/lib/rules/oas2/response-contains-property.js +34 -0
- package/lib/rules/oas2/response-contains-property.js.map +1 -0
- package/lib/rules/oas2/response-mime-type.d.ts +3 -0
- package/lib/rules/oas2/response-mime-type.d.ts.map +1 -0
- package/lib/rules/oas2/response-mime-type.js +14 -0
- package/lib/rules/oas2/response-mime-type.js.map +1 -0
- package/lib/rules/oas3/array-parameter-serialization.d.ts +6 -0
- package/lib/rules/oas3/array-parameter-serialization.d.ts.map +1 -0
- package/lib/rules/oas3/array-parameter-serialization.js +26 -0
- package/lib/rules/oas3/array-parameter-serialization.js.map +1 -0
- package/lib/rules/oas3/boolean-parameter-prefixes.d.ts +6 -0
- package/lib/rules/oas3/boolean-parameter-prefixes.d.ts.map +1 -0
- package/lib/rules/oas3/boolean-parameter-prefixes.js +21 -0
- package/lib/rules/oas3/boolean-parameter-prefixes.js.map +1 -0
- package/lib/rules/oas3/component-name-unique.d.ts +3 -0
- package/lib/rules/oas3/component-name-unique.d.ts.map +1 -0
- package/lib/rules/oas3/component-name-unique.js +130 -0
- package/lib/rules/oas3/component-name-unique.js.map +1 -0
- package/lib/rules/oas3/index.d.ts +4 -0
- package/lib/rules/oas3/index.d.ts.map +1 -0
- package/lib/rules/oas3/index.js +129 -0
- package/lib/rules/oas3/index.js.map +1 -0
- package/lib/rules/oas3/no-empty-servers.d.ts +3 -0
- package/lib/rules/oas3/no-empty-servers.d.ts.map +1 -0
- package/lib/rules/oas3/no-empty-servers.js +20 -0
- package/lib/rules/oas3/no-empty-servers.js.map +1 -0
- package/lib/rules/oas3/no-example-value-and-externalValue.d.ts +3 -0
- package/lib/rules/oas3/no-example-value-and-externalValue.d.ts.map +1 -0
- package/lib/rules/oas3/no-example-value-and-externalValue.js +13 -0
- package/lib/rules/oas3/no-example-value-and-externalValue.js.map +1 -0
- package/lib/rules/oas3/no-invalid-media-type-examples.d.ts +3 -0
- package/lib/rules/oas3/no-invalid-media-type-examples.d.ts.map +1 -0
- package/lib/rules/oas3/no-invalid-media-type-examples.js +59 -0
- package/lib/rules/oas3/no-invalid-media-type-examples.js.map +1 -0
- package/lib/rules/oas3/no-server-example.com.d.ts +3 -0
- package/lib/rules/oas3/no-server-example.com.d.ts.map +1 -0
- package/lib/rules/oas3/no-server-example.com.js +15 -0
- package/lib/rules/oas3/no-server-example.com.js.map +1 -0
- package/lib/rules/oas3/no-server-trailing-slash.d.ts +3 -0
- package/lib/rules/oas3/no-server-trailing-slash.d.ts.map +1 -0
- package/lib/rules/oas3/no-server-trailing-slash.js +15 -0
- package/lib/rules/oas3/no-server-trailing-slash.js.map +1 -0
- package/lib/rules/oas3/no-server-variables-empty-enum.d.ts +3 -0
- package/lib/rules/oas3/no-server-variables-empty-enum.d.ts.map +1 -0
- package/lib/rules/oas3/no-server-variables-empty-enum.js +58 -0
- package/lib/rules/oas3/no-server-variables-empty-enum.js.map +1 -0
- package/lib/rules/oas3/no-undefined-server-variable.d.ts +3 -0
- package/lib/rules/oas3/no-undefined-server-variable.d.ts.map +1 -0
- package/lib/rules/oas3/no-undefined-server-variable.js +28 -0
- package/lib/rules/oas3/no-undefined-server-variable.js.map +1 -0
- package/lib/rules/oas3/no-unused-components.d.ts +3 -0
- package/lib/rules/oas3/no-unused-components.d.ts.map +1 -0
- package/lib/rules/oas3/no-unused-components.js +83 -0
- package/lib/rules/oas3/no-unused-components.js.map +1 -0
- package/lib/rules/oas3/nullable-type-sibling.d.ts +3 -0
- package/lib/rules/oas3/nullable-type-sibling.d.ts.map +1 -0
- package/lib/rules/oas3/nullable-type-sibling.js +15 -0
- package/lib/rules/oas3/nullable-type-sibling.js.map +1 -0
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts +6 -0
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts.map +1 -0
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js +33 -0
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js.map +1 -0
- package/lib/rules/oas3/request-mime-type.d.ts +3 -0
- package/lib/rules/oas3/request-mime-type.d.ts.map +1 -0
- package/lib/rules/oas3/request-mime-type.js +28 -0
- package/lib/rules/oas3/request-mime-type.js.map +1 -0
- package/lib/rules/oas3/response-contains-property.d.ts +3 -0
- package/lib/rules/oas3/response-contains-property.d.ts.map +1 -0
- package/lib/rules/oas3/response-contains-property.js +36 -0
- package/lib/rules/oas3/response-contains-property.js.map +1 -0
- package/lib/rules/oas3/response-mime-type.d.ts +3 -0
- package/lib/rules/oas3/response-mime-type.d.ts.map +1 -0
- package/lib/rules/oas3/response-mime-type.js +28 -0
- package/lib/rules/oas3/response-mime-type.js.map +1 -0
- package/lib/rules/oas3/spec-components-invalid-map-name.d.ts +3 -0
- package/lib/rules/oas3/spec-components-invalid-map-name.d.ts.map +1 -0
- package/lib/rules/oas3/spec-components-invalid-map-name.js +59 -0
- package/lib/rules/oas3/spec-components-invalid-map-name.js.map +1 -0
- package/lib/rules/oas3/spec-discriminator-defaultMapping.d.ts +3 -0
- package/lib/rules/oas3/spec-discriminator-defaultMapping.d.ts.map +1 -0
- package/lib/rules/oas3/spec-discriminator-defaultMapping.js +32 -0
- package/lib/rules/oas3/spec-discriminator-defaultMapping.js.map +1 -0
- package/lib/rules/oas3/spec-example-values.d.ts +3 -0
- package/lib/rules/oas3/spec-example-values.d.ts.map +1 -0
- package/lib/rules/oas3/spec-example-values.js +31 -0
- package/lib/rules/oas3/spec-example-values.js.map +1 -0
- package/lib/rules/oas3/spec-no-invalid-encoding-combinations.d.ts +3 -0
- package/lib/rules/oas3/spec-no-invalid-encoding-combinations.d.ts.map +1 -0
- package/lib/rules/oas3/spec-no-invalid-encoding-combinations.js +16 -0
- package/lib/rules/oas3/spec-no-invalid-encoding-combinations.js.map +1 -0
- package/lib/rules/oas3/spec-no-invalid-tag-parents.d.ts +3 -0
- package/lib/rules/oas3/spec-no-invalid-tag-parents.d.ts.map +1 -0
- package/lib/rules/oas3/spec-no-invalid-tag-parents.js +38 -0
- package/lib/rules/oas3/spec-no-invalid-tag-parents.js.map +1 -0
- package/lib/rules/oas3/spec-querystring-parameters.d.ts +3 -0
- package/lib/rules/oas3/spec-querystring-parameters.d.ts.map +1 -0
- package/lib/rules/oas3/spec-querystring-parameters.js +65 -0
- package/lib/rules/oas3/spec-querystring-parameters.js.map +1 -0
- package/lib/rules/openrpc/index.d.ts +4 -0
- package/lib/rules/openrpc/index.d.ts.map +1 -0
- package/lib/rules/openrpc/index.js +20 -0
- package/lib/rules/openrpc/index.js.map +1 -0
- package/lib/rules/openrpc/no-unused-components.d.ts +3 -0
- package/lib/rules/openrpc/no-unused-components.d.ts.map +1 -0
- package/lib/rules/openrpc/no-unused-components.js +82 -0
- package/lib/rules/openrpc/no-unused-components.js.map +1 -0
- package/lib/rules/openrpc/spec-no-duplicated-method-params.d.ts +3 -0
- package/lib/rules/openrpc/spec-no-duplicated-method-params.d.ts.map +1 -0
- package/lib/rules/openrpc/spec-no-duplicated-method-params.js +28 -0
- package/lib/rules/openrpc/spec-no-duplicated-method-params.js.map +1 -0
- package/lib/rules/openrpc/spec-no-required-params-after-optional.d.ts +3 -0
- package/lib/rules/openrpc/spec-no-required-params-after-optional.d.ts.map +1 -0
- package/lib/rules/openrpc/spec-no-required-params-after-optional.js +31 -0
- package/lib/rules/openrpc/spec-no-required-params-after-optional.js.map +1 -0
- package/lib/rules/other/stats.d.ts +104 -0
- package/lib/rules/other/stats.d.ts.map +1 -0
- package/lib/rules/other/stats.js +190 -0
- package/lib/rules/other/stats.js.map +1 -0
- package/lib/rules/overlay1/index.d.ts +4 -0
- package/lib/rules/overlay1/index.d.ts.map +1 -0
- package/lib/rules/overlay1/index.js +12 -0
- package/lib/rules/overlay1/index.js.map +1 -0
- package/lib/rules/respect/no-criteria-xpath.d.ts +3 -0
- package/lib/rules/respect/no-criteria-xpath.d.ts.map +1 -0
- package/lib/rules/respect/no-criteria-xpath.js +20 -0
- package/lib/rules/respect/no-criteria-xpath.js.map +1 -0
- package/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.d.ts +3 -0
- package/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.d.ts.map +1 -0
- package/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.js +30 -0
- package/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.js.map +1 -0
- package/lib/rules/respect/no-x-security-scheme-name-without-openapi.d.ts +3 -0
- package/lib/rules/respect/no-x-security-scheme-name-without-openapi.d.ts.map +1 -0
- package/lib/rules/respect/no-x-security-scheme-name-without-openapi.js +25 -0
- package/lib/rules/respect/no-x-security-scheme-name-without-openapi.js.map +1 -0
- package/lib/rules/respect/respect-supported-versions.d.ts +3 -0
- package/lib/rules/respect/respect-supported-versions.d.ts.map +1 -0
- package/lib/rules/respect/respect-supported-versions.js +18 -0
- package/lib/rules/respect/respect-supported-versions.js.map +1 -0
- package/lib/rules/respect/x-security-scheme-name-reference.d.ts +3 -0
- package/lib/rules/respect/x-security-scheme-name-reference.d.ts.map +1 -0
- package/lib/rules/respect/x-security-scheme-name-reference.js +35 -0
- package/lib/rules/respect/x-security-scheme-name-reference.js.map +1 -0
- package/lib/rules/respect/x-security-scheme-required-values.d.ts +3 -0
- package/lib/rules/respect/x-security-scheme-required-values.d.ts.map +1 -0
- package/lib/rules/respect/x-security-scheme-required-values.js +60 -0
- package/lib/rules/respect/x-security-scheme-required-values.js.map +1 -0
- package/lib/rules/utils.d.ts +30 -0
- package/lib/rules/utils.d.ts.map +1 -0
- package/lib/rules/utils.js +172 -0
- package/lib/rules/utils.js.map +1 -0
- package/lib/types/arazzo.d.ts +3 -0
- package/lib/types/arazzo.d.ts.map +1 -0
- package/lib/types/arazzo.js +482 -0
- package/lib/types/arazzo.js.map +1 -0
- package/lib/types/asyncapi2.d.ts +13 -0
- package/lib/types/asyncapi2.d.ts.map +1 -0
- package/lib/types/asyncapi2.js +1157 -0
- package/lib/types/asyncapi2.js.map +1 -0
- package/lib/types/asyncapi3.d.ts +3 -0
- package/lib/types/asyncapi3.d.ts.map +1 -0
- package/lib/types/asyncapi3.js +511 -0
- package/lib/types/asyncapi3.js.map +1 -0
- package/lib/types/entity.d.ts +9 -0
- package/lib/types/entity.d.ts.map +1 -0
- package/lib/types/entity.js +32 -0
- package/lib/types/entity.js.map +1 -0
- package/lib/types/index.d.ts +78 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +90 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/json-schema-adapter.d.ts +12 -0
- package/lib/types/json-schema-adapter.d.ts.map +1 -0
- package/lib/types/json-schema-adapter.js +181 -0
- package/lib/types/json-schema-adapter.js.map +1 -0
- package/lib/types/json-schema-draft7.shared.d.ts +7 -0
- package/lib/types/json-schema-draft7.shared.d.ts.map +1 -0
- package/lib/types/json-schema-draft7.shared.js +101 -0
- package/lib/types/json-schema-draft7.shared.js.map +1 -0
- package/lib/types/oas2.d.ts +107 -0
- package/lib/types/oas2.d.ts.map +1 -0
- package/lib/types/oas2.js +454 -0
- package/lib/types/oas2.js.map +1 -0
- package/lib/types/oas3.d.ts +198 -0
- package/lib/types/oas3.d.ts.map +1 -0
- package/lib/types/oas3.js +828 -0
- package/lib/types/oas3.js.map +1 -0
- package/lib/types/oas3_1.d.ts +207 -0
- package/lib/types/oas3_1.d.ts.map +1 -0
- package/lib/types/oas3_1.js +292 -0
- package/lib/types/oas3_1.js.map +1 -0
- package/lib/types/oas3_2.d.ts +215 -0
- package/lib/types/oas3_2.d.ts.map +1 -0
- package/lib/types/oas3_2.js +306 -0
- package/lib/types/oas3_2.js.map +1 -0
- package/lib/types/openrpc.d.ts +136 -0
- package/lib/types/openrpc.d.ts.map +1 -0
- package/lib/types/openrpc.js +360 -0
- package/lib/types/openrpc.js.map +1 -0
- package/lib/types/overlay.d.ts +3 -0
- package/lib/types/overlay.d.ts.map +1 -0
- package/lib/types/overlay.js +61 -0
- package/lib/types/overlay.js.map +1 -0
- package/lib/types/redocly-yaml.d.ts +29 -0
- package/lib/types/redocly-yaml.d.ts.map +1 -0
- package/lib/types/redocly-yaml.js +573 -0
- package/lib/types/redocly-yaml.js.map +1 -0
- package/lib/typings/arazzo.d.ts +172 -0
- package/lib/typings/arazzo.d.ts.map +1 -0
- package/lib/typings/arazzo.js +3 -0
- package/lib/typings/arazzo.js.map +1 -0
- package/lib/typings/asyncapi.d.ts +22 -0
- package/lib/typings/asyncapi.d.ts.map +1 -0
- package/lib/typings/asyncapi.js +2 -0
- package/lib/typings/asyncapi.js.map +1 -0
- package/lib/typings/asyncapi3.d.ts +54 -0
- package/lib/typings/asyncapi3.d.ts.map +1 -0
- package/lib/typings/asyncapi3.js +2 -0
- package/lib/typings/asyncapi3.js.map +1 -0
- package/lib/typings/common.d.ts +13 -0
- package/lib/typings/common.d.ts.map +1 -0
- package/lib/typings/common.js +2 -0
- package/lib/typings/common.js.map +1 -0
- package/lib/typings/openapi.d.ts +420 -0
- package/lib/typings/openapi.d.ts.map +1 -0
- package/lib/typings/openapi.js +2 -0
- package/lib/typings/openapi.js.map +1 -0
- package/lib/typings/openrpc.d.ts +110 -0
- package/lib/typings/openrpc.d.ts.map +1 -0
- package/lib/typings/openrpc.js +2 -0
- package/lib/typings/openrpc.js.map +1 -0
- package/lib/typings/overlay.d.ts +18 -0
- package/lib/typings/overlay.d.ts.map +1 -0
- package/lib/typings/overlay.js +2 -0
- package/lib/typings/overlay.js.map +1 -0
- package/lib/typings/swagger.d.ts +218 -0
- package/lib/typings/swagger.d.ts.map +1 -0
- package/lib/typings/swagger.js +2 -0
- package/lib/typings/swagger.js.map +1 -0
- package/lib/utils/assign-config.d.ts +7 -0
- package/lib/utils/assign-config.d.ts.map +1 -0
- package/lib/utils/assign-config.js +28 -0
- package/lib/utils/assign-config.js.map +1 -0
- package/lib/utils/dequal.d.ts +6 -0
- package/lib/utils/dequal.d.ts.map +1 -0
- package/lib/utils/dequal.js +36 -0
- package/lib/utils/dequal.js.map +1 -0
- package/lib/utils/does-yaml-file-exist.d.ts +2 -0
- package/lib/utils/does-yaml-file-exist.d.ts.map +1 -0
- package/lib/utils/does-yaml-file-exist.js +7 -0
- package/lib/utils/does-yaml-file-exist.js.map +1 -0
- package/lib/utils/error.d.ts +3 -0
- package/lib/utils/error.d.ts.map +1 -0
- package/lib/utils/error.js +3 -0
- package/lib/utils/error.js.map +1 -0
- package/lib/utils/get-intersection-length.d.ts +2 -0
- package/lib/utils/get-intersection-length.d.ts.map +1 -0
- package/lib/utils/get-intersection-length.js +11 -0
- package/lib/utils/get-intersection-length.js.map +1 -0
- package/lib/utils/get-matching-status-code-range.d.ts +2 -0
- package/lib/utils/get-matching-status-code-range.d.ts.map +1 -0
- package/lib/utils/get-matching-status-code-range.js +4 -0
- package/lib/utils/get-matching-status-code-range.js.map +1 -0
- package/lib/utils/get-own.d.ts +2 -0
- package/lib/utils/get-own.d.ts.map +1 -0
- package/lib/utils/get-own.js +4 -0
- package/lib/utils/get-own.js.map +1 -0
- package/lib/utils/identity.d.ts +2 -0
- package/lib/utils/identity.d.ts.map +1 -0
- package/lib/utils/identity.js +4 -0
- package/lib/utils/identity.js.map +1 -0
- package/lib/utils/is-custom-rule-id.d.ts +2 -0
- package/lib/utils/is-custom-rule-id.d.ts.map +1 -0
- package/lib/utils/is-custom-rule-id.js +4 -0
- package/lib/utils/is-custom-rule-id.js.map +1 -0
- package/lib/utils/is-defined.d.ts +2 -0
- package/lib/utils/is-defined.d.ts.map +1 -0
- package/lib/utils/is-defined.js +4 -0
- package/lib/utils/is-defined.js.map +1 -0
- package/lib/utils/is-empty-array.d.ts +2 -0
- package/lib/utils/is-empty-array.d.ts.map +1 -0
- package/lib/utils/is-empty-array.js +4 -0
- package/lib/utils/is-empty-array.js.map +1 -0
- package/lib/utils/is-empty-object.d.ts +2 -0
- package/lib/utils/is-empty-object.d.ts.map +1 -0
- package/lib/utils/is-empty-object.js +5 -0
- package/lib/utils/is-empty-object.js.map +1 -0
- package/lib/utils/is-not-empty-array.d.ts +2 -0
- package/lib/utils/is-not-empty-array.d.ts.map +1 -0
- package/lib/utils/is-not-empty-array.js +4 -0
- package/lib/utils/is-not-empty-array.js.map +1 -0
- package/lib/utils/is-not-empty-object.d.ts +2 -0
- package/lib/utils/is-not-empty-object.d.ts.map +1 -0
- package/lib/utils/is-not-empty-object.js +6 -0
- package/lib/utils/is-not-empty-object.js.map +1 -0
- package/lib/utils/is-not-string.d.ts +2 -0
- package/lib/utils/is-not-string.d.ts.map +1 -0
- package/lib/utils/is-not-string.js +5 -0
- package/lib/utils/is-not-string.js.map +1 -0
- package/lib/utils/is-ordered.d.ts +7 -0
- package/lib/utils/is-ordered.d.ts.map +1 -0
- package/lib/utils/is-ordered.js +27 -0
- package/lib/utils/is-ordered.js.map +1 -0
- package/lib/utils/is-path-parameter.d.ts +2 -0
- package/lib/utils/is-path-parameter.d.ts.map +1 -0
- package/lib/utils/is-path-parameter.js +4 -0
- package/lib/utils/is-path-parameter.js.map +1 -0
- package/lib/utils/is-plain-object.d.ts +2 -0
- package/lib/utils/is-plain-object.d.ts.map +1 -0
- package/lib/utils/is-plain-object.js +4 -0
- package/lib/utils/is-plain-object.js.map +1 -0
- package/lib/utils/is-string.d.ts +2 -0
- package/lib/utils/is-string.d.ts.map +1 -0
- package/lib/utils/is-string.js +4 -0
- package/lib/utils/is-string.js.map +1 -0
- package/lib/utils/is-truthy.d.ts +3 -0
- package/lib/utils/is-truthy.d.ts.map +1 -0
- package/lib/utils/is-truthy.js +4 -0
- package/lib/utils/is-truthy.js.map +1 -0
- package/lib/utils/keys-of.d.ts +2 -0
- package/lib/utils/keys-of.d.ts.map +1 -0
- package/lib/utils/keys-of.js +6 -0
- package/lib/utils/keys-of.js.map +1 -0
- package/lib/utils/make-ref-id.d.ts +2 -0
- package/lib/utils/make-ref-id.d.ts.map +1 -0
- package/lib/utils/make-ref-id.js +4 -0
- package/lib/utils/make-ref-id.js.map +1 -0
- package/lib/utils/next-tick.d.ts +2 -0
- package/lib/utils/next-tick.d.ts.map +1 -0
- package/lib/utils/next-tick.js +6 -0
- package/lib/utils/next-tick.js.map +1 -0
- package/lib/utils/oas-has-component.d.ts +3 -0
- package/lib/utils/oas-has-component.d.ts.map +1 -0
- package/lib/utils/oas-has-component.js +4 -0
- package/lib/utils/oas-has-component.js.map +1 -0
- package/lib/utils/omit.d.ts +2 -0
- package/lib/utils/omit.d.ts.map +1 -0
- package/lib/utils/omit.js +8 -0
- package/lib/utils/omit.js.map +1 -0
- package/lib/utils/pause.d.ts +2 -0
- package/lib/utils/pause.d.ts.map +1 -0
- package/lib/utils/pause.js +4 -0
- package/lib/utils/pause.js.map +1 -0
- package/lib/utils/pluralize.d.ts +2 -0
- package/lib/utils/pluralize.d.ts.map +1 -0
- package/lib/utils/pluralize.js +8 -0
- package/lib/utils/pluralize.js.map +1 -0
- package/lib/utils/read-file-from-url.d.ts +6 -0
- package/lib/utils/read-file-from-url.d.ts.map +1 -0
- package/lib/utils/read-file-from-url.js +26 -0
- package/lib/utils/read-file-from-url.js.map +1 -0
- package/lib/utils/regex-from-string.d.ts +2 -0
- package/lib/utils/regex-from-string.d.ts.map +1 -0
- package/lib/utils/regex-from-string.js +5 -0
- package/lib/utils/regex-from-string.js.map +1 -0
- package/lib/utils/scorecards.d.ts +13 -0
- package/lib/utils/scorecards.d.ts.map +1 -0
- package/lib/utils/scorecards.js +99 -0
- package/lib/utils/scorecards.js.map +1 -0
- package/lib/utils/slash.d.ts +5 -0
- package/lib/utils/slash.d.ts.map +1 -0
- package/lib/utils/slash.js +11 -0
- package/lib/utils/slash.js.map +1 -0
- package/lib/utils/split-camel-case-into-words.d.ts +2 -0
- package/lib/utils/split-camel-case-into-words.d.ts.map +1 -0
- package/lib/utils/split-camel-case-into-words.js +13 -0
- package/lib/utils/split-camel-case-into-words.js.map +1 -0
- package/lib/utils/stack.d.ts +12 -0
- package/lib/utils/stack.d.ts.map +1 -0
- package/lib/utils/stack.js +7 -0
- package/lib/utils/stack.js.map +1 -0
- package/lib/utils/types.d.ts +5 -0
- package/lib/utils/types.d.ts.map +1 -0
- package/lib/utils/types.js +2 -0
- package/lib/utils/types.js.map +1 -0
- package/lib/utils/validate-mime-type.d.ts +4 -0
- package/lib/utils/validate-mime-type.d.ts.map +1 -0
- package/lib/utils/validate-mime-type.js +31 -0
- package/lib/utils/validate-mime-type.js.map +1 -0
- package/lib/utils/yaml-fs-helper.d.ts +6 -0
- package/lib/utils/yaml-fs-helper.d.ts.map +1 -0
- package/lib/utils/yaml-fs-helper.js +23 -0
- package/lib/utils/yaml-fs-helper.js.map +1 -0
- package/lib/visitors.d.ts +279 -0
- package/lib/visitors.d.ts.map +1 -0
- package/lib/visitors.js +177 -0
- package/lib/visitors.js.map +1 -0
- package/lib/walk.d.ts +81 -0
- package/lib/walk.d.ts.map +1 -0
- package/lib/walk.js +303 -0
- package/lib/walk.js.map +1 -0
- package/package.json +95 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export type ScalarSchema = {
|
|
2
|
+
name?: never;
|
|
3
|
+
type?: 'string' | 'boolean' | 'number' | 'integer' | 'object' | 'array';
|
|
4
|
+
items?: ScalarSchema;
|
|
5
|
+
enum?: string[];
|
|
6
|
+
isExample?: boolean;
|
|
7
|
+
resolvable?: boolean;
|
|
8
|
+
directResolveAs?: string;
|
|
9
|
+
minimum?: number;
|
|
10
|
+
description?: string;
|
|
11
|
+
documentationLink?: string;
|
|
12
|
+
};
|
|
13
|
+
export type NormalizedScalarSchema = {
|
|
14
|
+
name?: never;
|
|
15
|
+
type?: 'string' | 'boolean' | 'number' | 'integer' | 'object' | 'array';
|
|
16
|
+
items?: ScalarSchema;
|
|
17
|
+
enum?: string[];
|
|
18
|
+
directResolveAs?: NormalizedNodeType;
|
|
19
|
+
resolvable: boolean;
|
|
20
|
+
minimum?: number;
|
|
21
|
+
description?: string;
|
|
22
|
+
documentationLink?: string;
|
|
23
|
+
};
|
|
24
|
+
export type NodeType = {
|
|
25
|
+
properties: Record<string, PropType | ResolveTypeFn>;
|
|
26
|
+
additionalProperties?: PropType | ResolveTypeFn;
|
|
27
|
+
items?: PropType | ResolveTypeFn;
|
|
28
|
+
required?: string[] | ((value: any, key: string | number | undefined) => string[]);
|
|
29
|
+
requiredOneOf?: string[];
|
|
30
|
+
allowed?: (value: any) => string[] | undefined;
|
|
31
|
+
extensionsPrefix?: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
documentationLink?: string;
|
|
34
|
+
};
|
|
35
|
+
export type PropType = string | NodeType | ScalarSchema | undefined | null;
|
|
36
|
+
export type ResolveTypeFn = (value: any, key: string) => string | PropType;
|
|
37
|
+
export type NormalizedNodeType = {
|
|
38
|
+
name: string;
|
|
39
|
+
properties: Record<string, NormalizedPropType | NormalizedResolveTypeFn>;
|
|
40
|
+
additionalProperties?: NormalizedPropType | NormalizedResolveTypeFn;
|
|
41
|
+
items?: NormalizedPropType | NormalizedResolveTypeFn;
|
|
42
|
+
required?: string[] | ((value: any, key: string | number | undefined) => string[]);
|
|
43
|
+
requiredOneOf?: string[];
|
|
44
|
+
allowed?: (value: any) => string[] | undefined;
|
|
45
|
+
extensionsPrefix?: string;
|
|
46
|
+
directResolveAs?: NormalizedPropType;
|
|
47
|
+
description?: string;
|
|
48
|
+
documentationLink?: string;
|
|
49
|
+
};
|
|
50
|
+
type NormalizedPropType = NormalizedNodeType | NormalizedScalarSchema | null | undefined;
|
|
51
|
+
type NormalizedResolveTypeFn = (value: any, key: string) => NormalizedPropType;
|
|
52
|
+
export declare function listOf(typeName: string, opts?: {
|
|
53
|
+
description?: string;
|
|
54
|
+
documentationLink?: string;
|
|
55
|
+
}): {
|
|
56
|
+
description?: string;
|
|
57
|
+
documentationLink?: string;
|
|
58
|
+
name: string;
|
|
59
|
+
properties: {};
|
|
60
|
+
items: string;
|
|
61
|
+
};
|
|
62
|
+
export declare function mapOf(typeName: string, opts?: {
|
|
63
|
+
description?: string;
|
|
64
|
+
documentationLink?: string;
|
|
65
|
+
}): {
|
|
66
|
+
description?: string;
|
|
67
|
+
documentationLink?: string;
|
|
68
|
+
name: string;
|
|
69
|
+
properties: {};
|
|
70
|
+
additionalProperties: () => string;
|
|
71
|
+
};
|
|
72
|
+
export declare const SpecExtension: NormalizedNodeType;
|
|
73
|
+
export declare function normalizeTypes(types: Record<string, NodeType>, options?: {
|
|
74
|
+
doNotResolveExamples?: boolean;
|
|
75
|
+
}): Record<string, NormalizedNodeType>;
|
|
76
|
+
export declare function isNamedType(t: NormalizedPropType): t is NormalizedNodeType;
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;IACxE,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;IACxE,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,eAAe,CAAC,EAAE,kBAAkB,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,GAAG,aAAa,CAAC,CAAC;IACrD,oBAAoB,CAA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ts = {}) {
|
|
10
|
+
return {
|
|
11
|
+
name: `${typeName}Map`,
|
|
12
|
+
properties: {},
|
|
13
|
+
additionalProperties: () => typeName,
|
|
14
|
+
...opts,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export const SpecExtension = {
|
|
18
|
+
name: 'SpecExtension',
|
|
19
|
+
properties: {},
|
|
20
|
+
// skip validation of additional properties for unknown extensions
|
|
21
|
+
additionalProperties: { resolvable: true },
|
|
22
|
+
};
|
|
23
|
+
export function normalizeTypes(types, options = {}) {
|
|
24
|
+
const normalizedTypes = {};
|
|
25
|
+
for (const typeName of Object.keys(types)) {
|
|
26
|
+
normalizedTypes[typeName] = {
|
|
27
|
+
...types[typeName],
|
|
28
|
+
name: typeName,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
for (const type of Object.values(normalizedTypes)) {
|
|
32
|
+
normalizeType(type);
|
|
33
|
+
}
|
|
34
|
+
// all type trees have a SpecExtension type by default
|
|
35
|
+
normalizedTypes['SpecExtension'] = SpecExtension;
|
|
36
|
+
return normalizedTypes;
|
|
37
|
+
function normalizeType(type) {
|
|
38
|
+
if (type.additionalProperties) {
|
|
39
|
+
type.additionalProperties = resolveType(type.additionalProperties);
|
|
40
|
+
}
|
|
41
|
+
if (type.items) {
|
|
42
|
+
type.items = resolveType(type.items);
|
|
43
|
+
}
|
|
44
|
+
if (type.properties) {
|
|
45
|
+
const mappedProps = {};
|
|
46
|
+
for (const [propName, prop] of Object.entries(type.properties)) {
|
|
47
|
+
mappedProps[propName] = resolveType(prop);
|
|
48
|
+
if (options.doNotResolveExamples && prop && prop.isExample) {
|
|
49
|
+
mappedProps[propName] = {
|
|
50
|
+
...prop,
|
|
51
|
+
resolvable: false,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
type.properties = mappedProps;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// typings are painful here...
|
|
59
|
+
function resolveType(type) {
|
|
60
|
+
if (typeof type === 'string') {
|
|
61
|
+
if (!normalizedTypes[type]) {
|
|
62
|
+
throw new Error(`Unknown type name found: ${type}`);
|
|
63
|
+
}
|
|
64
|
+
return normalizedTypes[type];
|
|
65
|
+
}
|
|
66
|
+
else if (typeof type === 'function') {
|
|
67
|
+
return (value, key) => {
|
|
68
|
+
return resolveType(type(value, key));
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
else if (type && type.name) {
|
|
72
|
+
type = { ...type };
|
|
73
|
+
normalizeType(type);
|
|
74
|
+
return type;
|
|
75
|
+
}
|
|
76
|
+
else if (type && type.directResolveAs) {
|
|
77
|
+
return {
|
|
78
|
+
...type,
|
|
79
|
+
directResolveAs: resolveType(type.directResolveAs),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
return type;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export function isNamedType(t) {
|
|
88
|
+
return typeof t?.name === 'string';
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAwDA,MAAM,UAAU,MAAM,CACpB,QAAgB,EAChB,OAA6D,EAAE;IAE/D,OAAO;QACL,IAAI,EAAE,GAAG,QAAQ,MAAM;QACvB,UAAU,EAAE,EAAE;QACd,KAAK,EAAE,QAAQ;QACf,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,KAAK,CACnB,QAAgB,EAChB,OAA6D,EAAE;IAE/D,OAAO;QACL,IAAI,EAAE,GAAG,QAAQ,KAAK;QACtB,UAAU,EAAE,EAAE;QACd,oBAAoB,EAAE,GAAG,EAAE,CAAC,QAAQ;QACpC,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAuB;IAC/C,IAAI,EAAE,eAAe;IACrB,U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
+
import type { JSONSchema } from 'json-schema-to-ts';
|
|
2
|
+
import type { NodeType, ResolveTypeFn } from './index.js';
|
|
3
|
+
type ExtendedJSONSchema = JSONSchema & {
|
|
4
|
+
nodeTypeName?: string;
|
|
5
|
+
documentationLink?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function getNodeTypesFromJSONSchema(schemaName: string, entrySchema: ExtendedJSONSchema): {
|
|
8
|
+
ctx: Record<string, NodeType>;
|
|
9
|
+
discriminatorResolver?: ResolveTypeFn;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=json-schema-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema-adapter.d.ts","sourceRoot":"","sources":["../../src/types/json-schema-adapter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIpD,OAAO,KAAK,EAAE,QAAQ,EAAY,aAAa,EAAE,MAAM,YAAY,CAAC;AAEpE,KAAK,kBAAkB,GAAG,UAAU,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAwO7F,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,kBAAkB,GAC9B;IACD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC9B,qBAAqB,CAAC,EAAE,aAAa,CAAC;CACvC,CASA"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// For internal usage only
|
|
2
|
+
import Ajv from '@redocly/ajv/dist/2020.js';
|
|
3
|
+
import { isPlainObject } from '../utils/is-plain-object.js';
|
|
4
|
+
const ajv = new Ajv({
|
|
5
|
+
strictSchema: false,
|
|
6
|
+
allowUnionTypes: true,
|
|
7
|
+
useDefaults: true,
|
|
8
|
+
allErrors: true,
|
|
9
|
+
discriminator: true,
|
|
10
|
+
strictTypes: false,
|
|
11
|
+
verbose: true,
|
|
12
|
+
});
|
|
13
|
+
function findOneOf(schemaOneOf, oneOfs) {
|
|
14
|
+
if (oneOfs.some((option) => typeof option === 'function')) {
|
|
15
|
+
throw new Error('Unexpected oneOf inside oneOf.');
|
|
16
|
+
}
|
|
17
|
+
return (value) => {
|
|
18
|
+
let index = schemaOneOf.findIndex((option) => ajv.validate(option, value));
|
|
19
|
+
if (index === -1) {
|
|
20
|
+
index = 0;
|
|
21
|
+
}
|
|
22
|
+
return oneOfs[index];
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function transformJSONSchemaToNodeType(propertyName, schema, ctx) {
|
|
26
|
+
if (!schema || typeof schema === 'boolean') {
|
|
27
|
+
throw new Error(`Unexpected schema in ${propertyName}.`);
|
|
28
|
+
}
|
|
29
|
+
if (schema instanceof Array) {
|
|
30
|
+
throw new Error(`Unexpected array schema in ${propertyName}. Try using oneOf instead.`);
|
|
31
|
+
}
|
|
32
|
+
if (schema.type === 'null') {
|
|
33
|
+
throw new Error(`Unexpected null schema type in ${propertyName} schema.`);
|
|
34
|
+
}
|
|
35
|
+
if (schema.type instanceof Array) {
|
|
36
|
+
throw new Error(`Unexpected array schema type in ${propertyName} schema. Try using oneOf instead.`);
|
|
37
|
+
}
|
|
38
|
+
if (schema.type === 'string' ||
|
|
39
|
+
schema.type === 'number' ||
|
|
40
|
+
schema.type === 'integer' ||
|
|
41
|
+
schema.type === 'boolean') {
|
|
42
|
+
const { default: _, format: _format, ...rest } = schema;
|
|
43
|
+
return rest;
|
|
44
|
+
}
|
|
45
|
+
if (schema.type === 'object' && !schema.properties && !schema.oneOf) {
|
|
46
|
+
if (schema.additionalProperties === undefined || schema.additionalProperties === true) {
|
|
47
|
+
return { type: 'object' };
|
|
48
|
+
}
|
|
49
|
+
else if (schema.additionalProperties === false) {
|
|
50
|
+
return { type: 'object', properties: {} };
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (schema.allOf) {
|
|
54
|
+
throw new Error(`Unexpected allOf in ${propertyName}.`);
|
|
55
|
+
}
|
|
56
|
+
if (schema.anyOf) {
|
|
57
|
+
throw new Error(`Unexpected anyOf in ${propertyName}.`);
|
|
58
|
+
}
|
|
59
|
+
if (isPlainObject(schema.properties) ||
|
|
60
|
+
isPlainObject(schema.additionalProperties) ||
|
|
61
|
+
(isPlainObject(schema.items) &&
|
|
62
|
+
(isPlainObject(schema.items.properties) ||
|
|
63
|
+
isPlainObject(schema.items.additionalProperties) ||
|
|
64
|
+
schema.items.oneOf)) // exclude scalar array types
|
|
65
|
+
) {
|
|
66
|
+
return extractNodeToContext(propertyName, schema, ctx);
|
|
67
|
+
}
|
|
68
|
+
if (schema.oneOf) {
|
|
69
|
+
if (schema.discriminator) {
|
|
70
|
+
const discriminatedPropertyName = schema.discriminator?.propertyName;
|
|
71
|
+
if (!discriminatedPropertyName) {
|
|
72
|
+
throw new Error(`Unexpected discriminator without a propertyName in ${propertyName}.`);
|
|
73
|
+
}
|
|
74
|
+
// Map discriminator values to their actual type names
|
|
75
|
+
const discriminatorMapping = {};
|
|
76
|
+
const oneOfs = schema.oneOf.map((option, i) => {
|
|
77
|
+
if (typeof option === 'boolean') {
|
|
78
|
+
throw new Error(`Unexpected boolean schema in ${propertyName} at position ${i} in oneOf.`);
|
|
79
|
+
}
|
|
80
|
+
const discriminatedProperty = option?.properties?.[discriminatedPropertyName];
|
|
81
|
+
if (!discriminatedProperty || typeof discriminatedProperty === 'boolean') {
|
|
82
|
+
throw new Error(`Unexpected property '${discriminatedProperty}' schema in ${propertyName} at position ${i} in oneOf.`);
|
|
83
|
+
}
|
|
84
|
+
const discriminatorValue = discriminatedProperty.const;
|
|
85
|
+
const actualTypeName = transformJSONSchemaToNodeType(discriminatorValue, option, ctx);
|
|
86
|
+
// Store mapping from discriminator value to actual type name
|
|
87
|
+
if (typeof actualTypeName === 'string') {
|
|
88
|
+
discriminatorMapping[discriminatorValue] = actualTypeName;
|
|
89
|
+
}
|
|
90
|
+
return actualTypeName;
|
|
91
|
+
});
|
|
92
|
+
//TODO: investigate why this function doesn't invoke inside the current function scope
|
|
93
|
+
return (value, key) => {
|
|
94
|
+
if (isPlainObject(value)) {
|
|
95
|
+
const discriminatedTypeName = value[discriminatedPropertyName];
|
|
96
|
+
if (typeof discriminatedTypeName === 'string') {
|
|
97
|
+
const actualTypeName = discriminatorMapping[discriminatedTypeName];
|
|
98
|
+
if (actualTypeName && ctx[actualTypeName]) {
|
|
99
|
+
return actualTypeName;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return findOneOf(schema.oneOf, oneOfs)(value, key);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
const oneOfs = schema.oneOf.map((option, i) => transformJSONSchemaToNodeType(propertyName + '_' + i, option, ctx));
|
|
108
|
+
return findOneOf(schema.oneOf, oneOfs);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return schema;
|
|
112
|
+
}
|
|
113
|
+
function extractNodeToContext(propertyName, schema, ctx) {
|
|
114
|
+
if (!schema || typeof schema === 'boolean') {
|
|
115
|
+
throw new Error(`Unexpected schema in ${propertyName}.`);
|
|
116
|
+
}
|
|
117
|
+
if (schema instanceof Array) {
|
|
118
|
+
throw new Error(`Unexpected array schema in ${propertyName}. Try using oneOf instead.`);
|
|
119
|
+
}
|
|
120
|
+
if (schema.type === 'null') {
|
|
121
|
+
throw new Error(`Unexpected null schema type in ${propertyName} schema.`);
|
|
122
|
+
}
|
|
123
|
+
if (schema.type instanceof Array) {
|
|
124
|
+
throw new Error(`Unexpected array schema type in ${propertyName} schema. Try using oneOf instead.`);
|
|
125
|
+
}
|
|
126
|
+
// Use nodeTypeName from schema if provided, otherwise use propertyName
|
|
127
|
+
const nodeTypeName = schema.nodeTypeName ?? propertyName;
|
|
128
|
+
const properties = {};
|
|
129
|
+
for (const [name, property] of Object.entries(schema.properties || {})) {
|
|
130
|
+
properties[name] = transformJSONSchemaToNodeType(nodeTypeName + '.' + name, property, ctx);
|
|
131
|
+
}
|
|
132
|
+
let additionalProperties;
|
|
133
|
+
if (isPlainObject(schema.additionalProperties)) {
|
|
134
|
+
additionalProperties = transformJSONSchemaToNodeType(propertyName + '_additionalProperties', schema.additionalProperties, ctx);
|
|
135
|
+
}
|
|
136
|
+
if (schema.additionalProperties === true) {
|
|
137
|
+
additionalProperties = {};
|
|
138
|
+
}
|
|
139
|
+
let items;
|
|
140
|
+
if (isPlainObject(schema.items) &&
|
|
141
|
+
(isPlainObject(schema.items.properties) ||
|
|
142
|
+
isPlainObject(schema.items.additionalProperties) ||
|
|
143
|
+
schema.items.oneOf) // exclude scalar array types
|
|
144
|
+
) {
|
|
145
|
+
items = transformJSONSchemaToNodeType(propertyName + '_items', schema.items, ctx);
|
|
146
|
+
}
|
|
147
|
+
let required = schema.required;
|
|
148
|
+
// Translate required in oneOfs into a ResolveTypeFn.
|
|
149
|
+
if (schema.oneOf && schema.oneOf.every((option) => !!option.required)) {
|
|
150
|
+
required = (value) => {
|
|
151
|
+
const requiredList = schema.oneOf.map((option) => [
|
|
152
|
+
...(schema.required || []),
|
|
153
|
+
...option.required,
|
|
154
|
+
]);
|
|
155
|
+
let index = requiredList.findIndex((r) => r.every((requiredProp) => value[requiredProp] !== undefined));
|
|
156
|
+
if (index === -1) {
|
|
157
|
+
index = 0;
|
|
158
|
+
}
|
|
159
|
+
return requiredList[index];
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
ctx[nodeTypeName] = {
|
|
163
|
+
properties,
|
|
164
|
+
additionalProperties,
|
|
165
|
+
items,
|
|
166
|
+
required,
|
|
167
|
+
description: schema.description,
|
|
168
|
+
documentationLink: schema.documentationLink,
|
|
169
|
+
};
|
|
170
|
+
return nodeTypeName;
|
|
171
|
+
}
|
|
172
|
+
export function getNodeTypesFromJSONSchema(schemaName, entrySchema) {
|
|
173
|
+
const ctx = {};
|
|
174
|
+
//TODO: fix this function to return discriminator resolvers in all NodeTypes that are returned in ctx. Currently it only only returns one discriminatorResolver for all types.
|
|
175
|
+
const discriminatorResolver = transformJSONSchemaToNodeType(schemaName, entrySchema, ctx);
|
|
176
|
+
return {
|
|
177
|
+
ctx,
|
|
178
|
+
discriminatorResolver: typeof discriminatorResolver === 'function' ? discriminatorResolver : undefined,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=json-schema-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema-adapter.js","sourceRoot":"","sources":["../../src/types/json-schema-adapter.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,OAAO,GAAG,MAAM,2BAA2B,CAAC;AAI5C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAK5D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC;IAClB,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,IAAI;IACrB,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,IAAI;CACd,CAAC,CAAC;AAEH,SAAS,SAAS,CAChB,WAAiC,EACjC,MAAoC;IAEpC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,MAAM,KAAK,UAAU,CAAC,EAAE,CAAC;QAC1D,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,CAAC,KAAc,EAAE,EAAE;QACxB,IAAI,KAAK,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;QAC3E,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YACjB,KAAK,GAAG,CAAC,CAAC;QACZ,CAAC;QACD,OAAO,MAAM,C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AAC,EAAE,EAAE,CACvC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,SAAS,CAAC,CAC7D,CAAC;YACF,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;gBACjB,KAAK,GAAG,CAAC,CAAC;YACZ,CAAC;YAED,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,YAAY,CAAC,GAAG;QAClB,UAAU;QACV,oBAAoB;QACpB,KAAK;QACL,QAAQ;QACR,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;KAC5C,CAAC;IACF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,UAAkB,EAClB,WAA+B;IAK/B,MAAM,GAAG,GAA6B,EAAE,CAAC;IACzC,8KAA8K;IAC9K,MAAM,qBAAqB,GAAG,6BAA6B,CAAC,UAAU,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;IAC1F,OAAO;QACL,GAAG;QACH,qBAAqB,EACnB,OAAO,qBAAqB,KAAK,UAAU,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS;KAClF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type NodeType } from './index.js';
|
|
2
|
+
export declare const Schema: NodeType;
|
|
3
|
+
export declare const SchemaProperties: NodeType;
|
|
4
|
+
export declare const Dependencies: NodeType;
|
|
5
|
+
export declare const DiscriminatorMapping: NodeType;
|
|
6
|
+
export declare const Discriminator: NodeType;
|
|
7
|
+
//# sourceMappingURL=json-schema-draft7.shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema-draft7.shared.d.ts","sourceRoot":"","sources":["../../src/types/json-schema-draft7.shared.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEnD,eAAO,MAAM,MAAM,EAAE,QAmEpB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,QAK9B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAK1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAM3B,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { isMappingRef } from '../ref-utils.js';
|
|
2
|
+
import { listOf } from './index.js';
|
|
3
|
+
export const Schema = {
|
|
4
|
+
properties: {
|
|
5
|
+
$id: { type: 'string' },
|
|
6
|
+
$schema: { type: 'string' },
|
|
7
|
+
definitions: 'NamedSchemas',
|
|
8
|
+
externalDocs: 'ExternalDocs',
|
|
9
|
+
discriminator: 'Discriminator',
|
|
10
|
+
title: { type: 'string' },
|
|
11
|
+
multipleOf: { type: 'number', minimum: 0 },
|
|
12
|
+
maximum: { type: 'number' },
|
|
13
|
+
minimum: { type: 'number' },
|
|
14
|
+
exclusiveMaximum: { type: 'number' },
|
|
15
|
+
exclusiveMinimum: { type: 'number' },
|
|
16
|
+
maxLength: { type: 'integer', minimum: 0 },
|
|
17
|
+
minLength: { type: 'integer', minimum: 0 },
|
|
18
|
+
pattern: { type: 'string' },
|
|
19
|
+
maxItems: { type: 'integer', minimum: 0 },
|
|
20
|
+
minItems: { type: 'integer', minimum: 0 },
|
|
21
|
+
uniqueItems: { type: 'boolean' },
|
|
22
|
+
maxProperties: { type: 'integer', minimum: 0 },
|
|
23
|
+
minProperties: { type: 'integer', minimum: 0 },
|
|
24
|
+
required: { type: 'array', items: { type: 'string' } },
|
|
25
|
+
enum: { type: 'array' },
|
|
26
|
+
type: (value) => {
|
|
27
|
+
return Array.isArray(value)
|
|
28
|
+
? {
|
|
29
|
+
type: 'array',
|
|
30
|
+
items: { enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'] },
|
|
31
|
+
}
|
|
32
|
+
: {
|
|
33
|
+
enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'],
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
allOf: listOf('Schema'),
|
|
37
|
+
anyOf: listOf('Schema'),
|
|
38
|
+
oneOf: listOf('Schema'),
|
|
39
|
+
not: 'Schema',
|
|
40
|
+
if: 'Schema',
|
|
41
|
+
then: 'Schema',
|
|
42
|
+
else: 'Schema',
|
|
43
|
+
contains: 'Schema',
|
|
44
|
+
patternProperties: { type: 'object' },
|
|
45
|
+
propertyNames: 'Schema',
|
|
46
|
+
properties: 'SchemaProperties',
|
|
47
|
+
items: (value) => {
|
|
48
|
+
return Array.isArray(value) ? listOf('Schema') : 'Schema';
|
|
49
|
+
},
|
|
50
|
+
additionalProperties: (value) => {
|
|
51
|
+
return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema';
|
|
52
|
+
},
|
|
53
|
+
description: { type: 'string' },
|
|
54
|
+
format: { type: 'string' },
|
|
55
|
+
contentEncoding: { type: 'string' },
|
|
56
|
+
contentMediaType: { type: 'string' },
|
|
57
|
+
default: null,
|
|
58
|
+
readOnly: { type: 'boolean' },
|
|
59
|
+
writeOnly: { type: 'boolean' },
|
|
60
|
+
examples: { type: 'array' },
|
|
61
|
+
example: { isExample: true },
|
|
62
|
+
deprecated: { type: 'boolean' },
|
|
63
|
+
const: null,
|
|
64
|
+
$comment: { type: 'string' },
|
|
65
|
+
additionalItems: (value) => {
|
|
66
|
+
return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema';
|
|
67
|
+
},
|
|
68
|
+
dependencies: 'Dependencies',
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
export const SchemaProperties = {
|
|
72
|
+
properties: {},
|
|
73
|
+
additionalProperties: (value) => {
|
|
74
|
+
return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema';
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
export const Dependencies = {
|
|
78
|
+
properties: {},
|
|
79
|
+
additionalProperties: (value) => {
|
|
80
|
+
return Array.isArray(value) ? { type: 'array', items: { type: 'string' } } : 'Schema';
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
export const DiscriminatorMapping = {
|
|
84
|
+
properties: {},
|
|
85
|
+
additionalProperties: (value) => {
|
|
86
|
+
if (isMappingRef(value)) {
|
|
87
|
+
return { type: 'string', directResolveAs: 'Schema' };
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
return { type: 'string' };
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
export const Discriminator = {
|
|
95
|
+
properties: {
|
|
96
|
+
propertyName: { type: 'string' },
|
|
97
|
+
mapping: 'DiscriminatorMapping',
|
|
98
|
+
},
|
|
99
|
+
required: ['propertyName'],
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=json-schema-draft7.shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema-draft7.shared.js","sourceRoot":"","sources":["../../src/types/json-schema-draft7.shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAiB,MAAM,YAAY,CAAC;AAEnD,MAAM,CAAC,MAAM,MAAM,GAAa;IAC9B,UAAU,EAAE;QACV,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACvB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,WAAW,EAAE,cAAc;QAC3B,YAAY,EAAE,cAAc;QAC5B,aAAa,EAAE,eAAe;QAC9B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzB,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;QAC1C,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3B,OAAO,EAAE,E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,EAAE;QAChC,OAAO,EAAE,sBAAsB;KAChC;IACD,QAAQ,EAAE,CAAC,cAAc,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { type NodeType } from './index.js';
|
|
2
|
+
export declare const Oas2Types: {
|
|
3
|
+
readonly Root: NodeType;
|
|
4
|
+
readonly Tag: NodeType;
|
|
5
|
+
readonly TagList: {
|
|
6
|
+
description?: string;
|
|
7
|
+
documentationLink?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
properties: {};
|
|
10
|
+
items: string;
|
|
11
|
+
};
|
|
12
|
+
readonly TagGroups: {
|
|
13
|
+
description?: string;
|
|
14
|
+
documentationLink?: string;
|
|
15
|
+
name: string;
|
|
16
|
+
properties: {};
|
|
17
|
+
items: string;
|
|
18
|
+
};
|
|
19
|
+
readonly TagGroup: NodeType;
|
|
20
|
+
readonly ExternalDocs: NodeType;
|
|
21
|
+
readonly Example: NodeType;
|
|
22
|
+
readonly ExamplesMap: {
|
|
23
|
+
description?: string;
|
|
24
|
+
documentationLink?: string;
|
|
25
|
+
name: string;
|
|
26
|
+
properties: {};
|
|
27
|
+
additionalProperties: () => string;
|
|
28
|
+
};
|
|
29
|
+
readonly EnumDescriptions: NodeType;
|
|
30
|
+
readonly SecurityRequirement: NodeType;
|
|
31
|
+
readonly SecurityRequirementList: {
|
|
32
|
+
description?: string;
|
|
33
|
+
documentationLink?: string;
|
|
34
|
+
name: string;
|
|
35
|
+
properties: {};
|
|
36
|
+
items: string;
|
|
37
|
+
};
|
|
38
|
+
readonly Info: NodeType;
|
|
39
|
+
readonly Contact: NodeType;
|
|
40
|
+
readonly License: NodeType;
|
|
41
|
+
readonly Logo: NodeType;
|
|
42
|
+
readonly Paths: NodeType;
|
|
43
|
+
readonly PathItem: NodeType;
|
|
44
|
+
readonly Parameter: NodeType;
|
|
45
|
+
readonly ParameterItems: NodeType;
|
|
46
|
+
readonly ParameterList: {
|
|
47
|
+
description?: string;
|
|
48
|
+
documentationLink?: string;
|
|
49
|
+
name: string;
|
|
50
|
+
properties: {};
|
|
51
|
+
items: string;
|
|
52
|
+
};
|
|
53
|
+
readonly Operation: NodeType;
|
|
54
|
+
readonly Examples: NodeType;
|
|
55
|
+
readonly Header: NodeType;
|
|
56
|
+
readonly Responses: NodeType;
|
|
57
|
+
readonly Response: NodeType;
|
|
58
|
+
readonly Schema: NodeType;
|
|
59
|
+
readonly Xml: NodeType;
|
|
60
|
+
readonly SchemaProperties: NodeType;
|
|
61
|
+
readonly NamedSchemas: {
|
|
62
|
+
description?: string;
|
|
63
|
+
documentationLink?: string;
|
|
64
|
+
name: string;
|
|
65
|
+
properties: {};
|
|
66
|
+
additionalProperties: () => string;
|
|
67
|
+
};
|
|
68
|
+
readonly NamedResponses: {
|
|
69
|
+
description?: string;
|
|
70
|
+
documentationLink?: string;
|
|
71
|
+
name: string;
|
|
72
|
+
properties: {};
|
|
73
|
+
additionalProperties: () => string;
|
|
74
|
+
};
|
|
75
|
+
readonly NamedParameters: {
|
|
76
|
+
description?: string;
|
|
77
|
+
documentationLink?: string;
|
|
78
|
+
name: string;
|
|
79
|
+
properties: {};
|
|
80
|
+
additionalProperties: () => string;
|
|
81
|
+
};
|
|
82
|
+
readonly NamedSecuritySchemes: {
|
|
83
|
+
description?: string;
|
|
84
|
+
documentationLink?: string;
|
|
85
|
+
name: string;
|
|
86
|
+
properties: {};
|
|
87
|
+
additionalProperties: () => string;
|
|
88
|
+
};
|
|
89
|
+
readonly SecurityScheme: NodeType;
|
|
90
|
+
readonly XCodeSample: NodeType;
|
|
91
|
+
readonly XCodeSampleList: {
|
|
92
|
+
description?: string;
|
|
93
|
+
documentationLink?: string;
|
|
94
|
+
name: string;
|
|
95
|
+
properties: {};
|
|
96
|
+
items: string;
|
|
97
|
+
};
|
|
98
|
+
readonly XServerList: {
|
|
99
|
+
description?: string;
|
|
100
|
+
documentationLink?: string;
|
|
101
|
+
name: string;
|
|
102
|
+
properties: {};
|
|
103
|
+
items: string;
|
|
104
|
+
};
|
|
105
|
+
readonly XServer: NodeType;
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=oas2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oas2.d.ts","sourceRoot":"","sources":["../../src/types/oas2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAub1D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCZ,CAAC"}
|