@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,279 @@
|
|
|
1
|
+
import type { Location } from './ref-utils.js';
|
|
2
|
+
import type { NormalizedNodeType } from './types/index.js';
|
|
3
|
+
import type { ArazzoDefinition, ArazzoSourceDescription, CriterionObject, ExtendedOperation, InfoObject, OnFailureObject, OnSuccessObject, OpenAPISourceDescription, Parameter, Replacement, RequestBody, SourceDescription, Step, Workflow } from './typings/arazzo.js';
|
|
4
|
+
import type { Async2Definition } from './typings/asyncapi.js';
|
|
5
|
+
import type { Async3Definition } from './typings/asyncapi3.js';
|
|
6
|
+
import type { Oas3Definition, Oas3_1Definition, Oas3_2Definition, Oas3ExternalDocs, Oas3Info, Oas3Contact, Oas3Components, Oas3_1Components, Oas3License, Oas3Schema, Oas3_1Schema, Oas3Header, Oas3Parameter, Oas3Operation, Oas3PathItem, Oas3ServerVariable, Oas3Server, Oas3MediaType, Oas3Response, Oas3Example, Oas3RequestBody, Oas3Tag, Oas3_2Tag, OasRef, OAuth2Auth, Oas3SecurityScheme, Oas3SecurityRequirement, Oas3Encoding, Oas3Link, Oas3Xml, Oas3Discriminator, Oas3Callback } from './typings/openapi.js';
|
|
7
|
+
import type { OpenRpc1Definition, OpenRpc1Info, OpenRpc1Server, OpenRpc1ServerVariable, OpenRpc1Method, OpenRpc1ContentDescriptor, OpenRpc1ExamplePairing, OpenRpc1Example, OpenRpc1Link, OpenRpc1Error, OpenRpc1Components, OpenRpc1Tag, OpenRpc1ExternalDocs, OpenRpc1Contact, OpenRpc1License } from './typings/openrpc.js';
|
|
8
|
+
import type { Overlay1Definition } from './typings/overlay.js';
|
|
9
|
+
import type { Oas2Definition, Oas2Tag, Oas2ExternalDocs, Oas2SecurityRequirement, Oas2Info, Oas2Contact, Oas2License, Oas2PathItem, Oas2Operation, Oas2Header, Oas2Response, Oas2Schema, Oas2Xml, Oas2Parameter, Oas2SecurityScheme } from './typings/swagger.js';
|
|
10
|
+
import type { Stack } from './utils/stack.js';
|
|
11
|
+
import type { UserContext, ResolveResult, ProblemSeverity } from './walk.js';
|
|
12
|
+
export type SkipFunctionContext = Pick<UserContext, 'location' | 'rawNode' | 'resolve' | 'rawLocation'>;
|
|
13
|
+
export type VisitFunction<T> = (node: T, ctx: UserContext & {
|
|
14
|
+
ignoreNextVisitorsOnNode: () => void;
|
|
15
|
+
}, parents?: any, context?: any) => void;
|
|
16
|
+
type VisitRefFunction = (node: OasRef, ctx: UserContext, resolved: ResolveResult<any>) => void;
|
|
17
|
+
type SkipFunction<T> = (node: T, key: string | number, ctx: SkipFunctionContext) => boolean;
|
|
18
|
+
type VisitObject<T> = {
|
|
19
|
+
enter?: VisitFunction<T>;
|
|
20
|
+
leave?: VisitFunction<T>;
|
|
21
|
+
skip?: SkipFunction<T>;
|
|
22
|
+
};
|
|
23
|
+
export type NestedVisitObject<T, P> = VisitObject<T> & NestedVisitor<P>;
|
|
24
|
+
type VisitFunctionOrObject<T> = VisitFunction<T> | VisitObject<T>;
|
|
25
|
+
export type VisitorNode<T> = {
|
|
26
|
+
ruleId: string;
|
|
27
|
+
severity: ProblemSeverity;
|
|
28
|
+
message?: string;
|
|
29
|
+
context: VisitorLevelContext | VisitorSkippedLevelContext;
|
|
30
|
+
depth: number;
|
|
31
|
+
visit: VisitFunction<T>;
|
|
32
|
+
skip?: SkipFunction<T>;
|
|
33
|
+
};
|
|
34
|
+
type VisitorRefNode = {
|
|
35
|
+
ruleId: string;
|
|
36
|
+
severity: ProblemSeverity;
|
|
37
|
+
message?: string;
|
|
38
|
+
context: VisitorLevelContext;
|
|
39
|
+
depth: number;
|
|
40
|
+
visit: VisitRefFunction;
|
|
41
|
+
};
|
|
42
|
+
export type VisitorLevelContext = {
|
|
43
|
+
isSkippedLevel: false;
|
|
44
|
+
type: NormalizedNodeType;
|
|
45
|
+
parent: VisitorLevelContext | null;
|
|
46
|
+
activatedOn: Stack<{
|
|
47
|
+
node?: any;
|
|
48
|
+
withParentNode?: any;
|
|
49
|
+
skipped: boolean;
|
|
50
|
+
nextLevelTypeActivated: Stack<NormalizedNodeType>;
|
|
51
|
+
location?: Location;
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
54
|
+
export type VisitorSkippedLevelContext = {
|
|
55
|
+
isSkippedLevel: true;
|
|
56
|
+
parent: VisitorLevelContext;
|
|
57
|
+
seen: Set<any>;
|
|
58
|
+
};
|
|
59
|
+
export type NormalizeVisitor<Fn> = Fn extends VisitFunction<infer T> ? VisitorNode<T> : never;
|
|
60
|
+
export type BaseVisitor = {
|
|
61
|
+
any?: {
|
|
62
|
+
enter?: VisitFunction<any>;
|
|
63
|
+
leave?: VisitFunction<any>;
|
|
64
|
+
skip?: SkipFunction<any>;
|
|
65
|
+
} | VisitFunction<any>;
|
|
66
|
+
ref?: {
|
|
67
|
+
enter?: VisitRefFunction;
|
|
68
|
+
leave?: VisitRefFunction;
|
|
69
|
+
} | VisitRefFunction;
|
|
70
|
+
};
|
|
71
|
+
type Oas3FlatVisitor = {
|
|
72
|
+
Root?: VisitFunctionOrObject<Oas3Definition | Oas3_1Definition | Oas3_2Definition>;
|
|
73
|
+
Tag?: VisitFunctionOrObject<Oas3Tag | Oas3_2Tag>;
|
|
74
|
+
ExternalDocs?: VisitFunctionOrObject<Oas3ExternalDocs>;
|
|
75
|
+
Server?: VisitFunctionOrObject<Oas3Server>;
|
|
76
|
+
ServerVariable?: VisitFunctionOrObject<Oas3ServerVariable>;
|
|
77
|
+
SecurityRequirement?: VisitFunctionOrObject<Oas3SecurityRequirement>;
|
|
78
|
+
Info?: VisitFunctionOrObject<Oas3Info>;
|
|
79
|
+
Contact?: VisitFunctionOrObject<Oas3Contact>;
|
|
80
|
+
License?: VisitFunctionOrObject<Oas3License>;
|
|
81
|
+
Paths?: VisitFunctionOrObject<Record<string, Oas3PathItem<Oas3Schema | Oas3_1Schema>>>;
|
|
82
|
+
PathItem?: VisitFunctionOrObject<Oas3PathItem<Oas3Schema | Oas3_1Schema>>;
|
|
83
|
+
Callback?: VisitFunctionOrObject<Oas3Callback<Oas3Schema | Oas3_1Schema>>;
|
|
84
|
+
CallbacksMap?: VisitFunctionOrObject<Record<string, Oas3Callback<Oas3Schema | Oas3_1Schema>>>;
|
|
85
|
+
Parameter?: VisitFunctionOrObject<Oas3Parameter<Oas3Schema | Oas3_1Schema>>;
|
|
86
|
+
Operation?: VisitFunctionOrObject<Oas3Operation<Oas3Schema | Oas3_1Schema>>;
|
|
87
|
+
RequestBody?: VisitFunctionOrObject<Oas3RequestBody<Oas3Schema | Oas3_1Schema>>;
|
|
88
|
+
MediaTypesMap?: VisitFunctionOrObject<Record<string, Oas3MediaType<Oas3Schema | Oas3_1Schema>>>;
|
|
89
|
+
MediaType?: VisitFunctionOrObject<Oas3MediaType<Oas3Schema | Oas3_1Schema>>;
|
|
90
|
+
Example?: VisitFunctionOrObject<Oas3Example>;
|
|
91
|
+
Encoding?: VisitFunctionOrObject<Oas3Encoding<Oas3Schema | Oas3_1Schema>>;
|
|
92
|
+
Header?: VisitFunctionOrObject<Oas3Header<Oas3Schema | Oas3_1Schema>>;
|
|
93
|
+
Responses?: VisitFunctionOrObject<Record<string, Oas3Response<Oas3Schema | Oas3_1Schema>>>;
|
|
94
|
+
Response?: VisitFunctionOrObject<Oas3Response<Oas3Schema | Oas3_1Schema>>;
|
|
95
|
+
Link?: VisitFunctionOrObject<Oas3Link>;
|
|
96
|
+
Schema?: VisitFunctionOrObject<Oas3Schema | Oas3_1Schema>;
|
|
97
|
+
Xml?: VisitFunctionOrObject<Oas3Xml>;
|
|
98
|
+
SchemaProperties?: VisitFunctionOrObject<Record<string, Oas3Schema>>;
|
|
99
|
+
DiscriminatorMapping?: VisitFunctionOrObject<Record<string, string>>;
|
|
100
|
+
Discriminator?: VisitFunctionOrObject<Oas3Discriminator>;
|
|
101
|
+
Components?: VisitFunctionOrObject<Oas3Components | Oas3_1Components>;
|
|
102
|
+
NamedSchemas?: VisitFunctionOrObject<Record<string, Oas3Schema>>;
|
|
103
|
+
NamedResponses?: VisitFunctionOrObject<Record<string, Oas3Response<Oas3Schema | Oas3_1Schema>>>;
|
|
104
|
+
NamedParameters?: VisitFunctionOrObject<Record<string, Oas3Parameter<Oas3Schema | Oas3_1Schema>>>;
|
|
105
|
+
NamedExamples?: VisitFunctionOrObject<Record<string, Oas3Example>>;
|
|
106
|
+
NamedRequestBodies?: VisitFunctionOrObject<Record<string, Oas3RequestBody<Oas3Schema | Oas3_1Schema>>>;
|
|
107
|
+
NamedHeaders?: VisitFunctionOrObject<Record<string, Oas3Header<Oas3Schema | Oas3_1Schema>>>;
|
|
108
|
+
NamedSecuritySchemes?: VisitFunctionOrObject<Record<string, Oas3SecurityScheme>>;
|
|
109
|
+
NamedLinks?: VisitFunctionOrObject<Record<string, Oas3Link>>;
|
|
110
|
+
NamedCallbacks?: VisitFunctionOrObject<Record<string, Oas3Callback<Oas3Schema | Oas3_1Schema>>>;
|
|
111
|
+
NamedMediaTypes?: VisitFunctionOrObject<Record<string, Oas3MediaType<Oas3Schema | Oas3_1Schema>>>;
|
|
112
|
+
ImplicitFlow?: VisitFunctionOrObject<NonNullable<OAuth2Auth['flows']['implicit']>>;
|
|
113
|
+
PasswordFlow?: VisitFunctionOrObject<NonNullable<OAuth2Auth['flows']['password']>>;
|
|
114
|
+
ClientCredentials?: VisitFunctionOrObject<NonNullable<OAuth2Auth['flows']['clientCredentials']>>;
|
|
115
|
+
AuthorizationCode?: VisitFunctionOrObject<NonNullable<OAuth2Auth['flows']['authorizationCode']>>;
|
|
116
|
+
DeviceAuthorization?: VisitFunctionOrObject<NonNullable<OAuth2Auth['flows']['deviceAuthorization']>>;
|
|
117
|
+
OAuth2Flows?: VisitFunctionOrObject<OAuth2Auth['flows']>;
|
|
118
|
+
SecurityScheme?: VisitFunctionOrObject<Oas3SecurityScheme>;
|
|
119
|
+
SpecExtension?: VisitFunctionOrObject<unknown>;
|
|
120
|
+
};
|
|
121
|
+
type Oas2FlatVisitor = {
|
|
122
|
+
Root?: VisitFunctionOrObject<Oas2Definition>;
|
|
123
|
+
Tag?: VisitFunctionOrObject<Oas2Tag>;
|
|
124
|
+
ExternalDocs?: VisitFunctionOrObject<Oas2ExternalDocs>;
|
|
125
|
+
SecurityRequirement?: VisitFunctionOrObject<Oas2SecurityRequirement>;
|
|
126
|
+
Info?: VisitFunctionOrObject<Oas2Info>;
|
|
127
|
+
Contact?: VisitFunctionOrObject<Oas2Contact>;
|
|
128
|
+
License?: VisitFunctionOrObject<Oas2License>;
|
|
129
|
+
Paths?: VisitFunctionOrObject<Record<string, Oas2PathItem>>;
|
|
130
|
+
PathItem?: VisitFunctionOrObject<Oas2PathItem>;
|
|
131
|
+
Parameter?: VisitFunctionOrObject<any>;
|
|
132
|
+
Operation?: VisitFunctionOrObject<Oas2Operation>;
|
|
133
|
+
Examples?: VisitFunctionOrObject<Record<string, any>>;
|
|
134
|
+
Header?: VisitFunctionOrObject<Oas2Header>;
|
|
135
|
+
Responses?: VisitFunctionOrObject<Record<string, Oas2Response>>;
|
|
136
|
+
Response?: VisitFunctionOrObject<Oas2Response>;
|
|
137
|
+
Schema?: VisitFunctionOrObject<Oas2Schema>;
|
|
138
|
+
Xml?: VisitFunctionOrObject<Oas2Xml>;
|
|
139
|
+
SchemaProperties?: VisitFunctionOrObject<Record<string, Oas2Schema>>;
|
|
140
|
+
NamedSchemas?: VisitFunctionOrObject<Record<string, Oas2Schema>>;
|
|
141
|
+
NamedResponses?: VisitFunctionOrObject<Record<string, Oas2Response>>;
|
|
142
|
+
NamedParameters?: VisitFunctionOrObject<Record<string, Oas2Parameter>>;
|
|
143
|
+
SecurityScheme?: VisitFunctionOrObject<Oas2SecurityScheme>;
|
|
144
|
+
NamedSecuritySchemes?: VisitFunctionOrObject<Record<string, Oas2SecurityScheme>>;
|
|
145
|
+
SpecExtension?: VisitFunctionOrObject<unknown>;
|
|
146
|
+
};
|
|
147
|
+
type Async2FlatVisitor = {
|
|
148
|
+
Root?: VisitFunctionOrObject<Async2Definition>;
|
|
149
|
+
};
|
|
150
|
+
type Async3FlatVisitor = {
|
|
151
|
+
Root?: VisitFunctionOrObject<Async3Definition>;
|
|
152
|
+
};
|
|
153
|
+
type ArazzoFlatVisitor = {
|
|
154
|
+
Root?: VisitFunctionOrObject<ArazzoDefinition>;
|
|
155
|
+
ParameterObject?: VisitFunctionOrObject<Parameter>;
|
|
156
|
+
InfoObject?: VisitFunctionOrObject<InfoObject>;
|
|
157
|
+
OpenAPISourceDescription?: VisitFunctionOrObject<OpenAPISourceDescription>;
|
|
158
|
+
ArazzoSourceDescription?: VisitFunctionOrObject<ArazzoSourceDescription>;
|
|
159
|
+
SourceDescription?: VisitFunctionOrObject<SourceDescription>;
|
|
160
|
+
ExtendedOperation?: VisitFunctionOrObject<ExtendedOperation>;
|
|
161
|
+
Replacement?: VisitFunctionOrObject<Replacement>;
|
|
162
|
+
RequestBody?: VisitFunctionOrObject<RequestBody>;
|
|
163
|
+
CriterionObject?: VisitFunctionOrObject<CriterionObject>;
|
|
164
|
+
OnSuccessObject?: VisitFunctionOrObject<OnSuccessObject>;
|
|
165
|
+
OnFailureObject?: VisitFunctionOrObject<OnFailureObject>;
|
|
166
|
+
Step?: VisitFunctionOrObject<Step>;
|
|
167
|
+
Steps?: VisitFunctionOrObject<Step[]>;
|
|
168
|
+
Workflow?: VisitFunctionOrObject<Workflow>;
|
|
169
|
+
Workflows?: VisitFunctionOrObject<Workflow[]>;
|
|
170
|
+
};
|
|
171
|
+
type Overlay1FlatVisitor = {
|
|
172
|
+
Root?: VisitFunctionOrObject<Overlay1Definition>;
|
|
173
|
+
};
|
|
174
|
+
type OpenRpc1FlatVisitor = {
|
|
175
|
+
Root?: VisitFunctionOrObject<OpenRpc1Definition>;
|
|
176
|
+
Info?: VisitFunctionOrObject<OpenRpc1Info>;
|
|
177
|
+
Contact?: VisitFunctionOrObject<OpenRpc1Contact>;
|
|
178
|
+
License?: VisitFunctionOrObject<OpenRpc1License>;
|
|
179
|
+
Server?: VisitFunctionOrObject<OpenRpc1Server>;
|
|
180
|
+
ServerVariable?: VisitFunctionOrObject<OpenRpc1ServerVariable>;
|
|
181
|
+
Method?: VisitFunctionOrObject<OpenRpc1Method>;
|
|
182
|
+
ContentDescriptor?: VisitFunctionOrObject<OpenRpc1ContentDescriptor>;
|
|
183
|
+
ExamplePairing?: VisitFunctionOrObject<OpenRpc1ExamplePairing>;
|
|
184
|
+
Example?: VisitFunctionOrObject<OpenRpc1Example>;
|
|
185
|
+
Link?: VisitFunctionOrObject<OpenRpc1Link>;
|
|
186
|
+
ErrorObject?: VisitFunctionOrObject<OpenRpc1Error>;
|
|
187
|
+
Components?: VisitFunctionOrObject<OpenRpc1Components>;
|
|
188
|
+
Tag?: VisitFunctionOrObject<OpenRpc1Tag>;
|
|
189
|
+
ExternalDocs?: VisitFunctionOrObject<OpenRpc1ExternalDocs>;
|
|
190
|
+
Schema?: VisitFunctionOrObject<any>;
|
|
191
|
+
SchemaProperties?: VisitFunctionOrObject<Record<string, any>>;
|
|
192
|
+
NamedContentDescriptors?: VisitFunctionOrObject<Record<string, OpenRpc1ContentDescriptor>>;
|
|
193
|
+
NamedSchemas?: VisitFunctionOrObject<Record<string, any>>;
|
|
194
|
+
NamedExamples?: VisitFunctionOrObject<Record<string, OpenRpc1Example>>;
|
|
195
|
+
NamedLinks?: VisitFunctionOrObject<Record<string, OpenRpc1Link>>;
|
|
196
|
+
NamedErrors?: VisitFunctionOrObject<Record<string, OpenRpc1Error>>;
|
|
197
|
+
NamedExamplePairingObjects?: VisitFunctionOrObject<Record<string, OpenRpc1ExamplePairing>>;
|
|
198
|
+
NamedTags?: VisitFunctionOrObject<Record<string, OpenRpc1Tag>>;
|
|
199
|
+
};
|
|
200
|
+
type Oas3NestedVisitor = {
|
|
201
|
+
[T in keyof Oas3FlatVisitor]: Oas3FlatVisitor[T] extends Function ? Oas3FlatVisitor[T] : Oas3FlatVisitor[T] & NestedVisitor<Oas3NestedVisitor>;
|
|
202
|
+
};
|
|
203
|
+
type Oas2NestedVisitor = {
|
|
204
|
+
[T in keyof Oas2FlatVisitor]: Oas2FlatVisitor[T] extends Function ? Oas2FlatVisitor[T] : Oas2FlatVisitor[T] & NestedVisitor<Oas2NestedVisitor>;
|
|
205
|
+
};
|
|
206
|
+
type Async2NestedVisitor = {
|
|
207
|
+
[T in keyof Async2FlatVisitor]: Async2FlatVisitor[T] extends Function ? Async2FlatVisitor[T] : Async2FlatVisitor[T] & NestedVisitor<Async2NestedVisitor>;
|
|
208
|
+
};
|
|
209
|
+
type Async3NestedVisitor = {
|
|
210
|
+
[T in keyof Async3FlatVisitor]: Async3FlatVisitor[T] extends Function ? Async3FlatVisitor[T] : Async3FlatVisitor[T] & NestedVisitor<Async3NestedVisitor>;
|
|
211
|
+
};
|
|
212
|
+
type ArazzoNestedVisitor = {
|
|
213
|
+
[T in keyof ArazzoFlatVisitor]: ArazzoFlatVisitor[T] extends Function ? ArazzoFlatVisitor[T] : ArazzoFlatVisitor[T] & NestedVisitor<ArazzoNestedVisitor>;
|
|
214
|
+
};
|
|
215
|
+
type Overlay1NestedVisitor = {
|
|
216
|
+
[T in keyof Overlay1FlatVisitor]: Overlay1FlatVisitor[T] extends Function ? Overlay1FlatVisitor[T] : Overlay1FlatVisitor[T] & NestedVisitor<Overlay1NestedVisitor>;
|
|
217
|
+
};
|
|
218
|
+
type OpenRpc1NestedVisitor = {
|
|
219
|
+
[T in keyof OpenRpc1FlatVisitor]: OpenRpc1FlatVisitor[T] extends Function ? OpenRpc1FlatVisitor[T] : OpenRpc1FlatVisitor[T] & NestedVisitor<OpenRpc1NestedVisitor>;
|
|
220
|
+
};
|
|
221
|
+
export type Oas3Visitor = BaseVisitor & Oas3NestedVisitor & Record<string, VisitFunction<any> | NestedVisitObject<any, Oas3NestedVisitor>>;
|
|
222
|
+
export type Oas2Visitor = BaseVisitor & Oas2NestedVisitor & Record<string, VisitFunction<any> | NestedVisitObject<any, Oas2NestedVisitor>>;
|
|
223
|
+
export type Async2Visitor = BaseVisitor & Async2NestedVisitor & Record<string, VisitFunction<any> | NestedVisitObject<any, Async2NestedVisitor>>;
|
|
224
|
+
export type Async3Visitor = BaseVisitor & Async3NestedVisitor & Record<string, VisitFunction<any> | NestedVisitObject<any, Async3NestedVisitor>>;
|
|
225
|
+
export type Arazzo1Visitor = BaseVisitor & ArazzoNestedVisitor & Record<string, VisitFunction<any> | NestedVisitObject<any, ArazzoNestedVisitor>>;
|
|
226
|
+
export type Overlay1Visitor = BaseVisitor & Overlay1NestedVisitor & Record<string, VisitFunction<any> | NestedVisitObject<any, Overlay1NestedVisitor>>;
|
|
227
|
+
export type OpenRpc1Visitor = BaseVisitor & OpenRpc1NestedVisitor & Record<string, VisitFunction<any> | NestedVisitObject<any, OpenRpc1NestedVisitor>>;
|
|
228
|
+
export type CatalogEntityVisitor = BaseVisitor & Record<string, VisitFunction<any>>;
|
|
229
|
+
export type NestedVisitor<T> = Exclude<T, 'any' | 'ref' | 'Root'>;
|
|
230
|
+
export type NormalizedOasVisitors<T extends BaseVisitor> = {
|
|
231
|
+
[V in keyof T]-?: {
|
|
232
|
+
enter: Array<NormalizeVisitor<T[V]>>;
|
|
233
|
+
leave: Array<NormalizeVisitor<T[V]>>;
|
|
234
|
+
};
|
|
235
|
+
} & {
|
|
236
|
+
ref: {
|
|
237
|
+
enter: Array<VisitorRefNode>;
|
|
238
|
+
leave: Array<VisitorRefNode>;
|
|
239
|
+
};
|
|
240
|
+
[k: string]: {
|
|
241
|
+
enter: Array<VisitorNode<any>>;
|
|
242
|
+
leave: Array<VisitorNode<any>>;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
export type Oas3Rule = (options: Record<string, any>) => Oas3Visitor | Oas3Visitor[];
|
|
246
|
+
export type Oas2Rule = (options: Record<string, any>) => Oas2Visitor | Oas2Visitor[];
|
|
247
|
+
export type Async2Rule = (options: Record<string, any>) => Async2Visitor | Async2Visitor[];
|
|
248
|
+
export type Async3Rule = (options: Record<string, any>) => Async3Visitor | Async3Visitor[];
|
|
249
|
+
export type Arazzo1Rule = (options: Record<string, any>) => Arazzo1Visitor | Arazzo1Visitor[];
|
|
250
|
+
export type Overlay1Rule = (options: Record<string, any>) => Overlay1Visitor | Overlay1Visitor[];
|
|
251
|
+
export type OpenRpc1Rule = (options: Record<string, any>) => OpenRpc1Visitor | OpenRpc1Visitor[];
|
|
252
|
+
export type CatalogEntityRule = (options: Record<string, any>) => CatalogEntityVisitor | CatalogEntityVisitor[];
|
|
253
|
+
export type Oas3Preprocessor = (options: Record<string, any>) => Oas3Visitor;
|
|
254
|
+
export type Oas2Preprocessor = (options: Record<string, any>) => Oas2Visitor;
|
|
255
|
+
export type Async2Preprocessor = (options: Record<string, any>) => Async2Visitor;
|
|
256
|
+
export type Async3Preprocessor = (options: Record<string, any>) => Async3Visitor;
|
|
257
|
+
export type Arazzo1Preprocessor = (options: Record<string, any>) => Arazzo1Visitor;
|
|
258
|
+
export type Overlay1Preprocessor = (options: Record<string, any>) => Overlay1Visitor;
|
|
259
|
+
export type OpenRpc1Preprocessor = (options: Record<string, any>) => OpenRpc1Visitor;
|
|
260
|
+
export type Oas3Decorator = (options: Record<string, any>) => Oas3Visitor;
|
|
261
|
+
export type Oas2Decorator = (options: Record<string, any>) => Oas2Visitor;
|
|
262
|
+
export type Async2Decorator = (options: Record<string, any>) => Async2Visitor;
|
|
263
|
+
export type Async3Decorator = (options: Record<string, any>) => Async3Visitor;
|
|
264
|
+
export type Arazzo1Decorator = (options: Record<string, any>) => Arazzo1Visitor;
|
|
265
|
+
export type Overlay1Decorator = (options: Record<string, any>) => Overlay1Visitor;
|
|
266
|
+
export type OpenRpc1Decorator = (options: Record<string, any>) => OpenRpc1Visitor;
|
|
267
|
+
export type OasRule = Oas3Rule;
|
|
268
|
+
export type OasPreprocessor = Oas3Preprocessor;
|
|
269
|
+
export type OasDecorator = Oas3Decorator;
|
|
270
|
+
export type RuleInstanceConfig = {
|
|
271
|
+
ruleId: string;
|
|
272
|
+
severity: ProblemSeverity;
|
|
273
|
+
message?: string;
|
|
274
|
+
};
|
|
275
|
+
export declare function normalizeVisitors<T extends BaseVisitor>(visitorsConfig: (RuleInstanceConfig & {
|
|
276
|
+
visitor: NestedVisitObject<unknown, T>;
|
|
277
|
+
})[], types: Record<keyof T, NormalizedNodeType>): NormalizedOasVisitors<T>;
|
|
278
|
+
export {};
|
|
279
|
+
//# sourceMappingURL=visitors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visitors.d.ts","sourceRoot":"","sources":["../src/visitors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,eAAe,EACf,wBAAwB,EACxB,SAAS,EACT,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,IAAI,EACJ,QAAQ,EACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,UAAU,EACV,aAAa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AEzC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,EACrD,cAAc,EAAE,CAAC,kBAAkB,GAAG;IAAE,OAAO,EAAE,iBAAiB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;CAAE,CAAC,EAAE,EACnF,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC,GACzC,qBAAqB,CAAC,CAAC,CAAC,CA0M1B"}
|
package/lib/visitors.js
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { SpecExtension } from './types/index.js';
|
|
2
|
+
import { isPlainObject } from './utils/is-plain-object.js';
|
|
3
|
+
const legacyTypesMap = {
|
|
4
|
+
Root: 'DefinitionRoot',
|
|
5
|
+
ServerVariablesMap: 'ServerVariableMap',
|
|
6
|
+
Paths: ['PathMap', 'PathsMap'],
|
|
7
|
+
CallbacksMap: 'CallbackMap',
|
|
8
|
+
MediaTypesMap: 'MediaTypeMap',
|
|
9
|
+
ExamplesMap: 'ExampleMap',
|
|
10
|
+
EncodingMap: 'EncodingsMap',
|
|
11
|
+
HeadersMap: 'HeaderMap',
|
|
12
|
+
LinksMap: 'LinkMap',
|
|
13
|
+
OAuth2Flows: 'SecuritySchemeFlows',
|
|
14
|
+
Responses: 'ResponsesMap',
|
|
15
|
+
};
|
|
16
|
+
export function normalizeVisitors(visitorsConfig, types) {
|
|
17
|
+
const normalizedVisitors = {};
|
|
18
|
+
normalizedVisitors.any = {
|
|
19
|
+
enter: [],
|
|
20
|
+
leave: [],
|
|
21
|
+
};
|
|
22
|
+
for (const typeName of Object.keys(types)) {
|
|
23
|
+
normalizedVisitors[typeName] = {
|
|
24
|
+
enter: [],
|
|
25
|
+
leave: [],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
normalizedVisitors.ref = {
|
|
29
|
+
enter: [],
|
|
30
|
+
leave: [],
|
|
31
|
+
};
|
|
32
|
+
for (const { ruleId, severity, message, visitor } of visitorsConfig) {
|
|
33
|
+
normalizeVisitorLevel({ ruleId, severity, message }, visitor, null);
|
|
34
|
+
}
|
|
35
|
+
for (const v of Object.keys(normalizedVisitors)) {
|
|
36
|
+
normalizedVisitors[v].enter.sort((a, b) => b.depth - a.depth);
|
|
37
|
+
normalizedVisitors[v].leave.sort((a, b) => a.depth - b.depth);
|
|
38
|
+
}
|
|
39
|
+
return normalizedVisitors;
|
|
40
|
+
function addWeakNodes(ruleConf, from, to, parentContext, stack = []) {
|
|
41
|
+
if (stack.includes(from))
|
|
42
|
+
return;
|
|
43
|
+
stack = [...stack, from];
|
|
44
|
+
const possibleChildren = new Set();
|
|
45
|
+
for (const type of Object.values(from.properties)) {
|
|
46
|
+
if (type === to) {
|
|
47
|
+
addWeakFromStack(ruleConf, stack);
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (isPlainObject(type) && type.name !== undefined) {
|
|
51
|
+
possibleChildren.add(type);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (from.additionalProperties && typeof from.additionalProperties !== 'function') {
|
|
55
|
+
if (from.additionalProperties === to) {
|
|
56
|
+
addWeakFromStack(ruleConf, stack);
|
|
57
|
+
}
|
|
58
|
+
else if (from.additionalProperties.name !== undefined) {
|
|
59
|
+
possibleChildren.add(from.additionalProperties);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (from.items && typeof from.items !== 'function') {
|
|
63
|
+
if (from.items === to) {
|
|
64
|
+
addWeakFromStack(ruleConf, stack);
|
|
65
|
+
}
|
|
66
|
+
else if (from.items.name !== undefined) {
|
|
67
|
+
possibleChildren.add(from.items);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (from.extensionsPrefix) {
|
|
71
|
+
possibleChildren.add(SpecExtension);
|
|
72
|
+
}
|
|
73
|
+
for (const fromType of Array.from(possibleChildren.values())) {
|
|
74
|
+
addWeakNodes(ruleConf, fromType, to, parentContext, stack);
|
|
75
|
+
}
|
|
76
|
+
function addWeakFromStack(ruleConf, stack) {
|
|
77
|
+
for (const interType of stack.slice(1)) {
|
|
78
|
+
normalizedVisitors[interType.name] = normalizedVisitors[interType.name] || {
|
|
79
|
+
enter: [],
|
|
80
|
+
leave: [],
|
|
81
|
+
};
|
|
82
|
+
normalizedVisitors[interType.name].enter.push({
|
|
83
|
+
...ruleConf,
|
|
84
|
+
visit: () => undefined,
|
|
85
|
+
depth: 0,
|
|
86
|
+
context: {
|
|
87
|
+
isSkippedLevel: true,
|
|
88
|
+
seen: new Set(),
|
|
89
|
+
parent: parentContext,
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function findLegacyVisitorNode(visitor, typeName) {
|
|
96
|
+
if (Array.isArray(typeName)) {
|
|
97
|
+
const name = typeName.find((name) => visitor[name]) || undefined;
|
|
98
|
+
return name && visitor[name];
|
|
99
|
+
}
|
|
100
|
+
return visitor[typeName];
|
|
101
|
+
}
|
|
102
|
+
function normalizeVisitorLevel(ruleConf, visitor, parentContext, depth = 0) {
|
|
103
|
+
const visitorKeys = Object.keys(types);
|
|
104
|
+
if (depth === 0) {
|
|
105
|
+
visitorKeys.push('any');
|
|
106
|
+
visitorKeys.push('ref');
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
if (visitor.any) {
|
|
110
|
+
throw new Error('any() is allowed only on top level');
|
|
111
|
+
}
|
|
112
|
+
if (visitor.ref) {
|
|
113
|
+
throw new Error('ref() is allowed only on top level');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
for (const typeName of visitorKeys) {
|
|
117
|
+
const typeVisitor = (visitor[typeName] ||
|
|
118
|
+
findLegacyVisitorNode(visitor, legacyTypesMap[typeName]));
|
|
119
|
+
const normalizedTypeVisitor = normalizedVisitors[typeName];
|
|
120
|
+
if (!typeVisitor)
|
|
121
|
+
continue;
|
|
122
|
+
let visitorEnter;
|
|
123
|
+
let visitorLeave;
|
|
124
|
+
let visitorSkip;
|
|
125
|
+
const isObjectVisitor = isPlainObject(typeVisitor);
|
|
126
|
+
if (typeName === 'ref' && isObjectVisitor && typeVisitor.skip) {
|
|
127
|
+
throw new Error('ref() visitor does not support skip');
|
|
128
|
+
}
|
|
129
|
+
if (typeof typeVisitor === 'function') {
|
|
130
|
+
visitorEnter = typeVisitor;
|
|
131
|
+
}
|
|
132
|
+
else if (isObjectVisitor) {
|
|
133
|
+
visitorEnter = typeVisitor.enter;
|
|
134
|
+
visitorLeave = typeVisitor.leave;
|
|
135
|
+
visitorSkip = typeVisitor.skip;
|
|
136
|
+
}
|
|
137
|
+
const standardKeysCount = (visitorEnter ? 1 : 0) + (visitorLeave ? 1 : 0) + (visitorSkip ? 1 : 0);
|
|
138
|
+
const hasNestedVisitors = isObjectVisitor && Object.keys(typeVisitor).length > standardKeysCount;
|
|
139
|
+
const context = {
|
|
140
|
+
activatedOn: null,
|
|
141
|
+
type: types[typeName],
|
|
142
|
+
parent: parentContext,
|
|
143
|
+
isSkippedLevel: false,
|
|
144
|
+
};
|
|
145
|
+
if (hasNestedVisitors) {
|
|
146
|
+
normalizeVisitorLevel(ruleConf, typeVisitor, context, depth + 1);
|
|
147
|
+
}
|
|
148
|
+
if (parentContext) {
|
|
149
|
+
addWeakNodes(ruleConf, parentContext.type, types[typeName], parentContext);
|
|
150
|
+
}
|
|
151
|
+
if (visitorEnter || isObjectVisitor) {
|
|
152
|
+
if (visitorEnter && typeof visitorEnter !== 'function') {
|
|
153
|
+
throw new Error('DEV: should be function');
|
|
154
|
+
}
|
|
155
|
+
normalizedTypeVisitor.enter.push({
|
|
156
|
+
...ruleConf,
|
|
157
|
+
visit: visitorEnter || (() => undefined),
|
|
158
|
+
skip: visitorSkip,
|
|
159
|
+
depth,
|
|
160
|
+
context,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
if (visitorLeave) {
|
|
164
|
+
if (typeof visitorLeave !== 'function') {
|
|
165
|
+
throw new Error('DEV: should be function');
|
|
166
|
+
}
|
|
167
|
+
normalizedTypeVisitor.leave.push({
|
|
168
|
+
...ruleConf,
|
|
169
|
+
visit: visitorLeave,
|
|
170
|
+
depth,
|
|
171
|
+
context,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=visitors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visitors.js","sourceRoot":"","sources":["../src/visitors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAyFjD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAoO3D,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE,gBAAgB;IACtB,kBAAkB,EAAE,mBAAmB;IACvC,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;IAC9B,YAAY,EAAE,aAAa;IAC3B,aAAa,EAAE,cAAc;IAC7B,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,cAAc;IAC3B,UAAU,EAAE,WAAW;IACvB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,qBAAqB;IAClC,SAAS,EAAE,cAAc;CAC1B,CAAC;AAyIF,MAAM,UAAU,iBAAiB,CAC/B,cAAmF,EACnF,KAA0C;IAE1C,MAAM,kBAAkB,GAA6B,EAAS,CAAC;IAE/D,kBAAkB,CAAC,GAAG,GAAG;QACvB,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;KACV,CAAC;IAEF,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAmB,EAAE,CAAC;QAC5D,kBAAkB,CAAC,QAAQ,CAAC,GAAG;YAC7B,KAAK,EAAE,EAA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BACX,KAAK,EAAE,YAAY;oBACnB,KAAK;oBACL,OAAO;iBACR,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/lib/walk.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { Config, RuleSeverity } from './config/index.js';
|
|
2
|
+
import { YamlParseError } from './errors/yaml-parse-error.js';
|
|
3
|
+
import type { SpecVersion } from './oas-types.js';
|
|
4
|
+
import { Location } from './ref-utils.js';
|
|
5
|
+
import type { ResolveError, Source, ResolvedRefMap, Document } from './resolve.js';
|
|
6
|
+
import type { NormalizedNodeType } from './types/index.js';
|
|
7
|
+
import type { Referenced } from './typings/openapi.js';
|
|
8
|
+
import type { NormalizedOasVisitors, BaseVisitor } from './visitors.js';
|
|
9
|
+
export type NonUndefined = string | number | boolean | symbol | bigint | object | Record<string, any>;
|
|
10
|
+
export type ResolveResult<T extends NonUndefined> = {
|
|
11
|
+
node: T;
|
|
12
|
+
location: Location;
|
|
13
|
+
error?: ResolveError | YamlParseError;
|
|
14
|
+
} | {
|
|
15
|
+
node: undefined;
|
|
16
|
+
location: undefined;
|
|
17
|
+
error?: ResolveError | YamlParseError;
|
|
18
|
+
};
|
|
19
|
+
export type ResolveFn = <T extends NonUndefined>(node: Referenced<T>, from?: string) => ResolveResult<T>;
|
|
20
|
+
export type UserContext = {
|
|
21
|
+
report(problem: Problem): void;
|
|
22
|
+
location: Location;
|
|
23
|
+
rawNode: any;
|
|
24
|
+
rawLocation: Location;
|
|
25
|
+
resolve: ResolveFn;
|
|
26
|
+
parentLocations: Record<string, Location>;
|
|
27
|
+
type: NormalizedNodeType;
|
|
28
|
+
key: string | number;
|
|
29
|
+
parent: any;
|
|
30
|
+
specVersion: SpecVersion;
|
|
31
|
+
config?: Config;
|
|
32
|
+
getVisitorData: () => Record<string, unknown>;
|
|
33
|
+
};
|
|
34
|
+
export type Loc = {
|
|
35
|
+
line: number;
|
|
36
|
+
col: number;
|
|
37
|
+
};
|
|
38
|
+
export type PointerLocationObject = {
|
|
39
|
+
source: Source;
|
|
40
|
+
reportOnKey?: boolean;
|
|
41
|
+
pointer: string;
|
|
42
|
+
};
|
|
43
|
+
export type LineColLocationObject = Omit<PointerLocationObject, 'pointer'> & {
|
|
44
|
+
pointer: undefined;
|
|
45
|
+
start: Loc;
|
|
46
|
+
end?: Loc;
|
|
47
|
+
};
|
|
48
|
+
export type LocationObject = LineColLocationObject | PointerLocationObject;
|
|
49
|
+
export type ProblemSeverity = 'error' | 'warn';
|
|
50
|
+
export type Problem = {
|
|
51
|
+
message: string;
|
|
52
|
+
suggest?: string[];
|
|
53
|
+
location?: Partial<LocationObject> | Array<Partial<LocationObject>>;
|
|
54
|
+
from?: LocationObject;
|
|
55
|
+
forceSeverity?: RuleSeverity;
|
|
56
|
+
ruleId?: string;
|
|
57
|
+
};
|
|
58
|
+
export type NormalizedProblem = {
|
|
59
|
+
message: string;
|
|
60
|
+
ruleId: string;
|
|
61
|
+
severity: ProblemSeverity;
|
|
62
|
+
location: LocationObject[];
|
|
63
|
+
from?: LocationObject;
|
|
64
|
+
suggest: string[];
|
|
65
|
+
ignored?: boolean;
|
|
66
|
+
};
|
|
67
|
+
export type WalkContext = {
|
|
68
|
+
problems: NormalizedProblem[];
|
|
69
|
+
specVersion: SpecVersion;
|
|
70
|
+
config?: Config;
|
|
71
|
+
visitorsData: Record<string, Record<string, unknown>>;
|
|
72
|
+
refTypes?: Map<string, NormalizedNodeType>;
|
|
73
|
+
};
|
|
74
|
+
export declare function walkDocument<T extends BaseVisitor>(opts: {
|
|
75
|
+
document: Document;
|
|
76
|
+
rootType: NormalizedNodeType;
|
|
77
|
+
normalizedVisitors: NormalizedOasVisitors<T>;
|
|
78
|
+
resolvedRefMap: ResolvedRefMap;
|
|
79
|
+
ctx: WalkContext;
|
|
80
|
+
}): void;
|
|
81
|
+
//# sourceMappingURL=walk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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