@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,20 @@
|
|
|
1
|
+
import { validateResponseCodes } from '../utils.js';
|
|
2
|
+
export const Operation2xxResponse = ({ validateWebhooks }) => {
|
|
3
|
+
return {
|
|
4
|
+
Paths: {
|
|
5
|
+
Responses(responses, { report }) {
|
|
6
|
+
const codes = Object.keys(responses || {});
|
|
7
|
+
validateResponseCodes(codes, '2XX', { report });
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
WebhooksMap: {
|
|
11
|
+
Responses(responses, { report }) {
|
|
12
|
+
if (!validateWebhooks)
|
|
13
|
+
return;
|
|
14
|
+
const codes = Object.keys(responses || {});
|
|
15
|
+
validateResponseCodes(codes, '2XX', { report });
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=operation-2xx-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-2xx-response.js","sourceRoot":"","sources":["../../../src/rules/common/operation-2xx-response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,CAAC,MAAM,oBAAoB,GAAwB,CAAC,EAAE,gBAAgB,EAAE,EAAE,EAAE;IAChF,OAAO;QACL,KAAK,EAAE;YACL,SAAS,CAAC,SAAiC,EAAE,EAAE,MAAM,EAAe;gBAClE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;gBAE3C,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,EAAiB,CAAC,CAAC;YACjE,CAAC;SACF;QACD,WAAW,EAAE;YACX,SAAS,CAAC,SAAiC,EAAE,EAAE,MAAM,EAAe;gBAClE,IAAI,CAAC,gBAAgB;oBAAE,OAAO;gBAE9B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;gBAE3C,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,EAAiB,CAAC,CAAC;YACjE,CAAC;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-4xx-response.d.ts","sourceRoot":"","sources":["../../../src/rules/common/operation-4xx-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI5D,eAAO,MAAM,oBAAoB,EAAE,QAAQ,GAAG,QAmB7C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { validateResponseCodes } from '../utils.js';
|
|
2
|
+
export const Operation4xxResponse = ({ validateWebhooks }) => {
|
|
3
|
+
return {
|
|
4
|
+
Paths: {
|
|
5
|
+
Responses(responses, { report }) {
|
|
6
|
+
const codes = Object.keys(responses || {});
|
|
7
|
+
validateResponseCodes(codes, '4XX', { report });
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
WebhooksMap: {
|
|
11
|
+
Responses(responses, { report }) {
|
|
12
|
+
if (!validateWebhooks)
|
|
13
|
+
return;
|
|
14
|
+
const codes = Object.keys(responses || {});
|
|
15
|
+
validateResponseCodes(codes, '4XX', { report });
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=operation-4xx-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-4xx-response.js","sourceRoot":"","sources":["../../../src/rules/common/operation-4xx-response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,CAAC,MAAM,oBAAoB,GAAwB,CAAC,EAAE,gBAAgB,EAAE,EAAE,EAAE;IAChF,OAAO;QACL,KAAK,EAAE;YACL,SAAS,CAAC,SAAiC,EAAE,EAAE,MAAM,EAAe;gBAClE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;gBAE3C,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,EAAiB,CAAC,CAAC;YACjE,CAAC;SACF;QACD,WAAW,EAAE;YACX,SAAS,CAAC,SAAiC,EAAE,EAAE,MAAM,EAAe;gBAClE,IAAI,CAAC,gBAAgB;oBAAE,OAAO;gBAE9B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;gBAE3C,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,EAAiB,CAAC,CAAC;YACjE,CAAC;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-description.d.ts","sourceRoot":"","sources":["../../../src/rules/common/operation-description.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI5D,eAAO,MAAM,oBAAoB,EAAE,QAAQ,GAAG,QAM7C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { validateDefinedAndNonEmpty } from '../utils.js';
|
|
2
|
+
export const OperationDescription = () => {
|
|
3
|
+
return {
|
|
4
|
+
Operation(operation, ctx) {
|
|
5
|
+
validateDefinedAndNonEmpty('description', operation, ctx);
|
|
6
|
+
},
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=operation-description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-description.js","sourceRoot":"","sources":["../../../src/rules/common/operation-description.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,CAAC,MAAM,oBAAoB,GAAwB,GAAG,EAAE;IAC5D,OAAO;QACL,SAAS,CAAC,SAAwC,EAAE,GAAgB;YAClE,0BAA0B,CAAC,aAAa,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;QAC5D,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-operationId-unique.d.ts","sourceRoot":"","sources":["../../../src/rules/common/operation-operationId-unique.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG5D,eAAO,MAAM,iBAAiB,EAAE,QAAQ,GAAG,QAe1C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const OperationIdUnique = () => {
|
|
2
|
+
const seenOperations = new Set();
|
|
3
|
+
return {
|
|
4
|
+
Operation(operation, { report, location }) {
|
|
5
|
+
if (!operation.operationId)
|
|
6
|
+
return;
|
|
7
|
+
if (seenOperations.has(operation.operationId)) {
|
|
8
|
+
report({
|
|
9
|
+
message: 'Every operation must have a unique `operationId`.',
|
|
10
|
+
location: location.child([operation.operationId]),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
seenOperations.add(operation.operationId);
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=operation-operationId-unique.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-operationId-unique.js","sourceRoot":"","sources":["../../../src/rules/common/operation-operationId-unique.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,iBAAiB,GAAwB,GAAG,EAAE;IACzD,MAAM,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;IAEjC,OAAO;QACL,SAAS,CAAC,SAAwC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAe;YACnF,IAAI,CAAC,SAAS,CAAC,WAAW;gBAAE,OAAO;YACnC,IAAI,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC9C,MAAM,CAAC;oBACL,OAAO,EAAE,mDAAmD;oBAC5D,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;iBAClD,CAAC,CAAC;YACL,CAAC;YACD,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC5C,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-operationId-url-safe.d.ts","sourceRoot":"","sources":["../../../src/rules/common/operation-operationId-url-safe.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAM5D,eAAO,MAAM,kBAAkB,EAAE,QAAQ,GAAG,QAW3C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// eslint-disable-next-line no-useless-escape
|
|
2
|
+
const validUrlSymbols = /^[A-Za-z0-9-._~:/?#\[\]@!\$&'()*+,;=]*$/;
|
|
3
|
+
export const OperationIdUrlSafe = () => {
|
|
4
|
+
return {
|
|
5
|
+
Operation(operation, { report, location }) {
|
|
6
|
+
if (operation.operationId && !validUrlSymbols.test(operation.operationId)) {
|
|
7
|
+
report({
|
|
8
|
+
message: 'Operation `operationId` should not have URL invalid characters.',
|
|
9
|
+
location: location.child(['operationId']),
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=operation-operationId-url-safe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-operationId-url-safe.js","sourceRoot":"","sources":["../../../src/rules/common/operation-operationId-url-safe.ts"],"names":[],"mappings":"AAKA,6CAA6C;AAC7C,MAAM,eAAe,GAAG,yCAAyC,CAAC;AAElE,MAAM,CAAC,MAAM,kBAAkB,GAAwB,GAAG,EAAE;IAC1D,OAAO;QACL,SAAS,CAAC,SAAwC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAe;YACnF,IAAI,SAAS,CAAC,WAAW,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC1E,MAAM,CAAC;oBACL,OAAO,EAAE,iEAAiE;oBAC1E,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,CAAC;iBAC1C,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-operationId.d.ts","sourceRoot":"","sources":["../../../src/rules/common/operation-operationId.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI5D,eAAO,MAAM,oBAAoB,EAAE,QAAQ,GAAG,QAU7C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { validateDefinedAndNonEmpty } from '../utils.js';
|
|
2
|
+
export const OperationOperationId = () => {
|
|
3
|
+
return {
|
|
4
|
+
Root: {
|
|
5
|
+
PathItem: {
|
|
6
|
+
Operation(operation, ctx) {
|
|
7
|
+
validateDefinedAndNonEmpty('operationId', operation, ctx);
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=operation-operationId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-operationId.js","sourceRoot":"","sources":["../../../src/rules/common/operation-operationId.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,CAAC,MAAM,oBAAoB,GAAwB,GAAG,EAAE;IAC5D,OAAO;QACL,IAAI,EAAE;YACJ,QAAQ,EAAE;gBACR,SAAS,CAAC,SAAwC,EAAE,GAAgB;oBAClE,0BAA0B,CAAC,aAAa,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;gBAC5D,CAAC;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-parameters-unique.d.ts","sourceRoot":"","sources":["../../../src/rules/common/operation-parameters-unique.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG5D,eAAO,MAAM,yBAAyB,EAAE,QAAQ,GAAG,QA0ClD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const OperationParametersUnique = () => {
|
|
2
|
+
let seenPathParams;
|
|
3
|
+
let seenOperationParams;
|
|
4
|
+
return {
|
|
5
|
+
PathItem: {
|
|
6
|
+
enter() {
|
|
7
|
+
seenPathParams = new Set();
|
|
8
|
+
},
|
|
9
|
+
Parameter(parameter, { report, key, parentLocations }) {
|
|
10
|
+
const paramId = `${parameter.in}___${parameter.name}`;
|
|
11
|
+
if (seenPathParams.has(paramId)) {
|
|
12
|
+
report({
|
|
13
|
+
message: `Paths must have unique \`name\` + \`in\` parameters.\nRepeats of \`in:${parameter.in}\` + \`name:${parameter.name}\`.`,
|
|
14
|
+
location: parentLocations.PathItem.child(['parameters', key]),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
seenPathParams.add(`${parameter.in}___${parameter.name}`);
|
|
18
|
+
},
|
|
19
|
+
Operation: {
|
|
20
|
+
enter() {
|
|
21
|
+
seenOperationParams = new Set();
|
|
22
|
+
},
|
|
23
|
+
Parameter(parameter, { report, key, parentLocations }) {
|
|
24
|
+
const paramId = `${parameter.in}___${parameter.name}`;
|
|
25
|
+
if (seenOperationParams.has(paramId)) {
|
|
26
|
+
report({
|
|
27
|
+
message: `Operations must have unique \`name\` + \`in\` parameters. Repeats of \`in:${parameter.in}\` + \`name:${parameter.name}\`.`,
|
|
28
|
+
location: parentLocations.Operation.child(['parameters', key]),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
seenOperationParams.add(paramId);
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=operation-parameters-unique.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-parameters-unique.js","sourceRoot":"","sources":["../../../src/rules/common/operation-parameters-unique.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,yBAAyB,GAAwB,GAAG,EAAE;IACjE,IAAI,cAA2B,CAAC;IAChC,IAAI,mBAAgC,CAAC;IAErC,OAAO;QACL,QAAQ,EAAE;YACR,KAAK;gBACH,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;YAC7B,CAAC;YACD,SAAS,CACP,SAAwC,EACxC,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,EAAe;gBAE7C,MAAM,OAAO,GAAG,GAAG,SAAS,CAAC,EAAE,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;gBACtD,IAAI,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;oBAChC,MAAM,CAAC;wBACL,OAAO,EAAE,yEAAyE,SAAS,CAAC,EAAE,eAAe,SAAS,CAAC,IAAI,KAAK;wBAChI,QAAQ,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;qBAC9D,CAAC,CAAC;gBACL,CAAC;gBACD,cAAc,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,EAAE,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;YAC5D,CAAC;YACD,SAAS,EAAE;gBACT,KAAK;oBACH,mBAAmB,GAAG,IAAI,GAAG,EAAE,CAAC;gBAClC,CAAC;gBACD,SAAS,CACP,SAAwC,EACxC,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,EAAe;oBAE7C,MAAM,OAAO,GAAG,GAAG,SAAS,CAAC,EAAE,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;oBACtD,IAAI,mBAAmB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;wBACrC,MAAM,CAAC;4BACL,OAAO,EAAE,6EAA6E,SAAS,CAAC,EAAE,eAAe,SAAS,CAAC,IAAI,KAAK;4BACpI,QAAQ,EAAE,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;yBAC/D,CAAC,CAAC;oBACL,CAAC;oBACD,mBAAmB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACnC,CAAC;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-singular-tag.d.ts","sourceRoot":"","sources":["../../../src/rules/common/operation-singular-tag.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG5D,eAAO,MAAM,oBAAoB,EAAE,QAAQ,GAAG,QAW7C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const OperationSingularTag = () => {
|
|
2
|
+
return {
|
|
3
|
+
Operation(operation, { report, location }) {
|
|
4
|
+
if (operation.tags && operation.tags.length > 1) {
|
|
5
|
+
report({
|
|
6
|
+
message: 'Operation `tags` object should have only one tag.',
|
|
7
|
+
location: location.child(['tags']).key(),
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=operation-singular-tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-singular-tag.js","sourceRoot":"","sources":["../../../src/rules/common/operation-singular-tag.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,oBAAoB,GAAwB,GAAG,EAAE;IAC5D,OAAO;QACL,SAAS,CAAC,SAAwC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAe;YACnF,IAAI,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAChD,MAAM,CAAC;oBACL,OAAO,EAAE,mDAAmD;oBAC5D,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE;iBACzC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-summary.d.ts","sourceRoot":"","sources":["../../../src/rules/common/operation-summary.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI5D,eAAO,MAAM,gBAAgB,EAAE,QAAQ,GAAG,QAMzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-summary.js","sourceRoot":"","sources":["../../../src/rules/common/operation-summary.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,CAAC,MAAM,gBAAgB,GAAwB,GAAG,EAAE;IACxD,OAAO;QACL,SAAS,CAAC,SAAwC,EAAE,GAAgB;YAClE,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;QACxD,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-tag-defined.d.ts","sourceRoot":"","sources":["../../../src/rules/common/operation-tag-defined.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK5D,eAAO,MAAM,mBAAmB,EAAE,QAAQ,GAAG,QAyB5C,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const OperationTagDefined = () => {
|
|
2
|
+
let definedTags;
|
|
3
|
+
return {
|
|
4
|
+
Root(root) {
|
|
5
|
+
definedTags = new Set((root.tags ?? []).map((t) => t.name));
|
|
6
|
+
},
|
|
7
|
+
Operation(operation, { report, location }) {
|
|
8
|
+
if (operation?.tags) {
|
|
9
|
+
for (let i = 0; i < operation.tags.length; i++) {
|
|
10
|
+
if (!definedTags.has(operation.tags[i])) {
|
|
11
|
+
report({
|
|
12
|
+
message: `Operation tags should be defined in global tags.`,
|
|
13
|
+
location: location.child(['tags', i]),
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
report({
|
|
20
|
+
message: `Operation tags should be defined`,
|
|
21
|
+
location: location.key(),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=operation-tag-defined.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-tag-defined.js","sourceRoot":"","sources":["../../../src/rules/common/operation-tag-defined.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,mBAAmB,GAAwB,GAAG,EAAE;IAC3D,IAAI,WAAwB,CAAC;IAE7B,OAAO;QACL,IAAI,CAAC,IAAwC;YAC3C,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9D,CAAC;QACD,SAAS,CAAC,SAAwC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAe;YACnF,IAAI,SAAS,EAAE,IAAI,EAAE,CAAC;gBACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;oBAC/C,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;wBACxC,MAAM,CAAC;4BACL,OAAO,EAAE,kDAAkD;4BAC3D,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;yBACtC,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC;oBACL,OAAO,EAAE,kCAAkC;oBAC3C,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE;iBACzB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameter-description.d.ts","sourceRoot":"","sources":["../../../src/rules/common/parameter-description.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG5D,eAAO,MAAM,oBAAoB,EAAE,QAAQ,GAAG,QAgB7C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const ParameterDescription = () => {
|
|
2
|
+
return {
|
|
3
|
+
Parameter(parameter, { report, location }) {
|
|
4
|
+
if (parameter.description === undefined) {
|
|
5
|
+
report({
|
|
6
|
+
message: 'Parameter object description must be present.',
|
|
7
|
+
location: { reportOnKey: true },
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
else if (!parameter.description) {
|
|
11
|
+
report({
|
|
12
|
+
message: 'Parameter object description must be non-empty string.',
|
|
13
|
+
location: location.child(['description']),
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=parameter-description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameter-description.js","sourceRoot":"","sources":["../../../src/rules/common/parameter-description.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,oBAAoB,GAAwB,GAAG,EAAE;IAC5D,OAAO;QACL,SAAS,CAAC,SAAwC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAe;YACnF,IAAI,SAAS,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;gBACxC,MAAM,CAAC;oBACL,OAAO,EAAE,+CAA+C;oBACxD,QAAQ,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;iBAChC,CAAC,CAAC;YACL,CAAC;iBAAM,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;gBAClC,MAAM,CAAC;oBACL,OAAO,EAAE,wDAAwD;oBACjE,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,CAAC;iBAC1C,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-declaration-must-exist.d.ts","sourceRoot":"","sources":["../../../src/rules/common/path-declaration-must-exist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG5D,eAAO,MAAM,wBAAwB,EAAE,QAAQ,GAAG,QAWjD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const PathDeclarationMustExist = () => {
|
|
2
|
+
return {
|
|
3
|
+
PathItem(_path, { report, key }) {
|
|
4
|
+
if (key.indexOf('{}') !== -1) {
|
|
5
|
+
report({
|
|
6
|
+
message: 'Path parameter declarations must be non-empty. `{}` is invalid.',
|
|
7
|
+
location: { reportOnKey: true },
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=path-declaration-must-exist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-declaration-must-exist.js","sourceRoot":"","sources":["../../../src/rules/common/path-declaration-must-exist.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,wBAAwB,GAAwB,GAAG,EAAE;IAChE,OAAO;QACL,QAAQ,CAAC,KAAa,EAAE,EAAE,MAAM,EAAE,GAAG,EAAe;YAClD,IAAK,GAAc,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;gBACzC,MAAM,CAAC;oBACL,OAAO,EAAE,iEAAiE;oBAC1E,QAAQ,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;iBAChC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-http-verbs-order.d.ts","sourceRoot":"","sources":["../../../src/rules/common/path-http-verbs-order.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK5D,eAAO,MAAM,kBAAkB,EAAE,QAAQ,GAAG,QAsB3C,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const defaultOrder = ['get', 'head', 'post', 'put', 'patch', 'delete', 'options', 'query', 'trace'];
|
|
2
|
+
export const PathHttpVerbsOrder = (opts) => {
|
|
3
|
+
const order = (opts && opts.order) || defaultOrder;
|
|
4
|
+
if (!Array.isArray(order)) {
|
|
5
|
+
throw new Error('path-http-verbs-order `order` option must be an array');
|
|
6
|
+
}
|
|
7
|
+
return {
|
|
8
|
+
PathItem(path, { report, location }) {
|
|
9
|
+
const httpVerbs = Object.keys(path).filter((k) => order.includes(k));
|
|
10
|
+
for (let i = 0; i < httpVerbs.length - 1; i++) {
|
|
11
|
+
const aIdx = order.indexOf(httpVerbs[i]);
|
|
12
|
+
const bIdx = order.indexOf(httpVerbs[i + 1]);
|
|
13
|
+
if (bIdx < aIdx) {
|
|
14
|
+
report({
|
|
15
|
+
message: 'Operation http verbs must be ordered.',
|
|
16
|
+
location: { reportOnKey: true, ...location.child(httpVerbs[i + 1]) },
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=path-http-verbs-order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-http-verbs-order.js","sourceRoot":"","sources":["../../../src/rules/common/path-http-verbs-order.ts"],"names":[],"mappings":"AAKA,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAEpG,MAAM,CAAC,MAAM,kBAAkB,GAAwB,CAAC,IAAS,EAAE,EAAE;IACnE,MAAM,KAAK,GAAa,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC;IAC7D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IAED,OAAO;QACL,QAAQ,CAAC,IAAiC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAe;YAC3E,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YAErE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;gBACzC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC7C,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;oBAChB,MAAM,CAAC;wBACL,OAAO,EAAE,uCAAuC;wBAChD,QAAQ,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;qBACrE,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-not-include-query.d.ts","sourceRoot":"","sources":["../../../src/rules/common/path-not-include-query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG5D,eAAO,MAAM,mBAAmB,EAAE,QAAQ,GAAG,QAa5C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const PathNotIncludeQuery = () => {
|
|
2
|
+
return {
|
|
3
|
+
Paths: {
|
|
4
|
+
PathItem(_operation, { report, key }) {
|
|
5
|
+
if (key.toString().includes('?')) {
|
|
6
|
+
report({
|
|
7
|
+
message: `Don't put query string items in the path, they belong in parameters with \`in: query\`.`,
|
|
8
|
+
location: { reportOnKey: true },
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=path-not-include-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-not-include-query.js","sourceRoot":"","sources":["../../../src/rules/common/path-not-include-query.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,mBAAmB,GAAwB,GAAG,EAAE;IAC3D,OAAO;QACL,KAAK,EAAE;YACL,QAAQ,CAAC,UAAkB,EAAE,EAAE,MAAM,EAAE,GAAG,EAAe;gBACvD,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;oBACjC,MAAM,CAAC;wBACL,OAAO,EAAE,yFAAyF;wBAClG,QAAQ,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;qBAChC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-params-defined.d.ts","sourceRoot":"","sources":["../../../src/rules/common/path-params-defined.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAYjE,eAAO,MAAM,iBAAiB,EAAE,QAAQ,GAAG,QAqB1C,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { isPlainObject } from '../../utils/is-plain-object.js';
|
|
2
|
+
const pathRegex = /\{([a-zA-Z0-9_.-]+)\}+/g;
|
|
3
|
+
const MAX_DEPTH = 2; // Only first callback level is supported
|
|
4
|
+
export const PathParamsDefined = () => {
|
|
5
|
+
const pathContext = { current: null };
|
|
6
|
+
const currentOperationParams = new Set();
|
|
7
|
+
return {
|
|
8
|
+
PathItem: {
|
|
9
|
+
enter(_, { key }) {
|
|
10
|
+
pathItemEnter(pathContext, key);
|
|
11
|
+
},
|
|
12
|
+
leave() {
|
|
13
|
+
pathItemLeave(pathContext);
|
|
14
|
+
},
|
|
15
|
+
Parameter(parameter, { report, location, rawLocation }) {
|
|
16
|
+
createPathItemParameterHandler({ parameter, pathContext, report, location, rawLocation });
|
|
17
|
+
},
|
|
18
|
+
Operation: createOperationHandlers(pathContext, currentOperationParams),
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
const pathItemEnter = (pathContext, key) => {
|
|
23
|
+
pathContext.current = {
|
|
24
|
+
path: key,
|
|
25
|
+
templateParams: extractTemplateParams(key),
|
|
26
|
+
definedParams: new Set(),
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
const pathItemLeave = (pathContext) => {
|
|
30
|
+
pathContext.current = null;
|
|
31
|
+
};
|
|
32
|
+
const createPathItemParameterHandler = ({ parameter, pathContext, report, location, rawLocation, }) => {
|
|
33
|
+
if (parameter.in === 'path' && parameter.name && pathContext.current) {
|
|
34
|
+
pathContext.current.definedParams.add(parameter.name);
|
|
35
|
+
validatePathParameter({
|
|
36
|
+
paramName: parameter.name,
|
|
37
|
+
templateParams: pathContext.current.templateParams,
|
|
38
|
+
path: pathContext.current.path,
|
|
39
|
+
report,
|
|
40
|
+
location,
|
|
41
|
+
rawLocation,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const createOperationHandlers = (pathContext, currentOperationParams, depth = 0) => {
|
|
46
|
+
const reportMaxDepthWarning = (report, location, depth) => {
|
|
47
|
+
report({
|
|
48
|
+
message: `Maximum callback nesting depth (${depth}) reached. Path parameter validation is limited beyond this depth to prevent infinite recursion.`,
|
|
49
|
+
location: location,
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
if (depth >= MAX_DEPTH) {
|
|
53
|
+
return {
|
|
54
|
+
enter: () => { },
|
|
55
|
+
leave: (_op, { report, location }) => {
|
|
56
|
+
reportMaxDepthWarning(report, location, depth);
|
|
57
|
+
},
|
|
58
|
+
Parameter: () => { },
|
|
59
|
+
Callback: undefined,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
const createCallbackPathItem = () => {
|
|
63
|
+
let parentPathContext = null;
|
|
64
|
+
return {
|
|
65
|
+
enter(_, { key }) {
|
|
66
|
+
parentPathContext = pathContext.current;
|
|
67
|
+
pathItemEnter(pathContext, key);
|
|
68
|
+
},
|
|
69
|
+
leave() {
|
|
70
|
+
pathContext.current = parentPathContext;
|
|
71
|
+
},
|
|
72
|
+
Parameter(parameter, { report, location, rawLocation }) {
|
|
73
|
+
createPathItemParameterHandler({ parameter, pathContext, report, location, rawLocation });
|
|
74
|
+
},
|
|
75
|
+
get Operation() {
|
|
76
|
+
return createOperationHandlers(pathContext, currentOperationParams, depth + 1);
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
return {
|
|
81
|
+
enter() {
|
|
82
|
+
currentOperationParams = new Set();
|
|
83
|
+
},
|
|
84
|
+
leave(_operation, { report, location }) {
|
|
85
|
+
if (!pathContext.current || !currentOperationParams)
|
|
86
|
+
return;
|
|
87
|
+
validateRequiredPathParams({
|
|
88
|
+
templateParams: pathContext.current.templateParams,
|
|
89
|
+
definedOperationParams: currentOperationParams,
|
|
90
|
+
definedPathParams: pathContext.current.definedParams,
|
|
91
|
+
path: pathContext.current.path,
|
|
92
|
+
report,
|
|
93
|
+
location,
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
Parameter(parameter, { report, location, rawLocation }) {
|
|
97
|
+
collectPathParamsFromOperation(parameter, currentOperationParams);
|
|
98
|
+
if (parameter.in === 'path' && parameter.name && pathContext.current) {
|
|
99
|
+
currentOperationParams.add(parameter.name);
|
|
100
|
+
validatePathParameter({
|
|
101
|
+
paramName: parameter.name,
|
|
102
|
+
templateParams: pathContext.current.templateParams,
|
|
103
|
+
path: pathContext.current.path,
|
|
104
|
+
report,
|
|
105
|
+
location,
|
|
106
|
+
rawLocation,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
Callback: {
|
|
111
|
+
get PathItem() {
|
|
112
|
+
return createCallbackPathItem();
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
const extractTemplateParams = (path) => {
|
|
118
|
+
return new Set(Array.from(path.matchAll(pathRegex)).map((m) => m[1]));
|
|
119
|
+
};
|
|
120
|
+
const collectPathParamsFromOperation = (parameter, targetSet) => {
|
|
121
|
+
if (isPlainObject(parameter) && 'in' in parameter && 'name' in parameter) {
|
|
122
|
+
if (parameter.in === 'path' && parameter.name) {
|
|
123
|
+
targetSet.add(parameter.name);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
const validatePathParameter = ({ paramName, templateParams, path, report, location, rawLocation, }) => {
|
|
128
|
+
if (!templateParams.has(paramName)) {
|
|
129
|
+
const message = `Path parameter \`${paramName}\` is not used in the path \`${path}\`.`;
|
|
130
|
+
const from = rawLocation === location ? undefined : rawLocation;
|
|
131
|
+
report({ message, location: location.child(['name']), from });
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const validateRequiredPathParams = ({ templateParams, definedOperationParams, definedPathParams, path, report, location, }) => {
|
|
135
|
+
const allDefinedParams = new Set([...definedOperationParams, ...definedPathParams]);
|
|
136
|
+
for (const templateParam of templateParams) {
|
|
137
|
+
if (!allDefinedParams.has(templateParam)) {
|
|
138
|
+
report({
|
|
139
|
+
message: `The operation does not define the path parameter \`{${templateParam}}\` expected by path \`${path}\`.`,
|
|
140
|
+
location: location.child(['parameters']).key(),
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=path-params-defined.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-params-defined.js","sourceRoot":"","sources":["../../../src/rules/common/path-params-defined.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,MAAM,SAAS,GAAG,yBAAyB,CAAC;AAC5C,MAAM,SAAS,GAAG,CAAC,CAAC,CAAC,yCAAyC;AAQ9D,MAAM,CAAC,MAAM,iBAAiB,GAAwB,GAAG,EAAE;IACzD,MAAM,WAAW,GAAG,EAAE,OAAO,EAAE,IAA0B,EAAE,CAAC;IAC5D,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAU,CAAC;IAEjD,OAAO;QACL,QAAQ,EAAE;YACR,KAAK,CAAC,CAAS,EAAE,EAAE,GAAG,EAAe;gBACnC,aAAa,CAAC,WAAW,EAAE,GAAa,CAAC,CAAC;YAC5C,CAAC;YACD,KAAK;gBACH,aAAa,CAAC,WAAW,CAAC,CAAC;YAC7B,CAAC;YACD,SAAS,CACP,SAAwC,EACxC,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAe;gBAE9C,8BAA8B,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;YAC5F,CAAC;YACD,SAAS,EAAE,uBAAuB,CAAC,WAAW,EAAE,sBAAsB,CAAC;SACxE;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,WAA4C,EAAE,GAAW,EAAE,EAAE;IAClF,WAAW,CAAC,OAAO,GAAG;QACpB,IAAI,EAAE,GAAG;QACT,cAAc,EAAE,qBAAqB,CAAC,GAAG,CAAC;QAC1C,aAAa,EAAE,IAAI,GAAG,EAAE;KACzB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,WAA4C,EAAE,EAAE;IACrE,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,8BAA8B,GAAG,CAAC,EACtC,SAAS,EACT,WAAW,EACX,MAAM,EACN,QAAQ,EACR,WAAW,GAOZ,EAAQ,EAAE;IACT,IAAI,SAAS,CAAC,EAAE,KAAK,MAAM,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACrE,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACtD,qBAAqB,CAAC;YACpB,SAAS,EAAE,SAAS,CAAC,IAAI;YACzB,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,cAAc;YAClD,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI;YAC9B,MAAM;YACN,QAAQ;YACR,WAAW;SACZ,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAC9B,WAA4C,EAC5C,sBAAmC,EACnC,KAAK,GAAG,CAAC,EACT,EAAE;IACF,MAAM,qBAAqB,GAAG,CAC5B,MAA6B,EAC7B,QAAiC,EACjC,KAAa,EACb,EAAE;QACF,MAAM,CAAC;YACL,OAAO,EAAE,mCAAmC,KAAK,kGAAkG;YACnJ,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;IACL,CAAC,CAAC;IACF,IAAI,KAAK,IAAI,SAAS,EAAE,CAAC;QACvB,OAAO;YACL,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC;YACf,KAAK,EAAE,CAAC,GAAY,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAe,EAAE,EAAE;gBACzD,qBAAqB,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;YACjD,CAAC;YACD,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;YACnB,QAAQ,EAAE,SAAS;SACpB,CAAC;IACJ,CAAC;IAED,MAAM,sBAAsB,GAAG,GAAG,EAAE;QAClC,IAAI,iBAAiB,GAAuB,IAAI,CAAC;QAEjD,OAAO;YACL,KAAK,CAAC,CAAS,EAAE,EAAE,GAAG,EAAe;gBACnC,iBAAiB,GAAG,WAAW,CAAC,OAAO,CAAC;gBACxC,aAAa,CAAC,WAAW,EAAE,GAAa,CAAC,CAAC;YAC5C,CAAC;YACD,KAAK;gBACH,WAAW,CAAC,OAAO,GAAG,iBAAiB,CAAC;YAC1C,CAAC;YACD,SAAS,CACP,SAAwC,EACxC,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAe;gBAE9C,8BAA8B,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;YAC5F,CAAC;YACD,IAAI,SAAS;gBACX,OAAO,uBAAuB,CAAC,WAAW,EAAE,sBAAsB,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;YACjF,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO;QACL,KAAK;YACH,sBAAsB,GAAG,IAAI,GAAG,EAAE,CAAC;QACrC,CAAC;QACD,KAAK,CAAC,UAAmB,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAe;YAC1D,IAAI,CAAC,WAAW,CAAC,OAAO,IAAI,CAAC,sBAAsB;gBAAE,OAAO;YAE5D,0BAA0B,CAAC;gBACzB,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,cAAc;gBAClD,sBAAsB,EAAE,sBAAsB;gBAC9C,iBAAiB,EAAE,WAAW,CAAC,OAAO,CAAC,aAAa;gBACpD,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI;gBAC9B,MAAM;gBACN,QAAQ;aACT,CAAC,CAAC;QACL,CAAC;QACD,SAAS,CACP,SAAwC,EACxC,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAe;YAE9C,8BAA8B,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC;YAElE,IAAI,SAAS,CAAC,EAAE,KAAK,MAAM,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;gBACrE,sBAAsB,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;gBAC3C,qBAAqB,CAAC;oBACpB,SAAS,EAAE,SAAS,CAAC,IAAI;oBACzB,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,cAAc;oBAClD,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI;oBAC9B,MAAM;oBACN,QAAQ;oBACR,WAAW;iBACZ,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,QAAQ,EAAE;YACR,IAAI,QAAQ;gBACV,OAAO,sBAAsB,EAAE,CAAC;YAClC,CAAC;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,IAAY,EAAe,EAAE;IAC1D,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACxE,CAAC,CAAC;AAEF,MAAM,8BAA8B,GAAG,CACrC,SAAwC,EACxC,SAAsB,EAChB,EAAE;IACR,IAAI,aAAa,CAAC,SAAS,CAAC,IAAI,IAAI,IAAI,SAAS,IAAI,MAAM,IAAI,SAAS,EAAE,CAAC;QACzE,IAAI,SAAS,CAAC,EAAE,KAAK,MAAM,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;YAC9C,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,EAC7B,SAAS,EACT,cAAc,EACd,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,WAAW,GAQZ,EAAQ,EAAE;IACT,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,oBAAoB,SAAS,gCAAgC,IAAI,KAAK,CAAC;QACvF,MAAM,IAAI,GAAG,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC;QAEhE,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,CAAC,EAClC,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,IAAI,EACJ,MAAM,EACN,QAAQ,GAQT,EAAQ,EAAE;IACT,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,sBAAsB,EAAE,GAAG,iBAAiB,CAAC,CAAC,CAAC;IAEpF,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE,CAAC;QAC3C,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;YACzC,MAAM,CAAC;gBACL,OAAO,EAAE,uDAAuD,aAAa,0BAA0B,IAAI,KAAK;gBAChH,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE;aAC/C,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
|