@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,335 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import module from 'node:module';
|
|
3
|
+
import * as path from 'node:path';
|
|
4
|
+
import * as url from 'node:url';
|
|
5
|
+
import { bundleConfig, collectConfigPlugins } from '../bundle/bundle.js';
|
|
6
|
+
import { isBrowser } from '../env.js';
|
|
7
|
+
import { colorize, logger } from '../logger.js';
|
|
8
|
+
import { isAbsoluteUrl } from '../ref-utils.js';
|
|
9
|
+
import { resolveDocument, BaseResolver, Source } from '../resolve.js';
|
|
10
|
+
import { NormalizedConfigTypes } from '../types/redocly-yaml.js';
|
|
11
|
+
import { isDefined } from '../utils/is-defined.js';
|
|
12
|
+
import { isNotString } from '../utils/is-not-string.js';
|
|
13
|
+
import { isPlainObject } from '../utils/is-plain-object.js';
|
|
14
|
+
import { isString } from '../utils/is-string.js';
|
|
15
|
+
import { defaultPlugin } from './builtIn.js';
|
|
16
|
+
import { CONFIG_FILE_NAME, DEFAULT_CONFIG, DEFAULT_PROJECT_PLUGIN_PATHS } from './constants.js';
|
|
17
|
+
import { getResolveConfig } from './get-resolve-config.js';
|
|
18
|
+
import { deepCloneMapWithJSON, isCommonJsPlugin, isDeprecatedPluginFormat, mergeExtends, parsePresetName, prefixRules, } from './utils.js';
|
|
19
|
+
// Cache instantiated plugins during a single execution
|
|
20
|
+
const pluginsCache = new Map();
|
|
21
|
+
export async function resolveConfig({ rawConfigDocument, configPath, externalRefResolver, customExtends, }) {
|
|
22
|
+
const config = rawConfigDocument === undefined ? DEFAULT_CONFIG : rawConfigDocument.parsed;
|
|
23
|
+
if (customExtends !== undefined && isPlainObject(config)) {
|
|
24
|
+
config.extends = customExtends;
|
|
25
|
+
}
|
|
26
|
+
if (isPlainObject(config) && config?.extends?.some(isNotString)) {
|
|
27
|
+
throw new Error(`Configuration format not detected in extends: values must be strings.`);
|
|
28
|
+
}
|
|
29
|
+
const rootDocument = rawConfigDocument ?? {
|
|
30
|
+
source: new Source(configPath ?? '', JSON.stringify(config)),
|
|
31
|
+
parsed: config,
|
|
32
|
+
};
|
|
33
|
+
const resolvedRefMap = await resolveDocument({
|
|
34
|
+
rootDocument,
|
|
35
|
+
rootType: NormalizedConfigTypes.ConfigRoot,
|
|
36
|
+
externalRefResolver: externalRefResolver ??
|
|
37
|
+
new BaseResolver(getResolveConfig(config?.resolve)),
|
|
38
|
+
});
|
|
39
|
+
let pluginsOrPaths = [];
|
|
40
|
+
let resolvedPlugins;
|
|
41
|
+
let rootConfigDir = '';
|
|
42
|
+
if (isBrowser) {
|
|
43
|
+
// In browser, we don't support plugins from config file yet
|
|
44
|
+
const instantiatedPlugins = (config?.plugins || []).filter((p) => !isString(p));
|
|
45
|
+
resolvedPlugins = [...instantiatedPlugins, defaultPlugin];
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
rootConfigDir = path.dirname(configPath ?? '');
|
|
49
|
+
pluginsOrPaths = collectConfigPlugins(rootDocument, resolvedRefMap, rootConfigDir);
|
|
50
|
+
const plugins = await resolvePlugins(pluginsOrPaths.map((p) => (isPluginResolveInfo(p) ? p.absolutePath : p)), rootConfigDir);
|
|
51
|
+
resolvedPlugins = [...plugins, defaultPlugin];
|
|
52
|
+
}
|
|
53
|
+
const bundledConfig = bundleConfig(rootDocument, deepCloneMapWithJSON(resolvedRefMap), resolvedPlugins);
|
|
54
|
+
if (bundledConfig.apis) {
|
|
55
|
+
bundledConfig.apis = Object.fromEntries(Object.entries(bundledConfig.apis).map(([key, apiConfig]) => {
|
|
56
|
+
const mergedConfig = mergeExtends([bundledConfig, apiConfig]);
|
|
57
|
+
return [key, { ...apiConfig, ...mergedConfig }];
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
const pluginPaths = pluginsOrPaths.length
|
|
61
|
+
? pluginsOrPaths
|
|
62
|
+
.map((p) => isPluginResolveInfo(p) && p.isModule
|
|
63
|
+
? p.rawPath
|
|
64
|
+
: p.absolutePath && path.relative(rootConfigDir, p.absolutePath))
|
|
65
|
+
.filter(isDefined)
|
|
66
|
+
: undefined;
|
|
67
|
+
return {
|
|
68
|
+
resolvedConfig: {
|
|
69
|
+
...bundledConfig,
|
|
70
|
+
plugins: pluginPaths,
|
|
71
|
+
},
|
|
72
|
+
resolvedRefMap,
|
|
73
|
+
plugins: resolvedPlugins,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function getDefaultPluginPath(configDir) {
|
|
77
|
+
for (const pluginPath of DEFAULT_PROJECT_PLUGIN_PATHS) {
|
|
78
|
+
const absolutePluginPath = path.resolve(configDir, pluginPath);
|
|
79
|
+
if (fs.existsSync(absolutePluginPath)) {
|
|
80
|
+
return pluginPath;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
function isPluginResolveInfo(plugin) {
|
|
86
|
+
return 'isModule' in plugin;
|
|
87
|
+
}
|
|
88
|
+
export const preResolvePluginPath = (plugin, base, rootConfigDir) => {
|
|
89
|
+
if (!isString(plugin)) {
|
|
90
|
+
return plugin;
|
|
91
|
+
}
|
|
92
|
+
const maybeAbsolutePluginPath = path.resolve(path.dirname(base), plugin);
|
|
93
|
+
return fs.existsSync(maybeAbsolutePluginPath)
|
|
94
|
+
? { absolutePath: maybeAbsolutePluginPath, rawPath: plugin, isModule: false }
|
|
95
|
+
: {
|
|
96
|
+
absolutePath: module.createRequire(import.meta.url ?? __dirname).resolve(plugin, {
|
|
97
|
+
paths: [
|
|
98
|
+
// Plugins imported from the node_modules in the project directory
|
|
99
|
+
rootConfigDir,
|
|
100
|
+
// Plugins imported from the node_modules in the package install directory (for example, npx cache directory)
|
|
101
|
+
import.meta.url ? path.dirname(url.fileURLToPath(import.meta.url)) : __dirname,
|
|
102
|
+
],
|
|
103
|
+
}),
|
|
104
|
+
isModule: true,
|
|
105
|
+
rawPath: plugin,
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
export async function resolvePlugins(plugins, configDir) {
|
|
109
|
+
if (!plugins)
|
|
110
|
+
return [];
|
|
111
|
+
// TODO: implement or reuse Resolver approach so it will work in node and browser envs
|
|
112
|
+
const requireFunc = async (plugin) => {
|
|
113
|
+
if (!isString(plugin)) {
|
|
114
|
+
return plugin;
|
|
115
|
+
}
|
|
116
|
+
try {
|
|
117
|
+
const absolutePluginPath = path.isAbsolute(plugin)
|
|
118
|
+
? plugin
|
|
119
|
+
: preResolvePluginPath(plugin, path.join(configDir, CONFIG_FILE_NAME), configDir).absolutePath;
|
|
120
|
+
if (!pluginsCache.has(absolutePluginPath)) {
|
|
121
|
+
let requiredPlugin;
|
|
122
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
123
|
+
// @ts-ignore FIXME: investigate if we still need this (2.0)
|
|
124
|
+
if (typeof __webpack_require__ === 'function') {
|
|
125
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
126
|
+
// @ts-ignore FIXME: investigate if we still need this (2.0)
|
|
127
|
+
requiredPlugin = __non_webpack_require__(absolutePluginPath);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
const mod = await import(url.pathToFileURL(absolutePluginPath).pathname);
|
|
131
|
+
requiredPlugin = mod.default || mod;
|
|
132
|
+
}
|
|
133
|
+
const pluginCreatorOptions = { contentDir: configDir };
|
|
134
|
+
const requiredPluginInstances = Array.isArray(requiredPlugin)
|
|
135
|
+
? requiredPlugin
|
|
136
|
+
: [requiredPlugin];
|
|
137
|
+
for (const requiredPluginInstance of requiredPluginInstances) {
|
|
138
|
+
if (requiredPluginInstance?.id && isDeprecatedPluginFormat(requiredPluginInstance)) {
|
|
139
|
+
logger.info(`Deprecated plugin format detected: ${requiredPluginInstance.id}\n`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const pluginModule = isDeprecatedPluginFormat(requiredPlugin)
|
|
143
|
+
? requiredPlugin
|
|
144
|
+
: isCommonJsPlugin(requiredPlugin)
|
|
145
|
+
? await requiredPlugin(pluginCreatorOptions)
|
|
146
|
+
: await requiredPlugin?.default?.(pluginCreatorOptions);
|
|
147
|
+
const pluginInstances = Array.isArray(pluginModule) ? pluginModule : [pluginModule];
|
|
148
|
+
if (pluginModule) {
|
|
149
|
+
pluginsCache.set(absolutePluginPath, pluginInstances.map((p) => ({
|
|
150
|
+
...p,
|
|
151
|
+
path: plugin,
|
|
152
|
+
absolutePath: absolutePluginPath,
|
|
153
|
+
})));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return pluginsCache.get(absolutePluginPath);
|
|
157
|
+
}
|
|
158
|
+
catch (e) {
|
|
159
|
+
throw new Error(`Failed to load plugin "${plugin}": ${e.message}\n\n${e.stack}`);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
const seenPluginIds = new Map();
|
|
163
|
+
/**
|
|
164
|
+
* Include the default plugin automatically if it's not in configuration
|
|
165
|
+
*/
|
|
166
|
+
const defaultPluginPath = getDefaultPluginPath(configDir);
|
|
167
|
+
if (defaultPluginPath) {
|
|
168
|
+
plugins.push(defaultPluginPath);
|
|
169
|
+
}
|
|
170
|
+
const resolvedPlugins = new Set();
|
|
171
|
+
const instances = await Promise.all(plugins.map(async (p) => {
|
|
172
|
+
if (isString(p)) {
|
|
173
|
+
if (isAbsoluteUrl(p)) {
|
|
174
|
+
throw new Error(colorize.red(`We don't support remote plugins yet.`));
|
|
175
|
+
}
|
|
176
|
+
if (resolvedPlugins.has(p)) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
resolvedPlugins.add(p);
|
|
180
|
+
}
|
|
181
|
+
const pluginInstanceOrInstances = await requireFunc(p);
|
|
182
|
+
if (!pluginInstanceOrInstances) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const pluginInstances = Array.isArray(pluginInstanceOrInstances)
|
|
186
|
+
? pluginInstanceOrInstances
|
|
187
|
+
: [pluginInstanceOrInstances];
|
|
188
|
+
return (await Promise.all(pluginInstances.map(async (pluginInstance) => {
|
|
189
|
+
if (!pluginInstance)
|
|
190
|
+
return;
|
|
191
|
+
const id = pluginInstance.id;
|
|
192
|
+
if (typeof id !== 'string') {
|
|
193
|
+
throw new Error(colorize.red(`Plugin must define \`id\` property in ${colorize.blue(p.toString())}.`));
|
|
194
|
+
}
|
|
195
|
+
const pluginPath = pluginInstance.absolutePath ?? p.toString();
|
|
196
|
+
const existingPluginPath = seenPluginIds.get(id);
|
|
197
|
+
if (existingPluginPath) {
|
|
198
|
+
if (pluginPath !== existingPluginPath) {
|
|
199
|
+
throw new Error(colorize.red(`Plugin "id" must be unique. Plugin ${colorize.blue(pluginPath)} uses id "${colorize.blue(id)}" already seen in ${colorize.blue(pluginPath)}`));
|
|
200
|
+
}
|
|
201
|
+
return undefined;
|
|
202
|
+
}
|
|
203
|
+
seenPluginIds.set(id, pluginPath);
|
|
204
|
+
const plugin = {
|
|
205
|
+
id,
|
|
206
|
+
...(pluginInstance.configs ? { configs: pluginInstance.configs } : {}),
|
|
207
|
+
...(pluginInstance.typeExtension
|
|
208
|
+
? { typeExtension: pluginInstance.typeExtension }
|
|
209
|
+
: {}),
|
|
210
|
+
};
|
|
211
|
+
if (pluginInstance.rules) {
|
|
212
|
+
if (!pluginInstance.rules.oas3 &&
|
|
213
|
+
!pluginInstance.rules.oas2 &&
|
|
214
|
+
!pluginInstance.rules.async2 &&
|
|
215
|
+
!pluginInstance.rules.async3 &&
|
|
216
|
+
!pluginInstance.rules.arazzo1 &&
|
|
217
|
+
!pluginInstance.rules.overlay1 &&
|
|
218
|
+
!pluginInstance.rules.openrpc1) {
|
|
219
|
+
throw new Error(`Plugin rules must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo\`, \`overlay1\`, or \`openrpc1\` rules "${p}.`);
|
|
220
|
+
}
|
|
221
|
+
plugin.rules = {};
|
|
222
|
+
if (pluginInstance.rules.oas3) {
|
|
223
|
+
plugin.rules.oas3 = prefixRules(pluginInstance.rules.oas3, id);
|
|
224
|
+
}
|
|
225
|
+
if (pluginInstance.rules.oas2) {
|
|
226
|
+
plugin.rules.oas2 = prefixRules(pluginInstance.rules.oas2, id);
|
|
227
|
+
}
|
|
228
|
+
if (pluginInstance.rules.async2) {
|
|
229
|
+
plugin.rules.async2 = prefixRules(pluginInstance.rules.async2, id);
|
|
230
|
+
}
|
|
231
|
+
if (pluginInstance.rules.async3) {
|
|
232
|
+
plugin.rules.async3 = prefixRules(pluginInstance.rules.async3, id);
|
|
233
|
+
}
|
|
234
|
+
if (pluginInstance.rules.arazzo1) {
|
|
235
|
+
plugin.rules.arazzo1 = prefixRules(pluginInstance.rules.arazzo1, id);
|
|
236
|
+
}
|
|
237
|
+
if (pluginInstance.rules.overlay1) {
|
|
238
|
+
plugin.rules.overlay1 = prefixRules(pluginInstance.rules.overlay1, id);
|
|
239
|
+
}
|
|
240
|
+
if (pluginInstance.rules.openrpc1) {
|
|
241
|
+
plugin.rules.openrpc1 = prefixRules(pluginInstance.rules.openrpc1, id);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (pluginInstance.preprocessors) {
|
|
245
|
+
if (!pluginInstance.preprocessors.oas3 &&
|
|
246
|
+
!pluginInstance.preprocessors.oas2 &&
|
|
247
|
+
!pluginInstance.preprocessors.async2 &&
|
|
248
|
+
!pluginInstance.preprocessors.async3 &&
|
|
249
|
+
!pluginInstance.preprocessors.arazzo1 &&
|
|
250
|
+
!pluginInstance.preprocessors.overlay1 &&
|
|
251
|
+
!pluginInstance.preprocessors.openrpc1) {
|
|
252
|
+
throw new Error(`Plugin \`preprocessors\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, \`overlay1\`, or \`openrpc1\` preprocessors "${p}.`);
|
|
253
|
+
}
|
|
254
|
+
plugin.preprocessors = {};
|
|
255
|
+
if (pluginInstance.preprocessors.oas3) {
|
|
256
|
+
plugin.preprocessors.oas3 = prefixRules(pluginInstance.preprocessors.oas3, id);
|
|
257
|
+
}
|
|
258
|
+
if (pluginInstance.preprocessors.oas2) {
|
|
259
|
+
plugin.preprocessors.oas2 = prefixRules(pluginInstance.preprocessors.oas2, id);
|
|
260
|
+
}
|
|
261
|
+
if (pluginInstance.preprocessors.async2) {
|
|
262
|
+
plugin.preprocessors.async2 = prefixRules(pluginInstance.preprocessors.async2, id);
|
|
263
|
+
}
|
|
264
|
+
if (pluginInstance.preprocessors.async3) {
|
|
265
|
+
plugin.preprocessors.async3 = prefixRules(pluginInstance.preprocessors.async3, id);
|
|
266
|
+
}
|
|
267
|
+
if (pluginInstance.preprocessors.arazzo1) {
|
|
268
|
+
plugin.preprocessors.arazzo1 = prefixRules(pluginInstance.preprocessors.arazzo1, id);
|
|
269
|
+
}
|
|
270
|
+
if (pluginInstance.preprocessors.overlay1) {
|
|
271
|
+
plugin.preprocessors.overlay1 = prefixRules(pluginInstance.preprocessors.overlay1, id);
|
|
272
|
+
}
|
|
273
|
+
if (pluginInstance.preprocessors.openrpc1) {
|
|
274
|
+
plugin.preprocessors.openrpc1 = prefixRules(pluginInstance.preprocessors.openrpc1, id);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
if (pluginInstance.decorators) {
|
|
278
|
+
if (!pluginInstance.decorators.oas3 &&
|
|
279
|
+
!pluginInstance.decorators.oas2 &&
|
|
280
|
+
!pluginInstance.decorators.async2 &&
|
|
281
|
+
!pluginInstance.decorators.async3 &&
|
|
282
|
+
!pluginInstance.decorators.arazzo1 &&
|
|
283
|
+
!pluginInstance.decorators.overlay1 &&
|
|
284
|
+
!pluginInstance.decorators.openrpc1) {
|
|
285
|
+
throw new Error(`Plugin \`decorators\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, \`overlay1\`, or \`openrpc1\` decorators "${p}.`);
|
|
286
|
+
}
|
|
287
|
+
plugin.decorators = {};
|
|
288
|
+
if (pluginInstance.decorators.oas3) {
|
|
289
|
+
plugin.decorators.oas3 = prefixRules(pluginInstance.decorators.oas3, id);
|
|
290
|
+
}
|
|
291
|
+
if (pluginInstance.decorators.oas2) {
|
|
292
|
+
plugin.decorators.oas2 = prefixRules(pluginInstance.decorators.oas2, id);
|
|
293
|
+
}
|
|
294
|
+
if (pluginInstance.decorators.async2) {
|
|
295
|
+
plugin.decorators.async2 = prefixRules(pluginInstance.decorators.async2, id);
|
|
296
|
+
}
|
|
297
|
+
if (pluginInstance.decorators.async3) {
|
|
298
|
+
plugin.decorators.async3 = prefixRules(pluginInstance.decorators.async3, id);
|
|
299
|
+
}
|
|
300
|
+
if (pluginInstance.decorators.arazzo1) {
|
|
301
|
+
plugin.decorators.arazzo1 = prefixRules(pluginInstance.decorators.arazzo1, id);
|
|
302
|
+
}
|
|
303
|
+
if (pluginInstance.decorators.overlay1) {
|
|
304
|
+
plugin.decorators.overlay1 = prefixRules(pluginInstance.decorators.overlay1, id);
|
|
305
|
+
}
|
|
306
|
+
if (pluginInstance.decorators.openrpc1) {
|
|
307
|
+
plugin.decorators.openrpc1 = prefixRules(pluginInstance.decorators.openrpc1, id);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
if (pluginInstance.assertions) {
|
|
311
|
+
plugin.assertions = pluginInstance.assertions;
|
|
312
|
+
}
|
|
313
|
+
return {
|
|
314
|
+
...pluginInstance,
|
|
315
|
+
...plugin,
|
|
316
|
+
};
|
|
317
|
+
}))).filter(isDefined);
|
|
318
|
+
}));
|
|
319
|
+
return instances.filter(isDefined).flat();
|
|
320
|
+
}
|
|
321
|
+
export function resolvePreset(presetName, plugins) {
|
|
322
|
+
const { pluginId, configName } = parsePresetName(presetName);
|
|
323
|
+
const plugin = plugins.find((p) => p.id === pluginId);
|
|
324
|
+
if (!plugin) {
|
|
325
|
+
throw new Error(`Invalid config ${colorize.red(presetName)}: plugin ${pluginId} is not included.`);
|
|
326
|
+
}
|
|
327
|
+
const preset = plugin.configs?.[configName];
|
|
328
|
+
if (!preset) {
|
|
329
|
+
throw new Error(pluginId
|
|
330
|
+
? `Invalid config ${colorize.red(presetName)}: plugin ${pluginId} doesn't export config with name ${configName}.`
|
|
331
|
+
: `Invalid config ${colorize.red(presetName)}: there is no such built-in config.`);
|
|
332
|
+
}
|
|
333
|
+
return preset;
|
|
334
|
+
}
|
|
335
|
+
//# sourceMappingURL=config-resolvers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-resolvers.js","sourceRoot":"","sources":["../../src/config/config-resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAA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AAC;IACtD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,kBAAkB,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,QAAQ,mBAAmB,CAClF,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC;IAC5C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,QAAQ;YACN,CAAC,CAAC,kBAAkB,QAAQ,CAAC,GAAG,CAC5B,UAAU,CACX,YAAY,QAAQ,oCAAoC,UAAU,GAAG;YACxE,CAAC,CAAC,kBAAkB,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,qCAAqC,CACpF,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Oas2RuleSet, Oas3RuleSet, Async3RuleSet, Arazzo1RuleSet, Overlay1RuleSet, OpenRpc1RuleSet, SpecVersion, SpecMajorVersion } from '../oas-types.js';
|
|
2
|
+
import type { Document, ResolvedRefMap } from '../resolve.js';
|
|
3
|
+
import type { NodeType } from '../types/index.js';
|
|
4
|
+
import type { NormalizedProblem } from '../walk.js';
|
|
5
|
+
import type { DecoratorConfig, Plugin, PreprocessorConfig, ResolveConfig, ResolvedConfig, RuleConfig, RuleSettings, IgnoreConfig } from './types.js';
|
|
6
|
+
export declare class Config {
|
|
7
|
+
resolvedConfig: ResolvedConfig;
|
|
8
|
+
configPath?: string;
|
|
9
|
+
document?: Document;
|
|
10
|
+
resolvedRefMap?: ResolvedRefMap;
|
|
11
|
+
resolve: ResolveConfig;
|
|
12
|
+
_alias?: string;
|
|
13
|
+
plugins: Plugin[];
|
|
14
|
+
ignore: IgnoreConfig;
|
|
15
|
+
doNotResolveExamples: boolean;
|
|
16
|
+
rules: Record<SpecVersion, Record<string, RuleConfig>>;
|
|
17
|
+
preprocessors: Record<SpecVersion, Record<string, PreprocessorConfig>>;
|
|
18
|
+
decorators: Record<SpecVersion, Record<string, DecoratorConfig>>;
|
|
19
|
+
private _usedRules;
|
|
20
|
+
private _usedVersions;
|
|
21
|
+
constructor(resolvedConfig: ResolvedConfig, opts?: {
|
|
22
|
+
configPath?: string;
|
|
23
|
+
document?: Document;
|
|
24
|
+
resolvedRefMap?: ResolvedRefMap;
|
|
25
|
+
alias?: string;
|
|
26
|
+
plugins?: Plugin[];
|
|
27
|
+
ignore?: IgnoreConfig;
|
|
28
|
+
});
|
|
29
|
+
forAlias(alias?: string): Config;
|
|
30
|
+
saveIgnore(): void;
|
|
31
|
+
addIgnore(problem: NormalizedProblem): void;
|
|
32
|
+
addProblemToIgnore(problem: NormalizedProblem): NormalizedProblem;
|
|
33
|
+
extendTypes(types: Record<string, NodeType>, version: SpecVersion): Record<string, NodeType>;
|
|
34
|
+
getRuleSettings(ruleId: string, oasVersion: SpecVersion): RuleSettings;
|
|
35
|
+
getPreprocessorSettings(ruleId: string, oasVersion: SpecVersion): RuleSettings;
|
|
36
|
+
getDecoratorSettings(ruleId: string, oasVersion: SpecVersion): RuleSettings;
|
|
37
|
+
getUnusedRules(): {
|
|
38
|
+
rules: string[];
|
|
39
|
+
preprocessors: string[];
|
|
40
|
+
decorators: string[];
|
|
41
|
+
};
|
|
42
|
+
getRulesForSpecVersion(version: SpecMajorVersion): Oas3RuleSet[] | Oas2RuleSet[] | Async3RuleSet[] | Arazzo1RuleSet[] | Overlay1RuleSet[] | OpenRpc1RuleSet[];
|
|
43
|
+
skipRules(rules?: string[]): void;
|
|
44
|
+
skipPreprocessors(preprocessors?: string[]): void;
|
|
45
|
+
skipDecorators(decorators?: string[]): void;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAKA,OAAO,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