@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 @@
|
|
|
1
|
+
{"version":3,"file":"no-empty-servers.js","sourceRoot":"","sources":["../../../src/rules/oas3/no-empty-servers.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAa,GAAG,EAAE;IAC3C,OAAO;QACL,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;YAC7B,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC;gBACpC,MAAM,CAAC;oBACL,OAAO,EAAE,0BAA0B;oBACnC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE;iBAC5C,CAAC,CAAC;gBACH,OAAO;YACT,CAAC;YAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC9D,MAAM,CAAC;oBACL,OAAO,EAAE,oCAAoC;oBAC7C,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE;iBAC5C,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-example-value-and-externalValue.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/no-example-value-and-externalValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,eAAO,MAAM,8BAA8B,EAAE,QAW5C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const NoExampleValueAndExternalValue = () => {
|
|
2
|
+
return {
|
|
3
|
+
Example(example, { report, location }) {
|
|
4
|
+
if (example.value && example.externalValue) {
|
|
5
|
+
report({
|
|
6
|
+
message: 'Example object can have either `value` or `externalValue` fields.',
|
|
7
|
+
location: location.child(['value']).key(),
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=no-example-value-and-externalValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-example-value-and-externalValue.js","sourceRoot":"","sources":["../../../src/rules/oas3/no-example-value-and-externalValue.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,8BAA8B,GAAa,GAAG,EAAE;IAC3D,OAAO;QACL,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;YACnC,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;gBAC3C,MAAM,CAAC;oBACL,OAAO,EAAE,mEAAmE;oBAC5E,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE;iBAC1C,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-invalid-media-type-examples.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/no-invalid-media-type-examples.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIlD,eAAO,MAAM,oBAAoB,EAAE,QA+DlC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { isRef } from '../../ref-utils.js';
|
|
2
|
+
import { isDefined } from '../../utils/is-defined.js';
|
|
3
|
+
import { isPlainObject } from '../../utils/is-plain-object.js';
|
|
4
|
+
import { validateExample } from '../utils.js';
|
|
5
|
+
export const ValidContentExamples = (opts) => {
|
|
6
|
+
const skip = (mediaType) => {
|
|
7
|
+
return mediaType.schema === undefined;
|
|
8
|
+
};
|
|
9
|
+
const leave = (context) => (mediaType, ctx) => {
|
|
10
|
+
const { location, resolve } = ctx;
|
|
11
|
+
if (isDefined(mediaType.example)) {
|
|
12
|
+
resolveAndValidateExample(mediaType.example, location.child('example'));
|
|
13
|
+
}
|
|
14
|
+
else if (isPlainObject(mediaType.examples)) {
|
|
15
|
+
for (const exampleName of Object.keys(mediaType.examples)) {
|
|
16
|
+
resolveAndValidateExample(mediaType.examples[exampleName], location.child(['examples', exampleName, 'value']), true);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function resolveAndValidateExample(example, location, isMultiple) {
|
|
20
|
+
if (isRef(example)) {
|
|
21
|
+
const resolved = resolve(example);
|
|
22
|
+
if (!resolved.location)
|
|
23
|
+
return;
|
|
24
|
+
location = isMultiple ? resolved.location.child('value') : resolved.location;
|
|
25
|
+
example = resolved.node;
|
|
26
|
+
}
|
|
27
|
+
if (isMultiple && typeof example?.value === 'undefined') {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
validateExample(isMultiple ? example.value : example, mediaType.schema, {
|
|
31
|
+
location,
|
|
32
|
+
ctx,
|
|
33
|
+
allowAdditionalProperties: !!opts.allowAdditionalProperties,
|
|
34
|
+
ajvContext: context,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return {
|
|
39
|
+
Parameter: {
|
|
40
|
+
MediaType: {
|
|
41
|
+
skip,
|
|
42
|
+
leave: leave({ apiContext: 'request' }),
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
RequestBody: {
|
|
46
|
+
MediaType: {
|
|
47
|
+
skip,
|
|
48
|
+
leave: leave({ apiContext: 'request' }),
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
Response: {
|
|
52
|
+
MediaType: {
|
|
53
|
+
skip,
|
|
54
|
+
leave: leave({ apiContext: 'response' }),
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=no-invalid-media-type-examples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-invalid-media-type-examples.js","sourceRoot":"","sources":["../../../src/rules/oas3/no-invalid-media-type-examples.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,MAAM,oBAAoB,GAAa,CAAC,IAAI,EAAE,EAAE;IACrD,MAAM,IAAI,GAAG,CAAC,SAAwB,EAAE,EAAE;QACxC,OAAO,SAAS,CAAC,MAAM,KAAK,SAAS,CAAC;IACxC,CAAC,CAAC;IAEF,MAAM,KAAK,GAAG,CAAC,OAAmB,EAAE,EAAE,CAAC,CAAC,SAAwB,EAAE,GAAgB,EAAE,EAAE;QACpF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC;QAElC,IAAI,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;YACjC,yBAAyB,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;QAC1E,CAAC;aAAM,IAAI,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7C,KAAK,MAAM,WAAW,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC1D,yBAAyB,CACvB,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,EAC/B,QAAQ,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,EAClD,IAAI,CACL,CAAC;YACJ,CAAC;QACH,CAAC;QAED,SAAS,yBAAyB,CAChC,OAA0B,EAC1B,QAAkB,EAClB,UAAoB;YAEpB,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;gBACnB,MAAM,QAAQ,GAAG,OAAO,CAAc,OAAO,CAAC,CAAC;gBAC/C,IAAI,CAAC,QAAQ,CAAC,QAAQ;oBAAE,OAAO;gBAC/B,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBAC7E,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC;YAC1B,CAAC;YACD,IAAI,UAAU,IAAI,OAAO,OAAO,EAAE,KAAK,KAAK,WAAW,EAAE,CAAC;gBACxD,OAAO;YACT,CAAC;YACD,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,MAAO,EAAE;gBACvE,QAAQ;gBACR,GAAG;gBACH,yBAAyB,EAAE,CAAC,CAAC,IAAI,CAAC,yBAAyB;gBAC3D,UAAU,EAAE,OAAO;aACpB,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACL,SAAS,EAAE;YACT,SAAS,EAAE;gBACT,IAAI;gBACJ,KAAK,EAAE,KAAK,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;aACxC;SACF;QACD,WAAW,EAAE;YACX,SAAS,EAAE;gBACT,IAAI;gBACJ,KAAK,EAAE,KAAK,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;aACxC;SACF;QACD,QAAQ,EAAE;YACR,SAAS,EAAE;gBACT,IAAI;gBACJ,KAAK,EAAE,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;aACzC;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-server-example.com.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/no-server-example.com.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,eAAO,MAAM,eAAe,EAAE,QAa7B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const NoServerExample = () => {
|
|
2
|
+
return {
|
|
3
|
+
Server(server, { report, location }) {
|
|
4
|
+
// eslint-disable-next-line no-useless-escape
|
|
5
|
+
const pattern = /^(.*[\/.])?(example\.com|localhost)([\/:?].*|$)/;
|
|
6
|
+
if (server.url && pattern.test(server.url)) {
|
|
7
|
+
report({
|
|
8
|
+
message: 'Server `url` should not point to example.com or localhost.',
|
|
9
|
+
location: location.child(['url']),
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=no-server-example.com.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-server-example.com.js","sourceRoot":"","sources":["../../../src/rules/oas3/no-server-example.com.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAa,GAAG,EAAE;IAC5C,OAAO;QACL,MAAM,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;YACjC,6CAA6C;YAC7C,MAAM,OAAO,GAAG,iDAAiD,CAAC;YAClE,IAAI,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC3C,MAAM,CAAC;oBACL,OAAO,EAAE,4DAA4D;oBACrE,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;iBAClC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-server-trailing-slash.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/no-server-trailing-slash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,eAAO,MAAM,qBAAqB,EAAE,QAYnC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const NoServerTrailingSlash = () => {
|
|
2
|
+
return {
|
|
3
|
+
Server(server, { report, location }) {
|
|
4
|
+
if (!server.url)
|
|
5
|
+
return;
|
|
6
|
+
if (server.url.endsWith('/') && server.url !== '/') {
|
|
7
|
+
report({
|
|
8
|
+
message: 'Server `url` should not have a trailing slash.',
|
|
9
|
+
location: location.child(['url']),
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=no-server-trailing-slash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-server-trailing-slash.js","sourceRoot":"","sources":["../../../src/rules/oas3/no-server-trailing-slash.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAAa,GAAG,EAAE;IAClD,OAAO;QACL,MAAM,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;YACjC,IAAI,CAAC,MAAM,CAAC,GAAG;gBAAE,OAAO;YACxB,IAAI,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;gBACnD,MAAM,CAAC;oBACL,OAAO,EAAE,gDAAgD;oBACzD,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;iBAClC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-server-variables-empty-enum.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/no-server-variables-empty-enum.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIlD,eAAO,MAAM,0BAA0B,EAAE,QAoCxC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export const NoServerVariablesEmptyEnum = () => {
|
|
2
|
+
return {
|
|
3
|
+
Root(root, { report, location }) {
|
|
4
|
+
if (!root.servers || root.servers.length === 0)
|
|
5
|
+
return;
|
|
6
|
+
const invalidVariables = [];
|
|
7
|
+
if (Array.isArray(root.servers)) {
|
|
8
|
+
for (const server of root.servers) {
|
|
9
|
+
const enumErrors = checkEnumVariables(server);
|
|
10
|
+
if (!enumErrors)
|
|
11
|
+
continue;
|
|
12
|
+
invalidVariables.push(...enumErrors);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
const enumErrors = checkEnumVariables(root.servers);
|
|
17
|
+
if (!enumErrors)
|
|
18
|
+
return;
|
|
19
|
+
invalidVariables.push(...enumErrors);
|
|
20
|
+
}
|
|
21
|
+
for (const invalidVariable of invalidVariables) {
|
|
22
|
+
if (invalidVariable === 'empty') {
|
|
23
|
+
report({
|
|
24
|
+
message: 'Server variable with `enum` must be a non-empty array.',
|
|
25
|
+
location: location.child(['servers']).key(),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
if (invalidVariable === 'invalidDefaultValue') {
|
|
29
|
+
report({
|
|
30
|
+
message: 'Server variable define `enum` and `default`. `enum` must include default value',
|
|
31
|
+
location: location.child(['servers']).key(),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
function checkEnumVariables(server) {
|
|
39
|
+
if (server.variables && Object.keys(server.variables).length === 0)
|
|
40
|
+
return;
|
|
41
|
+
const errors = [];
|
|
42
|
+
for (const variable in server.variables) {
|
|
43
|
+
const serverVariable = server.variables[variable];
|
|
44
|
+
if (!serverVariable.enum)
|
|
45
|
+
continue;
|
|
46
|
+
if (Array.isArray(serverVariable.enum) && serverVariable.enum?.length === 0)
|
|
47
|
+
errors.push('empty');
|
|
48
|
+
if (!serverVariable.default)
|
|
49
|
+
continue;
|
|
50
|
+
const defaultValue = server.variables[variable].default;
|
|
51
|
+
if (serverVariable.enum && !serverVariable.enum.includes(defaultValue))
|
|
52
|
+
errors.push('invalidDefaultValue');
|
|
53
|
+
}
|
|
54
|
+
if (errors.length)
|
|
55
|
+
return errors;
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=no-server-variables-empty-enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-server-variables-empty-enum.js","sourceRoot":"","sources":["../../../src/rules/oas3/no-server-variables-empty-enum.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,0BAA0B,GAAa,GAAG,EAAE;IACvD,OAAO;QACL,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;YAC7B,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO;YAEvD,MAAM,gBAAgB,GAAgB,EAAE,CAAC;YAEzC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;gBAChC,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;oBAClC,MAAM,UAAU,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;oBAC9C,IAAI,CAAC,UAAU;wBAAE,SAAS;oBAC1B,gBAAgB,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;gBACvC,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,UAAU,GAAG,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACpD,IAAI,CAAC,UAAU;oBAAE,OAAO;gBACxB,gBAAgB,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;YACvC,CAAC;YAED,KAAK,MAAM,eAAe,IAAI,gBAAgB,EAAE,CAAC;gBAC/C,IAAI,eAAe,KAAK,OAAO,EAAE,CAAC;oBAChC,MAAM,CAAC;wBACL,OAAO,EAAE,wDAAwD;wBACjE,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE;qBAC5C,CAAC,CAAC;gBACL,CAAC;gBACD,IAAI,eAAe,KAAK,qBAAqB,EAAE,CAAC;oBAC9C,MAAM,CAAC;wBACL,OAAO,EACL,gFAAgF;wBAClF,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE;qBAC5C,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,kBAAkB,CAAC,MAAkB;IAC5C,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAE3E,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACxC,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAClD,IAAI,CAAC,cAAc,CAAC,IAAI;YAAE,SAAS;QAEnC,IAAI,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC;YACzE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEvB,IAAI,CAAC,cAAc,CAAC,OAAO;YAAE,SAAS;QAEtC,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC;QACxD,IAAI,cAAc,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;YACpE,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACvC,CAAC;IACD,IAAI,MAAM,CAAC,MAAM;QAAE,OAAO,MAAM,CAAC;IACjC,OAAO;AACT,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-undefined-server-variable.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/no-undefined-server-variable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,eAAO,MAAM,yBAAyB,EAAE,QA2BvC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const NoUndefinedServerVariable = () => {
|
|
2
|
+
return {
|
|
3
|
+
Server(server, { report, location }) {
|
|
4
|
+
if (!server?.url)
|
|
5
|
+
return;
|
|
6
|
+
const urlVariables = server.url.match(/{[^}]+}/g)?.map((e) => e.slice(1, e.length - 1)) || [];
|
|
7
|
+
const definedVariables = (server?.variables && Object.keys(server.variables)) || [];
|
|
8
|
+
for (const serverVar of urlVariables) {
|
|
9
|
+
if (!definedVariables.includes(serverVar)) {
|
|
10
|
+
report({
|
|
11
|
+
message: `The \`${serverVar}\` variable is not defined in the \`variables\` objects.`,
|
|
12
|
+
location: location.child(['url']),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
for (const definedServerVar of definedVariables) {
|
|
17
|
+
if (!urlVariables.includes(definedServerVar)) {
|
|
18
|
+
report({
|
|
19
|
+
message: `The \`${definedServerVar}\` variable is not used in the server's \`url\` field.`,
|
|
20
|
+
location: location.child(['variables', definedServerVar]).key(),
|
|
21
|
+
from: location.child('url'),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=no-undefined-server-variable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-undefined-server-variable.js","sourceRoot":"","sources":["../../../src/rules/oas3/no-undefined-server-variable.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,yBAAyB,GAAa,GAAG,EAAE;IACtD,OAAO;QACL,MAAM,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;YACjC,IAAI,CAAC,MAAM,EAAE,GAAG;gBAAE,OAAO;YACzB,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAC9F,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC;YAEpF,KAAK,MAAM,SAAS,IAAI,YAAY,EAAE,CAAC;gBACrC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;oBAC1C,MAAM,CAAC;wBACL,OAAO,EAAE,SAAS,SAAS,0DAA0D;wBACrF,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;qBAClC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAED,KAAK,MAAM,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;gBAChD,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;oBAC7C,MAAM,CAAC;wBACL,OAAO,EAAE,SAAS,gBAAgB,wDAAwD;wBAC1F,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,EAAE;wBAC/D,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;qBAC5B,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unused-components.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/no-unused-components.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,eAAO,MAAM,kBAAkB,EAAE,QAoFhC,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export const NoUnusedComponents = () => {
|
|
2
|
+
const components = new Map();
|
|
3
|
+
function registerComponent(location, name) {
|
|
4
|
+
components.set(location.absolutePointer, {
|
|
5
|
+
used: components.get(location.absolutePointer)?.used || false,
|
|
6
|
+
location,
|
|
7
|
+
name,
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
return {
|
|
11
|
+
ref(ref, { type, resolve, key, location }) {
|
|
12
|
+
if ([
|
|
13
|
+
'Schema',
|
|
14
|
+
'Header',
|
|
15
|
+
'Parameter',
|
|
16
|
+
'Response',
|
|
17
|
+
'Example',
|
|
18
|
+
'RequestBody',
|
|
19
|
+
'MediaTypesMap',
|
|
20
|
+
].includes(type.name)) {
|
|
21
|
+
const resolvedRef = resolve(ref);
|
|
22
|
+
if (!resolvedRef.location)
|
|
23
|
+
return;
|
|
24
|
+
components.set(resolvedRef.location.absolutePointer, {
|
|
25
|
+
used: true,
|
|
26
|
+
name: key.toString(),
|
|
27
|
+
location,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
Root: {
|
|
32
|
+
leave(_, { report }) {
|
|
33
|
+
components.forEach((usageInfo) => {
|
|
34
|
+
if (!usageInfo.used) {
|
|
35
|
+
report({
|
|
36
|
+
message: `Component: "${usageInfo.name}" is never used.`,
|
|
37
|
+
location: usageInfo.location.key(),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
NamedSchemas: {
|
|
44
|
+
Schema(schema, { location, key }) {
|
|
45
|
+
if (!schema.allOf) {
|
|
46
|
+
// FIXME: find a better way to detect possible discriminator
|
|
47
|
+
registerComponent(location, key.toString());
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
NamedParameters: {
|
|
52
|
+
Parameter(_parameter, { location, key }) {
|
|
53
|
+
registerComponent(location, key.toString());
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
NamedResponses: {
|
|
57
|
+
Response(_response, { location, key }) {
|
|
58
|
+
registerComponent(location, key.toString());
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
NamedExamples: {
|
|
62
|
+
Example(_example, { location, key }) {
|
|
63
|
+
registerComponent(location, key.toString());
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
NamedRequestBodies: {
|
|
67
|
+
RequestBody(_requestBody, { location, key }) {
|
|
68
|
+
registerComponent(location, key.toString());
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
NamedHeaders: {
|
|
72
|
+
Header(_header, { location, key }) {
|
|
73
|
+
registerComponent(location, key.toString());
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
NamedMediaTypes: {
|
|
77
|
+
MediaTypesMap(_mediaTypesMap, { location, key }) {
|
|
78
|
+
registerComponent(location, key.toString());
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=no-unused-components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unused-components.js","sourceRoot":"","sources":["../../../src/rules/oas3/no-unused-components.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,kBAAkB,GAAa,GAAG,EAAE;IAC/C,MAAM,UAAU,GAAG,IAAI,GAAG,EAA+D,CAAC;IAE1F,SAAS,iBAAiB,CAAC,QAAkB,EAAE,IAAY;QACzD,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,EAAE;YACvC,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,IAAI,IAAI,KAAK;YAC7D,QAAQ;YACR,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,GAAG,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE;YACvC,IACE;gBACE,QAAQ;gBACR,QAAQ;gBACR,WAAW;gBACX,UAAU;gBACV,SAAS;gBACT,aAAa;gBACb,eAAe;aAChB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EACrB,CAAC;gBACD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;gBACjC,IAAI,CAAC,WAAW,CAAC,QAAQ;oBAAE,OAAO;gBAClC,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,eAAe,EAAE;oBACnD,IAAI,EAAE,IAAI;oBACV,IAAI,EAAE,GAAG,CAAC,QAAQ,EAAE;oBACpB,QAAQ;iBACT,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,IAAI,EAAE;YACJ,KAAK,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE;gBACjB,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;oBAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;wBACpB,MAAM,CAAC;4BACL,OAAO,EAAE,eAAe,SAAS,CAAC,IAAI,kBAAkB;4BACxD,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE;yBACnC,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;SACF;QACD,YAAY,EAAE;YACZ,MAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;gBAC9B,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;oBAClB,4DAA4D;oBAC5D,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAC9C,CAAC;YACH,CAAC;SACF;QACD,eAAe,EAAE;YACf,SAAS,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;gBACrC,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC9C,CAAC;SACF;QACD,cAAc,EAAE;YACd,QAAQ,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;gBACnC,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC9C,CAAC;SACF;QACD,aAAa,EAAE;YACb,OAAO,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;gBACjC,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC9C,CAAC;SACF;QACD,kBAAkB,EAAE;YAClB,WAAW,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;gBACzC,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC9C,CAAC;SACF;QACD,YAAY,EAAE;YACZ,MAAM,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;gBAC/B,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC9C,CAAC;SACF;QACD,eAAe,EAAE;YACf,aAAa,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;gBAC7C,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC9C,CAAC;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nullable-type-sibling.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/nullable-type-sibling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAe,MAAM,mBAAmB,CAAC;AAE/D,eAAO,MAAM,mBAAmB,EAAE,QAajC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const NullableTypeSibling = () => {
|
|
2
|
+
return {
|
|
3
|
+
Schema: {
|
|
4
|
+
leave(schema, ctx) {
|
|
5
|
+
if ('nullable' in schema && !('type' in schema)) {
|
|
6
|
+
ctx.report({
|
|
7
|
+
message: `The \`type\` field must be defined when the \`nullable\` field is used.`,
|
|
8
|
+
location: ctx.location.child(['nullable']),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=nullable-type-sibling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nullable-type-sibling.js","sourceRoot":"","sources":["../../../src/rules/oas3/nullable-type-sibling.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAa,GAAgB,EAAE;IAC7D,OAAO;QACL,MAAM,EAAE;YACN,KAAK,CAAC,MAAM,EAAE,GAAG;gBACf,IAAI,UAAU,IAAI,MAAM,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,EAAE,CAAC;oBAChD,GAAG,CAAC,MAAM,CAAC;wBACT,OAAO,EAAE,yEAAyE;wBAClF,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;qBAC3C,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Oas3Rule } from '../../visitors.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validation according to rfc7807 - https://datatracker.ietf.org/doc/html/rfc7807
|
|
4
|
+
*/
|
|
5
|
+
export declare const Operation4xxProblemDetailsRfc7807: Oas3Rule;
|
|
6
|
+
//# sourceMappingURL=operation-4xx-problem-details-rfc7807.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-4xx-problem-details-rfc7807.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/operation-4xx-problem-details-rfc7807.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIlD;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,QA2B/C,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { validateDefinedAndNonEmpty } from '../utils.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validation according to rfc7807 - https://datatracker.ietf.org/doc/html/rfc7807
|
|
4
|
+
*/
|
|
5
|
+
export const Operation4xxProblemDetailsRfc7807 = () => {
|
|
6
|
+
return {
|
|
7
|
+
Response: {
|
|
8
|
+
skip(_, key) {
|
|
9
|
+
return !/4[Xx0-9]{2}/.test(`${key}`);
|
|
10
|
+
},
|
|
11
|
+
enter(response, { report, location }) {
|
|
12
|
+
if (!response.content || !response.content['application/problem+json'])
|
|
13
|
+
report({
|
|
14
|
+
message: 'Response `4xx` must have content-type `application/problem+json`.',
|
|
15
|
+
location: location.key(),
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
MediaType: {
|
|
19
|
+
skip(_, key) {
|
|
20
|
+
return key !== 'application/problem+json';
|
|
21
|
+
},
|
|
22
|
+
enter(media, ctx) {
|
|
23
|
+
validateDefinedAndNonEmpty('schema', media, ctx);
|
|
24
|
+
},
|
|
25
|
+
SchemaProperties(schema, ctx) {
|
|
26
|
+
validateDefinedAndNonEmpty('type', schema, ctx);
|
|
27
|
+
validateDefinedAndNonEmpty('title', schema, ctx);
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=operation-4xx-problem-details-rfc7807.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-4xx-problem-details-rfc7807.js","sourceRoot":"","sources":["../../../src/rules/oas3/operation-4xx-problem-details-rfc7807.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAa,GAAG,EAAE;IAC9D,OAAO;QACL,QAAQ,EAAE;YACR,IAAI,CAAC,CAAC,EAAE,GAAoB;gBAC1B,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;YACvC,CAAC;YACD,KAAK,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAe;gBAC/C,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,0BAA0B,CAAC;oBACpE,MAAM,CAAC;wBACL,OAAO,EAAE,mEAAmE;wBAC5E,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE;qBACzB,CAAC,CAAC;YACP,CAAC;YACD,SAAS,EAAE;gBACT,IAAI,CAAC,CAAC,EAAE,GAAoB;oBAC1B,OAAO,GAAG,KAAK,0BAA0B,CAAC;gBAC5C,CAAC;gBACD,KAAK,CAAC,KAAK,EAAE,GAAgB;oBAC3B,0BAA0B,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;gBACnD,CAAC;gBACD,gBAAgB,CAAC,MAAM,EAAE,GAAgB;oBACvC,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;oBAChD,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;gBACnD,CAAC;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-mime-type.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/request-mime-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,eAAO,MAAM,eAAe,EAAE,QAyB7B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { validateMimeTypeOAS3 } from '../../utils/validate-mime-type.js';
|
|
2
|
+
export const RequestMimeType = ({ allowedValues }) => {
|
|
3
|
+
return {
|
|
4
|
+
Paths: {
|
|
5
|
+
RequestBody: {
|
|
6
|
+
leave(requestBody, ctx) {
|
|
7
|
+
validateMimeTypeOAS3({ type: 'consumes', value: requestBody }, ctx, allowedValues);
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
Callback: {
|
|
11
|
+
RequestBody() { },
|
|
12
|
+
Response: {
|
|
13
|
+
leave(response, ctx) {
|
|
14
|
+
validateMimeTypeOAS3({ type: 'consumes', value: response }, ctx, allowedValues);
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
WebhooksMap: {
|
|
20
|
+
Response: {
|
|
21
|
+
leave(response, ctx) {
|
|
22
|
+
validateMimeTypeOAS3({ type: 'consumes', value: response }, ctx, allowedValues);
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=request-mime-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-mime-type.js","sourceRoot":"","sources":["../../../src/rules/oas3/request-mime-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAIzE,MAAM,CAAC,MAAM,eAAe,GAAa,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE;IAC7D,OAAO;QACL,KAAK,EAAE;YACL,WAAW,EAAE;gBACX,KAAK,CAAC,WAAW,EAAE,GAAgB;oBACjC,oBAAoB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC;gBACrF,CAAC;aACF;YACD,QAAQ,EAAE;gBACR,WAAW,KAAI,CAAC;gBAChB,QAAQ,EAAE;oBACR,KAAK,CAAC,QAAQ,EAAE,GAAgB;wBAC9B,oBAAoB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC;oBAClF,CAAC;iBACF;aACF;SACF;QACD,WAAW,EAAE;YACX,QAAQ,EAAE;gBACR,KAAK,CAAC,QAAQ,EAAE,GAAgB;oBAC9B,oBAAoB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC;gBAClF,CAAC;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-contains-property.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/response-contains-property.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,eAAO,MAAM,wBAAwB,EAAE,QAiCtC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getMatchingStatusCodeRange } from '../../utils/get-matching-status-code-range.js';
|
|
2
|
+
export const ResponseContainsProperty = (options) => {
|
|
3
|
+
const names = options.names || {};
|
|
4
|
+
let key;
|
|
5
|
+
return {
|
|
6
|
+
Operation: {
|
|
7
|
+
Response: {
|
|
8
|
+
skip: (_response, key) => {
|
|
9
|
+
return `${key}` === '204';
|
|
10
|
+
},
|
|
11
|
+
enter: (_response, ctx) => {
|
|
12
|
+
key = ctx.key;
|
|
13
|
+
},
|
|
14
|
+
MediaType: {
|
|
15
|
+
Schema(schema, { report, location }) {
|
|
16
|
+
if (schema.type !== 'object')
|
|
17
|
+
return;
|
|
18
|
+
const expectedProperties = names[key] ||
|
|
19
|
+
names[getMatchingStatusCodeRange(key)] ||
|
|
20
|
+
names[getMatchingStatusCodeRange(key).toLowerCase()] ||
|
|
21
|
+
[];
|
|
22
|
+
for (const expectedProperty of expectedProperties) {
|
|
23
|
+
if (!schema.properties?.[expectedProperty]) {
|
|
24
|
+
report({
|
|
25
|
+
message: `Response object must contain a top-level "${expectedProperty}" property.`,
|
|
26
|
+
location: location.child('properties').key(),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=response-contains-property.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-contains-property.js","sourceRoot":"","sources":["../../../src/rules/oas3/response-contains-property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAI3F,MAAM,CAAC,MAAM,wBAAwB,GAAa,CAAC,OAAO,EAAE,EAAE;IAC5D,MAAM,KAAK,GAA6B,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;IAC5D,IAAI,GAAoB,CAAC;IACzB,OAAO;QACL,SAAS,EAAE;YACT,QAAQ,EAAE;gBACR,IAAI,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE;oBACvB,OAAO,GAAG,GAAG,EAAE,KAAK,KAAK,CAAC;gBAC5B,CAAC;gBACD,KAAK,EAAE,CAAC,SAAS,EAAE,GAAgB,EAAE,EAAE;oBACrC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;gBAChB,CAAC;gBACD,SAAS,EAAE;oBACT,MAAM,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;wBACjC,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ;4BAAE,OAAO;wBACrC,MAAM,kBAAkB,GACtB,KAAK,CAAC,GAAG,CAAC;4BACV,KAAK,CAAC,0BAA0B,CAAC,GAAG,CAAC,CAAC;4BACtC,KAAK,CAAC,0BAA0B,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;4BACpD,EAAE,CAAC;wBACL,KAAK,MAAM,gBAAgB,IAAI,kBAAkB,EAAE,CAAC;4BAClD,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,gBAAgB,CAAC,EAAE,CAAC;gCAC3C,MAAM,CAAC;oCACL,OAAO,EAAE,6CAA6C,gBAAgB,aAAa;oCACnF,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE;iCAC7C,CAAC,CAAC;4BACL,CAAC;wBACH,CAAC;oBACH,CAAC;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-mime-type.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/response-mime-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,eAAO,MAAM,gBAAgB,EAAE,QAyB9B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { validateMimeTypeOAS3 } from '../../utils/validate-mime-type.js';
|
|
2
|
+
export const ResponseMimeType = ({ allowedValues }) => {
|
|
3
|
+
return {
|
|
4
|
+
Paths: {
|
|
5
|
+
Response: {
|
|
6
|
+
leave(response, ctx) {
|
|
7
|
+
validateMimeTypeOAS3({ type: 'produces', value: response }, ctx, allowedValues);
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
Callback: {
|
|
11
|
+
Response() { },
|
|
12
|
+
RequestBody: {
|
|
13
|
+
leave(requestBody, ctx) {
|
|
14
|
+
validateMimeTypeOAS3({ type: 'produces', value: requestBody }, ctx, allowedValues);
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
WebhooksMap: {
|
|
20
|
+
RequestBody: {
|
|
21
|
+
leave(requestBody, ctx) {
|
|
22
|
+
validateMimeTypeOAS3({ type: 'produces', value: requestBody }, ctx, allowedValues);
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=response-mime-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-mime-type.js","sourceRoot":"","sources":["../../../src/rules/oas3/response-mime-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAIzE,MAAM,CAAC,MAAM,gBAAgB,GAAa,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE;IAC9D,OAAO;QACL,KAAK,EAAE;YACL,QAAQ,EAAE;gBACR,KAAK,CAAC,QAAQ,EAAE,GAAgB;oBAC9B,oBAAoB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC;gBAClF,CAAC;aACF;YACD,QAAQ,EAAE;gBACR,QAAQ,KAAI,CAAC;gBACb,WAAW,EAAE;oBACX,KAAK,CAAC,WAAW,EAAE,GAAgB;wBACjC,oBAAoB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC;oBACrF,CAAC;iBACF;aACF;SACF;QACD,WAAW,EAAE;YACX,WAAW,EAAE;gBACX,KAAK,CAAC,WAAW,EAAE,GAAgB;oBACjC,oBAAoB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC;gBACrF,CAAC;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-components-invalid-map-name.d.ts","sourceRoot":"","sources":["../../../src/rules/oas3/spec-components-invalid-map-name.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,eAAO,MAAM,4BAA4B,EAAE,QAgE1C,CAAC"}
|