@redocly/openapi-core 0.0.0-snapshot.1744362365 → 0.0.0-snapshot.1744801622
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/lib/benchmark/benches/lint-with-many-rules.bench.d.ts +1 -2
- package/lib/benchmark/benches/lint-with-many-rules.bench.js +19 -17
- package/lib/benchmark/benches/lint-with-nested-rule.bench.d.ts +1 -2
- package/lib/benchmark/benches/lint-with-nested-rule.bench.js +19 -15
- package/lib/benchmark/benches/lint-with-no-rules.bench.d.ts +1 -2
- package/lib/benchmark/benches/lint-with-no-rules.bench.js +19 -15
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.d.ts +1 -2
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.js +19 -15
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.d.ts +1 -2
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.js +19 -15
- package/lib/benchmark/benches/recommended-oas3.bench.d.ts +1 -2
- package/lib/benchmark/benches/recommended-oas3.bench.js +18 -15
- package/lib/benchmark/benches/resolve-with-no-external.bench.d.ts +1 -2
- package/lib/benchmark/benches/resolve-with-no-external.bench.js +17 -14
- package/lib/benchmark/utils.d.ts +4 -5
- package/lib/benchmark/utils.js +14 -11
- package/lib/bundle.d.ts +9 -8
- package/lib/bundle.js +84 -72
- package/lib/config/all.d.ts +1 -2
- package/lib/config/all.js +3 -2
- package/lib/config/builtIn.d.ts +1 -2
- package/lib/config/builtIn.js +49 -44
- package/lib/config/config-resolvers.d.ts +5 -6
- package/lib/config/config-resolvers.js +94 -85
- package/lib/config/config.d.ts +8 -6
- package/lib/config/config.js +73 -66
- package/lib/config/index.d.ts +7 -8
- package/lib/config/index.js +23 -8
- package/lib/config/load.d.ts +8 -5
- package/lib/config/load.js +73 -28
- package/lib/config/minimal.d.ts +1 -2
- package/lib/config/minimal.js +3 -2
- package/lib/config/recommended-strict.d.ts +1 -2
- package/lib/config/recommended-strict.js +3 -2
- package/lib/config/recommended.d.ts +1 -2
- package/lib/config/recommended.js +3 -2
- package/lib/config/rules.d.ts +3 -4
- package/lib/config/rules.js +6 -4
- package/lib/config/spec.d.ts +1 -2
- package/lib/config/spec.js +3 -2
- package/lib/config/types.d.ts +13 -6
- package/lib/config/types.js +2 -2
- package/lib/config/utils.d.ts +2 -3
- package/lib/config/utils.js +89 -75
- package/lib/decorators/arazzo/index.d.ts +0 -1
- package/lib/decorators/arazzo/index.js +4 -2
- package/lib/decorators/async2/index.d.ts +0 -1
- package/lib/decorators/async2/index.js +4 -2
- package/lib/decorators/async3/index.d.ts +0 -1
- package/lib/decorators/async3/index.js +4 -2
- package/lib/decorators/common/filters/filter-helper.d.ts +1 -2
- package/lib/decorators/common/filters/filter-helper.js +12 -9
- package/lib/decorators/common/filters/filter-in.d.ts +1 -2
- package/lib/decorators/common/filters/filter-in.js +8 -5
- package/lib/decorators/common/filters/filter-out.d.ts +1 -2
- package/lib/decorators/common/filters/filter-out.js +8 -5
- package/lib/decorators/common/info-description-override.d.ts +1 -2
- package/lib/decorators/common/info-description-override.js +7 -4
- package/lib/decorators/common/info-override.d.ts +1 -2
- package/lib/decorators/common/info-override.js +5 -2
- package/lib/decorators/common/media-type-examples-override.d.ts +1 -2
- package/lib/decorators/common/media-type-examples-override.js +10 -7
- package/lib/decorators/common/operation-description-override.d.ts +1 -2
- package/lib/decorators/common/operation-description-override.js +7 -4
- package/lib/decorators/common/registry-dependencies.d.ts +2 -0
- package/lib/decorators/common/registry-dependencies.js +24 -0
- package/lib/decorators/common/remove-x-internal.d.ts +1 -2
- package/lib/decorators/common/remove-x-internal.js +14 -11
- package/lib/decorators/common/tag-description-override.d.ts +1 -2
- package/lib/decorators/common/tag-description-override.js +7 -4
- package/lib/decorators/oas2/index.d.ts +2 -2
- package/lib/decorators/oas2/index.js +20 -16
- package/lib/decorators/oas2/remove-unused-components.d.ts +1 -2
- package/lib/decorators/oas2/remove-unused-components.js +7 -4
- package/lib/decorators/oas3/index.d.ts +2 -2
- package/lib/decorators/oas3/index.js +22 -18
- package/lib/decorators/oas3/remove-unused-components.d.ts +1 -2
- package/lib/decorators/oas3/remove-unused-components.js +8 -5
- package/lib/decorators/overlay1/index.d.ts +0 -1
- package/lib/decorators/overlay1/index.js +4 -2
- package/lib/env.d.ts +0 -1
- package/lib/env.js +5 -3
- package/lib/format/codeframes.d.ts +1 -2
- package/lib/format/codeframes.js +19 -15
- package/lib/format/format.d.ts +1 -2
- package/lib/format/format.js +62 -57
- package/lib/index.d.ts +26 -29
- package/lib/index.js +98 -24
- package/lib/js-yaml/index.d.ts +0 -1
- package/lib/js-yaml/index.js +11 -7
- package/lib/lint.d.ts +10 -11
- package/lib/lint.js +44 -39
- package/lib/logger.d.ts +1 -2
- package/lib/logger.js +17 -15
- package/lib/oas-types.d.ts +3 -4
- package/lib/oas-types.js +32 -27
- package/lib/output.d.ts +3 -0
- package/lib/output.js +9 -0
- package/lib/redocly/domains.d.ts +14 -0
- package/lib/redocly/domains.js +41 -0
- package/lib/redocly/index.d.ts +30 -0
- package/lib/redocly/index.js +131 -0
- package/lib/redocly/redocly-client-types.d.ts +8 -0
- package/lib/redocly/redocly-client-types.js +2 -0
- package/lib/redocly/registry-api-types.d.ts +29 -0
- package/lib/redocly/registry-api-types.js +2 -0
- package/lib/redocly/registry-api.d.ts +17 -0
- package/lib/redocly/registry-api.js +100 -0
- package/lib/ref-utils.d.ts +2 -3
- package/lib/ref-utils.js +33 -18
- package/lib/resolve.d.ts +2 -3
- package/lib/resolve.js +45 -36
- package/lib/rules/ajv.d.ts +3 -4
- package/lib/rules/ajv.js +10 -7
- package/lib/rules/arazzo/criteria-unique.d.ts +1 -2
- package/lib/rules/arazzo/criteria-unique.js +5 -2
- package/lib/rules/arazzo/index.d.ts +1 -2
- package/lib/rules/arazzo/index.js +35 -33
- package/lib/rules/arazzo/parameters-unique.d.ts +1 -2
- package/lib/rules/arazzo/parameters-unique.js +5 -2
- package/lib/rules/arazzo/requestBody-replacements-unique.d.ts +1 -2
- package/lib/rules/arazzo/requestBody-replacements-unique.js +5 -2
- package/lib/rules/arazzo/sourceDescription-type.d.ts +1 -2
- package/lib/rules/arazzo/sourceDescription-type.js +5 -2
- package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts +1 -2
- package/lib/rules/arazzo/sourceDescriptions-name-unique.js +5 -2
- package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts +1 -2
- package/lib/rules/arazzo/sourceDescriptions-not-empty.js +5 -2
- package/lib/rules/arazzo/step-onFailure-unique.d.ts +1 -2
- package/lib/rules/arazzo/step-onFailure-unique.js +5 -2
- package/lib/rules/arazzo/step-onSuccess-unique.d.ts +1 -2
- package/lib/rules/arazzo/step-onSuccess-unique.js +5 -2
- package/lib/rules/arazzo/stepId-unique.d.ts +1 -2
- package/lib/rules/arazzo/stepId-unique.js +5 -2
- package/lib/rules/arazzo/workflow-dependsOn.d.ts +1 -2
- package/lib/rules/arazzo/workflow-dependsOn.js +5 -2
- package/lib/rules/arazzo/workflowId-unique.d.ts +1 -2
- package/lib/rules/arazzo/workflowId-unique.js +5 -2
- package/lib/rules/async2/channels-kebab-case.d.ts +1 -2
- package/lib/rules/async2/channels-kebab-case.js +5 -2
- package/lib/rules/async2/index.d.ts +1 -2
- package/lib/rules/async2/index.js +24 -22
- package/lib/rules/async2/no-channel-trailing-slash.d.ts +1 -2
- package/lib/rules/async2/no-channel-trailing-slash.js +5 -2
- package/lib/rules/async3/channels-kebab-case.d.ts +1 -2
- package/lib/rules/async3/channels-kebab-case.js +5 -2
- package/lib/rules/async3/index.d.ts +1 -2
- package/lib/rules/async3/index.js +24 -22
- package/lib/rules/async3/no-channel-trailing-slash.d.ts +1 -2
- package/lib/rules/async3/no-channel-trailing-slash.js +6 -3
- package/lib/rules/common/assertions/asserts.d.ts +2 -3
- package/lib/rules/common/assertions/asserts.js +38 -35
- package/lib/rules/common/assertions/index.d.ts +3 -4
- package/lib/rules/common/assertions/index.js +10 -7
- package/lib/rules/common/assertions/utils.d.ts +4 -5
- package/lib/rules/common/assertions/utils.js +29 -21
- package/lib/rules/common/info-contact.d.ts +1 -2
- package/lib/rules/common/info-contact.js +7 -4
- package/lib/rules/common/info-license-strict.d.ts +1 -2
- package/lib/rules/common/info-license-strict.js +10 -7
- package/lib/rules/common/info-license-url.d.ts +1 -2
- package/lib/rules/common/info-license-url.js +7 -4
- package/lib/rules/common/info-license.d.ts +1 -2
- package/lib/rules/common/info-license.js +7 -4
- package/lib/rules/common/no-ambiguous-paths.d.ts +1 -2
- package/lib/rules/common/no-ambiguous-paths.js +5 -2
- package/lib/rules/common/no-enum-type-mismatch.d.ts +1 -2
- package/lib/rules/common/no-enum-type-mismatch.js +9 -6
- package/lib/rules/common/no-http-verbs-in-paths.d.ts +1 -2
- package/lib/rules/common/no-http-verbs-in-paths.js +8 -5
- package/lib/rules/common/no-identical-paths.d.ts +1 -2
- package/lib/rules/common/no-identical-paths.js +5 -2
- package/lib/rules/common/no-invalid-parameter-examples.d.ts +0 -1
- package/lib/rules/common/no-invalid-parameter-examples.js +9 -6
- package/lib/rules/common/no-invalid-schema-examples.d.ts +1 -2
- package/lib/rules/common/no-invalid-schema-examples.js +9 -6
- package/lib/rules/common/no-path-trailing-slash.d.ts +1 -2
- package/lib/rules/common/no-path-trailing-slash.js +5 -2
- package/lib/rules/common/no-required-schema-properties-undefined.d.ts +1 -2
- package/lib/rules/common/no-required-schema-properties-undefined.js +7 -4
- package/lib/rules/common/no-schema-type-mismatch.d.ts +1 -2
- package/lib/rules/common/no-schema-type-mismatch.js +5 -2
- package/lib/rules/common/operation-2xx-response.d.ts +1 -2
- package/lib/rules/common/operation-2xx-response.js +8 -5
- package/lib/rules/common/operation-4xx-response.d.ts +1 -2
- package/lib/rules/common/operation-4xx-response.js +8 -5
- package/lib/rules/common/operation-description.d.ts +1 -2
- package/lib/rules/common/operation-description.js +7 -4
- package/lib/rules/common/operation-operationId-unique.d.ts +1 -2
- package/lib/rules/common/operation-operationId-unique.js +5 -2
- package/lib/rules/common/operation-operationId-url-safe.d.ts +1 -2
- package/lib/rules/common/operation-operationId-url-safe.js +5 -2
- package/lib/rules/common/operation-operationId.d.ts +1 -2
- package/lib/rules/common/operation-operationId.js +7 -4
- package/lib/rules/common/operation-parameters-unique.d.ts +1 -2
- package/lib/rules/common/operation-parameters-unique.js +5 -2
- package/lib/rules/common/operation-singular-tag.d.ts +1 -2
- package/lib/rules/common/operation-singular-tag.js +5 -2
- package/lib/rules/common/operation-summary.d.ts +1 -2
- package/lib/rules/common/operation-summary.js +7 -4
- package/lib/rules/common/operation-tag-defined.d.ts +1 -2
- package/lib/rules/common/operation-tag-defined.js +5 -2
- package/lib/rules/common/parameter-description.d.ts +1 -2
- package/lib/rules/common/parameter-description.js +5 -2
- package/lib/rules/common/path-declaration-must-exist.d.ts +1 -2
- package/lib/rules/common/path-declaration-must-exist.js +5 -2
- package/lib/rules/common/path-excludes-patterns.d.ts +1 -2
- package/lib/rules/common/path-excludes-patterns.js +5 -2
- package/lib/rules/common/path-http-verbs-order.d.ts +1 -2
- package/lib/rules/common/path-http-verbs-order.js +5 -2
- package/lib/rules/common/path-not-include-query.d.ts +1 -2
- package/lib/rules/common/path-not-include-query.js +5 -2
- package/lib/rules/common/path-params-defined.d.ts +1 -2
- package/lib/rules/common/path-params-defined.js +5 -2
- package/lib/rules/common/path-segment-plural.d.ts +1 -2
- package/lib/rules/common/path-segment-plural.js +8 -5
- package/lib/rules/common/paths-kebab-case.d.ts +1 -2
- package/lib/rules/common/paths-kebab-case.js +5 -2
- package/lib/rules/common/required-string-property-missing-min-length.d.ts +1 -2
- package/lib/rules/common/required-string-property-missing-min-length.js +5 -2
- package/lib/rules/common/response-contains-header.d.ts +1 -2
- package/lib/rules/common/response-contains-header.js +8 -5
- package/lib/rules/common/scalar-property-missing-example.d.ts +1 -2
- package/lib/rules/common/scalar-property-missing-example.js +7 -4
- package/lib/rules/common/security-defined.d.ts +1 -2
- package/lib/rules/common/security-defined.js +5 -2
- package/lib/rules/common/spec-strict-refs.d.ts +1 -2
- package/lib/rules/common/spec-strict-refs.js +7 -4
- package/lib/rules/common/struct.d.ts +1 -2
- package/lib/rules/common/struct.js +21 -18
- package/lib/rules/common/tag-description.d.ts +1 -2
- package/lib/rules/common/tag-description.js +7 -4
- package/lib/rules/common/tags-alphabetical.d.ts +1 -2
- package/lib/rules/common/tags-alphabetical.js +5 -2
- package/lib/rules/no-unresolved-refs.d.ts +3 -4
- package/lib/rules/no-unresolved-refs.js +9 -5
- package/lib/rules/oas2/boolean-parameter-prefixes.d.ts +1 -2
- package/lib/rules/oas2/boolean-parameter-prefixes.js +5 -2
- package/lib/rules/oas2/index.d.ts +1 -2
- package/lib/rules/oas2/index.js +97 -95
- package/lib/rules/oas2/request-mime-type.d.ts +1 -2
- package/lib/rules/oas2/request-mime-type.js +8 -5
- package/lib/rules/oas2/response-contains-property.d.ts +1 -2
- package/lib/rules/oas2/response-contains-property.js +8 -5
- package/lib/rules/oas2/response-mime-type.d.ts +1 -2
- package/lib/rules/oas2/response-mime-type.js +8 -5
- package/lib/rules/oas3/array-parameter-serialization.d.ts +1 -2
- package/lib/rules/oas3/array-parameter-serialization.js +7 -4
- package/lib/rules/oas3/boolean-parameter-prefixes.d.ts +1 -2
- package/lib/rules/oas3/boolean-parameter-prefixes.js +5 -2
- package/lib/rules/oas3/component-name-unique.d.ts +1 -2
- package/lib/rules/oas3/component-name-unique.js +5 -2
- package/lib/rules/oas3/index.d.ts +1 -2
- package/lib/rules/oas3/index.js +121 -119
- package/lib/rules/oas3/no-empty-servers.d.ts +1 -2
- package/lib/rules/oas3/no-empty-servers.js +5 -2
- package/lib/rules/oas3/no-example-value-and-externalValue.d.ts +1 -2
- package/lib/rules/oas3/no-example-value-and-externalValue.js +5 -2
- package/lib/rules/oas3/no-invalid-media-type-examples.d.ts +1 -2
- package/lib/rules/oas3/no-invalid-media-type-examples.js +10 -7
- package/lib/rules/oas3/no-server-example.com.d.ts +1 -2
- package/lib/rules/oas3/no-server-example.com.js +5 -2
- package/lib/rules/oas3/no-server-trailing-slash.d.ts +1 -2
- package/lib/rules/oas3/no-server-trailing-slash.js +5 -2
- package/lib/rules/oas3/no-server-variables-empty-enum.d.ts +1 -2
- package/lib/rules/oas3/no-server-variables-empty-enum.js +5 -2
- package/lib/rules/oas3/no-undefined-server-variable.d.ts +1 -2
- package/lib/rules/oas3/no-undefined-server-variable.js +5 -2
- package/lib/rules/oas3/no-unused-components.d.ts +1 -2
- package/lib/rules/oas3/no-unused-components.js +5 -2
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts +1 -2
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js +9 -6
- package/lib/rules/oas3/request-mime-type.d.ts +1 -2
- package/lib/rules/oas3/request-mime-type.js +9 -6
- package/lib/rules/oas3/response-contains-property.d.ts +1 -2
- package/lib/rules/oas3/response-contains-property.js +8 -5
- package/lib/rules/oas3/response-mime-type.d.ts +1 -2
- package/lib/rules/oas3/response-mime-type.js +9 -6
- package/lib/rules/oas3/spec-components-invalid-map-name.d.ts +1 -2
- package/lib/rules/oas3/spec-components-invalid-map-name.js +5 -2
- package/lib/rules/other/stats.d.ts +3 -4
- package/lib/rules/other/stats.js +5 -2
- package/lib/rules/overlay1/index.d.ts +1 -2
- package/lib/rules/overlay1/index.js +11 -9
- package/lib/rules/respect/no-criteria-xpath.d.ts +1 -2
- package/lib/rules/respect/no-criteria-xpath.js +5 -2
- package/lib/rules/respect/respect-supported-versions.d.ts +1 -2
- package/lib/rules/respect/respect-supported-versions.js +10 -7
- package/lib/rules/utils.d.ts +3 -4
- package/lib/rules/utils.js +36 -23
- package/lib/types/arazzo.d.ts +1 -2
- package/lib/types/arazzo.js +23 -21
- package/lib/types/asyncapi2.d.ts +1 -2
- package/lib/types/asyncapi2.js +56 -54
- package/lib/types/asyncapi3.d.ts +1 -2
- package/lib/types/asyncapi3.js +43 -41
- package/lib/types/index.d.ts +0 -1
- package/lib/types/index.js +13 -7
- package/lib/types/json-schema-adapter.d.ts +1 -2
- package/lib/types/json-schema-adapter.js +17 -15
- package/lib/types/oas2.d.ts +2 -3
- package/lib/types/oas2.js +19 -17
- package/lib/types/oas3.d.ts +2 -3
- package/lib/types/oas3.js +41 -39
- package/lib/types/oas3_1.d.ts +2 -3
- package/lib/types/oas3_1.js +20 -18
- package/lib/types/overlay.d.ts +1 -2
- package/lib/types/overlay.js +6 -4
- package/lib/types/redocly-yaml.d.ts +3 -4
- package/lib/types/redocly-yaml.js +48 -31
- package/lib/typings/arazzo.d.ts +0 -1
- package/lib/typings/arazzo.js +5 -3
- package/lib/typings/asyncapi.d.ts +0 -1
- package/lib/typings/asyncapi.js +2 -2
- package/lib/typings/asyncapi3.d.ts +0 -1
- package/lib/typings/asyncapi3.js +2 -2
- package/lib/typings/common.d.ts +0 -1
- package/lib/typings/common.js +2 -2
- package/lib/typings/openapi.d.ts +0 -1
- package/lib/typings/openapi.js +2 -2
- package/lib/typings/overlay.d.ts +0 -1
- package/lib/typings/overlay.js +4 -2
- package/lib/typings/swagger.d.ts +1 -2
- package/lib/typings/swagger.js +2 -2
- package/lib/utils.d.ts +5 -4
- package/lib/utils.js +99 -52
- package/lib/visitors.d.ts +10 -11
- package/lib/visitors.js +6 -4
- package/lib/walk.d.ts +8 -9
- package/lib/walk.js +25 -23
- package/package.json +9 -30
- package/lib/benchmark/benches/lint-with-many-rules.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/lint-with-many-rules.bench.js.map +0 -1
- package/lib/benchmark/benches/lint-with-nested-rule.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/lint-with-nested-rule.bench.js.map +0 -1
- package/lib/benchmark/benches/lint-with-no-rules.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/lint-with-no-rules.bench.js.map +0 -1
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.js.map +0 -1
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.js.map +0 -1
- package/lib/benchmark/benches/recommended-oas3.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/recommended-oas3.bench.js.map +0 -1
- package/lib/benchmark/benches/resolve-with-no-external.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/resolve-with-no-external.bench.js.map +0 -1
- package/lib/benchmark/utils.d.ts.map +0 -1
- package/lib/benchmark/utils.js.map +0 -1
- package/lib/bundle.d.ts.map +0 -1
- package/lib/bundle.js.map +0 -1
- package/lib/config/all.d.ts.map +0 -1
- package/lib/config/all.js.map +0 -1
- package/lib/config/builtIn.d.ts.map +0 -1
- package/lib/config/builtIn.js.map +0 -1
- package/lib/config/config-resolvers.d.ts.map +0 -1
- package/lib/config/config-resolvers.js.map +0 -1
- package/lib/config/config.d.ts.map +0 -1
- package/lib/config/config.js.map +0 -1
- package/lib/config/index.d.ts.map +0 -1
- package/lib/config/index.js.map +0 -1
- package/lib/config/load.d.ts.map +0 -1
- package/lib/config/load.js.map +0 -1
- package/lib/config/minimal.d.ts.map +0 -1
- package/lib/config/minimal.js.map +0 -1
- package/lib/config/recommended-strict.d.ts.map +0 -1
- package/lib/config/recommended-strict.js.map +0 -1
- package/lib/config/recommended.d.ts.map +0 -1
- package/lib/config/recommended.js.map +0 -1
- package/lib/config/rules.d.ts.map +0 -1
- package/lib/config/rules.js.map +0 -1
- package/lib/config/spec.d.ts.map +0 -1
- package/lib/config/spec.js.map +0 -1
- package/lib/config/types.d.ts.map +0 -1
- package/lib/config/types.js.map +0 -1
- package/lib/config/utils.d.ts.map +0 -1
- package/lib/config/utils.js.map +0 -1
- package/lib/decorators/arazzo/index.d.ts.map +0 -1
- package/lib/decorators/arazzo/index.js.map +0 -1
- package/lib/decorators/async2/index.d.ts.map +0 -1
- package/lib/decorators/async2/index.js.map +0 -1
- package/lib/decorators/async3/index.d.ts.map +0 -1
- package/lib/decorators/async3/index.js.map +0 -1
- package/lib/decorators/common/filters/filter-helper.d.ts.map +0 -1
- package/lib/decorators/common/filters/filter-helper.js.map +0 -1
- package/lib/decorators/common/filters/filter-in.d.ts.map +0 -1
- package/lib/decorators/common/filters/filter-in.js.map +0 -1
- package/lib/decorators/common/filters/filter-out.d.ts.map +0 -1
- package/lib/decorators/common/filters/filter-out.js.map +0 -1
- package/lib/decorators/common/info-description-override.d.ts.map +0 -1
- package/lib/decorators/common/info-description-override.js.map +0 -1
- package/lib/decorators/common/info-override.d.ts.map +0 -1
- package/lib/decorators/common/info-override.js.map +0 -1
- package/lib/decorators/common/media-type-examples-override.d.ts.map +0 -1
- package/lib/decorators/common/media-type-examples-override.js.map +0 -1
- package/lib/decorators/common/operation-description-override.d.ts.map +0 -1
- package/lib/decorators/common/operation-description-override.js.map +0 -1
- package/lib/decorators/common/remove-x-internal.d.ts.map +0 -1
- package/lib/decorators/common/remove-x-internal.js.map +0 -1
- package/lib/decorators/common/tag-description-override.d.ts.map +0 -1
- package/lib/decorators/common/tag-description-override.js.map +0 -1
- package/lib/decorators/oas2/index.d.ts.map +0 -1
- package/lib/decorators/oas2/index.js.map +0 -1
- package/lib/decorators/oas2/remove-unused-components.d.ts.map +0 -1
- package/lib/decorators/oas2/remove-unused-components.js.map +0 -1
- package/lib/decorators/oas3/index.d.ts.map +0 -1
- package/lib/decorators/oas3/index.js.map +0 -1
- package/lib/decorators/oas3/remove-unused-components.d.ts.map +0 -1
- package/lib/decorators/oas3/remove-unused-components.js.map +0 -1
- package/lib/decorators/overlay1/index.d.ts.map +0 -1
- package/lib/decorators/overlay1/index.js.map +0 -1
- package/lib/env.d.ts.map +0 -1
- package/lib/env.js.map +0 -1
- package/lib/format/codeframes.d.ts.map +0 -1
- package/lib/format/codeframes.js.map +0 -1
- package/lib/format/format.d.ts.map +0 -1
- package/lib/format/format.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/js-yaml/index.d.ts.map +0 -1
- package/lib/js-yaml/index.js.map +0 -1
- package/lib/lint.d.ts.map +0 -1
- package/lib/lint.js.map +0 -1
- package/lib/logger.d.ts.map +0 -1
- package/lib/logger.js.map +0 -1
- package/lib/oas-types.d.ts.map +0 -1
- package/lib/oas-types.js.map +0 -1
- package/lib/ref-utils.d.ts.map +0 -1
- package/lib/ref-utils.js.map +0 -1
- package/lib/resolve.d.ts.map +0 -1
- package/lib/resolve.js.map +0 -1
- package/lib/rules/ajv.d.ts.map +0 -1
- package/lib/rules/ajv.js.map +0 -1
- package/lib/rules/arazzo/criteria-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/criteria-unique.js.map +0 -1
- package/lib/rules/arazzo/index.d.ts.map +0 -1
- package/lib/rules/arazzo/index.js.map +0 -1
- package/lib/rules/arazzo/parameters-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/parameters-unique.js.map +0 -1
- package/lib/rules/arazzo/requestBody-replacements-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/requestBody-replacements-unique.js.map +0 -1
- package/lib/rules/arazzo/sourceDescription-type.d.ts.map +0 -1
- package/lib/rules/arazzo/sourceDescription-type.js.map +0 -1
- package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/sourceDescriptions-name-unique.js.map +0 -1
- package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts.map +0 -1
- package/lib/rules/arazzo/sourceDescriptions-not-empty.js.map +0 -1
- package/lib/rules/arazzo/step-onFailure-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/step-onFailure-unique.js.map +0 -1
- package/lib/rules/arazzo/step-onSuccess-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/step-onSuccess-unique.js.map +0 -1
- package/lib/rules/arazzo/stepId-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/stepId-unique.js.map +0 -1
- package/lib/rules/arazzo/workflow-dependsOn.d.ts.map +0 -1
- package/lib/rules/arazzo/workflow-dependsOn.js.map +0 -1
- package/lib/rules/arazzo/workflowId-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/workflowId-unique.js.map +0 -1
- package/lib/rules/async2/channels-kebab-case.d.ts.map +0 -1
- package/lib/rules/async2/channels-kebab-case.js.map +0 -1
- package/lib/rules/async2/index.d.ts.map +0 -1
- package/lib/rules/async2/index.js.map +0 -1
- package/lib/rules/async2/no-channel-trailing-slash.d.ts.map +0 -1
- package/lib/rules/async2/no-channel-trailing-slash.js.map +0 -1
- package/lib/rules/async3/channels-kebab-case.d.ts.map +0 -1
- package/lib/rules/async3/channels-kebab-case.js.map +0 -1
- package/lib/rules/async3/index.d.ts.map +0 -1
- package/lib/rules/async3/index.js.map +0 -1
- package/lib/rules/async3/no-channel-trailing-slash.d.ts.map +0 -1
- package/lib/rules/async3/no-channel-trailing-slash.js.map +0 -1
- package/lib/rules/common/assertions/asserts.d.ts.map +0 -1
- package/lib/rules/common/assertions/asserts.js.map +0 -1
- package/lib/rules/common/assertions/index.d.ts.map +0 -1
- package/lib/rules/common/assertions/index.js.map +0 -1
- package/lib/rules/common/assertions/utils.d.ts.map +0 -1
- package/lib/rules/common/assertions/utils.js.map +0 -1
- package/lib/rules/common/info-contact.d.ts.map +0 -1
- package/lib/rules/common/info-contact.js.map +0 -1
- package/lib/rules/common/info-license-strict.d.ts.map +0 -1
- package/lib/rules/common/info-license-strict.js.map +0 -1
- package/lib/rules/common/info-license-url.d.ts.map +0 -1
- package/lib/rules/common/info-license-url.js.map +0 -1
- package/lib/rules/common/info-license.d.ts.map +0 -1
- package/lib/rules/common/info-license.js.map +0 -1
- package/lib/rules/common/no-ambiguous-paths.d.ts.map +0 -1
- package/lib/rules/common/no-ambiguous-paths.js.map +0 -1
- package/lib/rules/common/no-enum-type-mismatch.d.ts.map +0 -1
- package/lib/rules/common/no-enum-type-mismatch.js.map +0 -1
- package/lib/rules/common/no-http-verbs-in-paths.d.ts.map +0 -1
- package/lib/rules/common/no-http-verbs-in-paths.js.map +0 -1
- package/lib/rules/common/no-identical-paths.d.ts.map +0 -1
- package/lib/rules/common/no-identical-paths.js.map +0 -1
- package/lib/rules/common/no-invalid-parameter-examples.d.ts.map +0 -1
- package/lib/rules/common/no-invalid-parameter-examples.js.map +0 -1
- package/lib/rules/common/no-invalid-schema-examples.d.ts.map +0 -1
- package/lib/rules/common/no-invalid-schema-examples.js.map +0 -1
- package/lib/rules/common/no-path-trailing-slash.d.ts.map +0 -1
- package/lib/rules/common/no-path-trailing-slash.js.map +0 -1
- package/lib/rules/common/no-required-schema-properties-undefined.d.ts.map +0 -1
- package/lib/rules/common/no-required-schema-properties-undefined.js.map +0 -1
- package/lib/rules/common/no-schema-type-mismatch.d.ts.map +0 -1
- package/lib/rules/common/no-schema-type-mismatch.js.map +0 -1
- package/lib/rules/common/operation-2xx-response.d.ts.map +0 -1
- package/lib/rules/common/operation-2xx-response.js.map +0 -1
- package/lib/rules/common/operation-4xx-response.d.ts.map +0 -1
- package/lib/rules/common/operation-4xx-response.js.map +0 -1
- package/lib/rules/common/operation-description.d.ts.map +0 -1
- package/lib/rules/common/operation-description.js.map +0 -1
- package/lib/rules/common/operation-operationId-unique.d.ts.map +0 -1
- package/lib/rules/common/operation-operationId-unique.js.map +0 -1
- package/lib/rules/common/operation-operationId-url-safe.d.ts.map +0 -1
- package/lib/rules/common/operation-operationId-url-safe.js.map +0 -1
- package/lib/rules/common/operation-operationId.d.ts.map +0 -1
- package/lib/rules/common/operation-operationId.js.map +0 -1
- package/lib/rules/common/operation-parameters-unique.d.ts.map +0 -1
- package/lib/rules/common/operation-parameters-unique.js.map +0 -1
- package/lib/rules/common/operation-singular-tag.d.ts.map +0 -1
- package/lib/rules/common/operation-singular-tag.js.map +0 -1
- package/lib/rules/common/operation-summary.d.ts.map +0 -1
- package/lib/rules/common/operation-summary.js.map +0 -1
- package/lib/rules/common/operation-tag-defined.d.ts.map +0 -1
- package/lib/rules/common/operation-tag-defined.js.map +0 -1
- package/lib/rules/common/parameter-description.d.ts.map +0 -1
- package/lib/rules/common/parameter-description.js.map +0 -1
- package/lib/rules/common/path-declaration-must-exist.d.ts.map +0 -1
- package/lib/rules/common/path-declaration-must-exist.js.map +0 -1
- package/lib/rules/common/path-excludes-patterns.d.ts.map +0 -1
- package/lib/rules/common/path-excludes-patterns.js.map +0 -1
- package/lib/rules/common/path-http-verbs-order.d.ts.map +0 -1
- package/lib/rules/common/path-http-verbs-order.js.map +0 -1
- package/lib/rules/common/path-not-include-query.d.ts.map +0 -1
- package/lib/rules/common/path-not-include-query.js.map +0 -1
- package/lib/rules/common/path-params-defined.d.ts.map +0 -1
- package/lib/rules/common/path-params-defined.js.map +0 -1
- package/lib/rules/common/path-segment-plural.d.ts.map +0 -1
- package/lib/rules/common/path-segment-plural.js.map +0 -1
- package/lib/rules/common/paths-kebab-case.d.ts.map +0 -1
- package/lib/rules/common/paths-kebab-case.js.map +0 -1
- package/lib/rules/common/required-string-property-missing-min-length.d.ts.map +0 -1
- package/lib/rules/common/required-string-property-missing-min-length.js.map +0 -1
- package/lib/rules/common/response-contains-header.d.ts.map +0 -1
- package/lib/rules/common/response-contains-header.js.map +0 -1
- package/lib/rules/common/scalar-property-missing-example.d.ts.map +0 -1
- package/lib/rules/common/scalar-property-missing-example.js.map +0 -1
- package/lib/rules/common/security-defined.d.ts.map +0 -1
- package/lib/rules/common/security-defined.js.map +0 -1
- package/lib/rules/common/spec-strict-refs.d.ts.map +0 -1
- package/lib/rules/common/spec-strict-refs.js.map +0 -1
- package/lib/rules/common/struct.d.ts.map +0 -1
- package/lib/rules/common/struct.js.map +0 -1
- package/lib/rules/common/tag-description.d.ts.map +0 -1
- package/lib/rules/common/tag-description.js.map +0 -1
- package/lib/rules/common/tags-alphabetical.d.ts.map +0 -1
- package/lib/rules/common/tags-alphabetical.js.map +0 -1
- package/lib/rules/no-unresolved-refs.d.ts.map +0 -1
- package/lib/rules/no-unresolved-refs.js.map +0 -1
- package/lib/rules/oas2/boolean-parameter-prefixes.d.ts.map +0 -1
- package/lib/rules/oas2/boolean-parameter-prefixes.js.map +0 -1
- package/lib/rules/oas2/index.d.ts.map +0 -1
- package/lib/rules/oas2/index.js.map +0 -1
- package/lib/rules/oas2/request-mime-type.d.ts.map +0 -1
- package/lib/rules/oas2/request-mime-type.js.map +0 -1
- package/lib/rules/oas2/response-contains-property.d.ts.map +0 -1
- package/lib/rules/oas2/response-contains-property.js.map +0 -1
- package/lib/rules/oas2/response-mime-type.d.ts.map +0 -1
- package/lib/rules/oas2/response-mime-type.js.map +0 -1
- package/lib/rules/oas3/array-parameter-serialization.d.ts.map +0 -1
- package/lib/rules/oas3/array-parameter-serialization.js.map +0 -1
- package/lib/rules/oas3/boolean-parameter-prefixes.d.ts.map +0 -1
- package/lib/rules/oas3/boolean-parameter-prefixes.js.map +0 -1
- package/lib/rules/oas3/component-name-unique.d.ts.map +0 -1
- package/lib/rules/oas3/component-name-unique.js.map +0 -1
- package/lib/rules/oas3/index.d.ts.map +0 -1
- package/lib/rules/oas3/index.js.map +0 -1
- package/lib/rules/oas3/no-empty-servers.d.ts.map +0 -1
- package/lib/rules/oas3/no-empty-servers.js.map +0 -1
- package/lib/rules/oas3/no-example-value-and-externalValue.d.ts.map +0 -1
- package/lib/rules/oas3/no-example-value-and-externalValue.js.map +0 -1
- package/lib/rules/oas3/no-invalid-media-type-examples.d.ts.map +0 -1
- package/lib/rules/oas3/no-invalid-media-type-examples.js.map +0 -1
- package/lib/rules/oas3/no-server-example.com.d.ts.map +0 -1
- package/lib/rules/oas3/no-server-example.com.js.map +0 -1
- package/lib/rules/oas3/no-server-trailing-slash.d.ts.map +0 -1
- package/lib/rules/oas3/no-server-trailing-slash.js.map +0 -1
- package/lib/rules/oas3/no-server-variables-empty-enum.d.ts.map +0 -1
- package/lib/rules/oas3/no-server-variables-empty-enum.js.map +0 -1
- package/lib/rules/oas3/no-undefined-server-variable.d.ts.map +0 -1
- package/lib/rules/oas3/no-undefined-server-variable.js.map +0 -1
- package/lib/rules/oas3/no-unused-components.d.ts.map +0 -1
- package/lib/rules/oas3/no-unused-components.js.map +0 -1
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts.map +0 -1
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js.map +0 -1
- package/lib/rules/oas3/request-mime-type.d.ts.map +0 -1
- package/lib/rules/oas3/request-mime-type.js.map +0 -1
- package/lib/rules/oas3/response-contains-property.d.ts.map +0 -1
- package/lib/rules/oas3/response-contains-property.js.map +0 -1
- package/lib/rules/oas3/response-mime-type.d.ts.map +0 -1
- package/lib/rules/oas3/response-mime-type.js.map +0 -1
- package/lib/rules/oas3/spec-components-invalid-map-name.d.ts.map +0 -1
- package/lib/rules/oas3/spec-components-invalid-map-name.js.map +0 -1
- package/lib/rules/other/stats.d.ts.map +0 -1
- package/lib/rules/other/stats.js.map +0 -1
- package/lib/rules/overlay1/index.d.ts.map +0 -1
- package/lib/rules/overlay1/index.js.map +0 -1
- package/lib/rules/respect/no-criteria-xpath.d.ts.map +0 -1
- package/lib/rules/respect/no-criteria-xpath.js.map +0 -1
- package/lib/rules/respect/respect-supported-versions.d.ts.map +0 -1
- package/lib/rules/respect/respect-supported-versions.js.map +0 -1
- package/lib/rules/utils.d.ts.map +0 -1
- package/lib/rules/utils.js.map +0 -1
- package/lib/types/arazzo.d.ts.map +0 -1
- package/lib/types/arazzo.js.map +0 -1
- package/lib/types/asyncapi2.d.ts.map +0 -1
- package/lib/types/asyncapi2.js.map +0 -1
- package/lib/types/asyncapi3.d.ts.map +0 -1
- package/lib/types/asyncapi3.js.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/index.js.map +0 -1
- package/lib/types/json-schema-adapter.d.ts.map +0 -1
- package/lib/types/json-schema-adapter.js.map +0 -1
- package/lib/types/oas2.d.ts.map +0 -1
- package/lib/types/oas2.js.map +0 -1
- package/lib/types/oas3.d.ts.map +0 -1
- package/lib/types/oas3.js.map +0 -1
- package/lib/types/oas3_1.d.ts.map +0 -1
- package/lib/types/oas3_1.js.map +0 -1
- package/lib/types/overlay.d.ts.map +0 -1
- package/lib/types/overlay.js.map +0 -1
- package/lib/types/redocly-yaml.d.ts.map +0 -1
- package/lib/types/redocly-yaml.js.map +0 -1
- package/lib/typings/arazzo.d.ts.map +0 -1
- package/lib/typings/arazzo.js.map +0 -1
- package/lib/typings/asyncapi.d.ts.map +0 -1
- package/lib/typings/asyncapi.js.map +0 -1
- package/lib/typings/asyncapi3.d.ts.map +0 -1
- package/lib/typings/asyncapi3.js.map +0 -1
- package/lib/typings/common.d.ts.map +0 -1
- package/lib/typings/common.js.map +0 -1
- package/lib/typings/openapi.d.ts.map +0 -1
- package/lib/typings/openapi.js.map +0 -1
- package/lib/typings/overlay.d.ts.map +0 -1
- package/lib/typings/overlay.js.map +0 -1
- package/lib/typings/swagger.d.ts.map +0 -1
- package/lib/typings/swagger.js.map +0 -1
- package/lib/utils/error.d.ts +0 -3
- package/lib/utils/error.d.ts.map +0 -1
- package/lib/utils/error.js +0 -3
- package/lib/utils/error.js.map +0 -1
- package/lib/utils.d.ts.map +0 -1
- package/lib/utils.js.map +0 -1
- package/lib/visitors.d.ts.map +0 -1
- package/lib/visitors.js.map +0 -1
- package/lib/walk.d.ts.map +0 -1
- package/lib/walk.js.map +0 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Assertions = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
const utils_2 = require("../../../utils");
|
|
6
|
+
const Assertions = (opts) => {
|
|
4
7
|
const visitors = [];
|
|
5
8
|
// As 'Assertions' has an array of asserts,
|
|
6
9
|
// that array spreads into an 'opts' object on init rules phase here
|
|
@@ -9,13 +12,13 @@ export const Assertions = (opts) => {
|
|
|
9
12
|
// before - filter only object 'opts' values
|
|
10
13
|
const assertions = Object.values(opts).filter((opt) => typeof opt === 'object' && opt !== null);
|
|
11
14
|
for (const [_, assertion] of assertions.entries()) {
|
|
12
|
-
if (!isString(assertion.subject.type)) {
|
|
15
|
+
if (!(0, utils_2.isString)(assertion.subject.type)) {
|
|
13
16
|
throw new Error(`${assertion.assertionId}: 'type' (String) is required`);
|
|
14
17
|
}
|
|
15
|
-
const subjectVisitor = buildSubjectVisitor(assertion.assertionId, assertion);
|
|
16
|
-
const visitorObject = buildVisitorObject(assertion, subjectVisitor);
|
|
18
|
+
const subjectVisitor = (0, utils_1.buildSubjectVisitor)(assertion.assertionId, assertion);
|
|
19
|
+
const visitorObject = (0, utils_1.buildVisitorObject)(assertion, subjectVisitor);
|
|
17
20
|
visitors.push(visitorObject);
|
|
18
21
|
}
|
|
19
22
|
return visitors;
|
|
20
23
|
};
|
|
21
|
-
|
|
24
|
+
exports.Assertions = Assertions;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Asserts } from './asserts
|
|
2
|
-
import type { AssertionContext, AssertResult } from '../../../config
|
|
3
|
-
import type { Assertion, AssertionDefinition } from '
|
|
4
|
-
import type { Oas2Visitor, Oas3Visitor, VisitFunction } from '../../../visitors
|
|
1
|
+
import type { Asserts } from './asserts';
|
|
2
|
+
import type { AssertionContext, AssertResult } from '../../../config';
|
|
3
|
+
import type { Assertion, AssertionDefinition } from '.';
|
|
4
|
+
import type { Oas2Visitor, Oas3Visitor, VisitFunction } from '../../../visitors';
|
|
5
5
|
export type OrderDirection = 'asc' | 'desc';
|
|
6
6
|
export type OrderOptions = {
|
|
7
7
|
direction: OrderDirection;
|
|
@@ -26,4 +26,3 @@ export declare function isOrdered(value: any[], options: OrderOptions | OrderDir
|
|
|
26
26
|
export declare function runAssertion({ assert, ctx, assertionProperty, }: RunAssertionParams): AssertResult[];
|
|
27
27
|
export declare function regexFromString(input: string): RegExp | null;
|
|
28
28
|
export {};
|
|
29
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAssertsToApply = getAssertsToApply;
|
|
4
|
+
exports.buildVisitorObject = buildVisitorObject;
|
|
5
|
+
exports.buildSubjectVisitor = buildSubjectVisitor;
|
|
6
|
+
exports.getIntersectionLength = getIntersectionLength;
|
|
7
|
+
exports.isOrdered = isOrdered;
|
|
8
|
+
exports.runAssertion = runAssertion;
|
|
9
|
+
exports.regexFromString = regexFromString;
|
|
10
|
+
const asserts_1 = require("./asserts");
|
|
11
|
+
const logger_1 = require("../../../logger");
|
|
12
|
+
const ref_utils_1 = require("../../../ref-utils");
|
|
13
|
+
const utils_1 = require("../../../utils");
|
|
5
14
|
const assertionMessageTemplates = {
|
|
6
15
|
problems: '{{problems}}',
|
|
7
16
|
};
|
|
@@ -13,17 +22,17 @@ function getPredicatesFromLocators(locators) {
|
|
|
13
22
|
((key) => filterInParentKeys.includes(key.toString()));
|
|
14
23
|
const filterOutPredicate = Array.isArray(filterOutParentKeys) &&
|
|
15
24
|
((key) => !filterOutParentKeys.includes(key.toString()));
|
|
16
|
-
return [matchKeysPredicate, filterInPredicate, filterOutPredicate].filter(isTruthy);
|
|
25
|
+
return [matchKeysPredicate, filterInPredicate, filterOutPredicate].filter(utils_1.isTruthy);
|
|
17
26
|
}
|
|
18
|
-
|
|
19
|
-
const assertsToApply = keysOf(asserts)
|
|
27
|
+
function getAssertsToApply(assertion) {
|
|
28
|
+
const assertsToApply = (0, utils_1.keysOf)(asserts_1.asserts)
|
|
20
29
|
.filter((assertName) => assertion.assertions[assertName] !== undefined)
|
|
21
30
|
.map((assertName) => {
|
|
22
31
|
return {
|
|
23
32
|
name: assertName,
|
|
24
33
|
conditions: assertion.assertions[assertName],
|
|
25
|
-
runsOnKeys: runOnKeysSet.has(assertName),
|
|
26
|
-
runsOnValues: runOnValuesSet.has(assertName),
|
|
34
|
+
runsOnKeys: asserts_1.runOnKeysSet.has(assertName),
|
|
35
|
+
runsOnValues: asserts_1.runOnValuesSet.has(assertName),
|
|
27
36
|
};
|
|
28
37
|
});
|
|
29
38
|
const shouldRunOnKeys = assertsToApply.find((assert) => assert.runsOnKeys && !assert.runsOnValues);
|
|
@@ -61,7 +70,7 @@ function applyAssertions(assertionDefinition, asserts, ctx) {
|
|
|
61
70
|
}
|
|
62
71
|
return assertResults.flat();
|
|
63
72
|
}
|
|
64
|
-
|
|
73
|
+
function buildVisitorObject(assertion, subjectVisitor) {
|
|
65
74
|
const targetVisitorLocatorPredicates = getPredicatesFromLocators(assertion.subject);
|
|
66
75
|
const targetVisitorSkipFunction = targetVisitorLocatorPredicates.length
|
|
67
76
|
? (_, key) => !targetVisitorLocatorPredicates.every((predicate) => predicate(key))
|
|
@@ -80,7 +89,7 @@ export function buildVisitorObject(assertion, subjectVisitor) {
|
|
|
80
89
|
const context = assertion.where;
|
|
81
90
|
for (let index = 0; index < context.length; index++) {
|
|
82
91
|
const assertionDefinitionNode = context[index];
|
|
83
|
-
if (!isString(assertionDefinitionNode.subject?.type)) {
|
|
92
|
+
if (!(0, utils_1.isString)(assertionDefinitionNode.subject?.type)) {
|
|
84
93
|
throw new Error(`${assertion.assertionId} -> where -> [${index}]: 'type' (String) is required`);
|
|
85
94
|
}
|
|
86
95
|
const locatorPredicates = getPredicatesFromLocators(assertionDefinitionNode.subject);
|
|
@@ -110,10 +119,10 @@ export function buildVisitorObject(assertion, subjectVisitor) {
|
|
|
110
119
|
currentVisitorLevel[assertion.subject.type] = targetVisitor[assertion.subject.type];
|
|
111
120
|
return visitor;
|
|
112
121
|
}
|
|
113
|
-
|
|
122
|
+
function buildSubjectVisitor(assertId, assertion) {
|
|
114
123
|
return (node, ctx) => {
|
|
115
124
|
const properties = getAssertionProperties(assertion);
|
|
116
|
-
const defaultMessage = `${colorize.blue(assertId)} failed because the ${colorize.blue(assertion.subject.type)} ${colorize.blue(properties.join(', '))} didn't meet the assertions: ${assertionMessageTemplates.problems}`.replace(/ +/g, ' ');
|
|
125
|
+
const defaultMessage = `${logger_1.colorize.blue(assertId)} failed because the ${logger_1.colorize.blue(assertion.subject.type)} ${logger_1.colorize.blue(properties.join(', '))} didn't meet the assertions: ${assertionMessageTemplates.problems}`.replace(/ +/g, ' ');
|
|
117
126
|
const problems = applyAssertions(assertion, getAssertsToApply(assertion), {
|
|
118
127
|
...ctx,
|
|
119
128
|
node,
|
|
@@ -152,7 +161,7 @@ function getProblemsMessage(problems) {
|
|
|
152
161
|
? problems[0].message ?? ''
|
|
153
162
|
: problems.map((problem) => `\n- ${problem.message ?? ''}`).join('');
|
|
154
163
|
}
|
|
155
|
-
|
|
164
|
+
function getIntersectionLength(keys, properties) {
|
|
156
165
|
const props = new Set(properties);
|
|
157
166
|
let count = 0;
|
|
158
167
|
for (const key of keys) {
|
|
@@ -162,7 +171,7 @@ export function getIntersectionLength(keys, properties) {
|
|
|
162
171
|
}
|
|
163
172
|
return count;
|
|
164
173
|
}
|
|
165
|
-
|
|
174
|
+
function isOrdered(value, options) {
|
|
166
175
|
const direction = options.direction || options;
|
|
167
176
|
const property = options.property;
|
|
168
177
|
for (let i = 1; i < value.length; i++) {
|
|
@@ -188,15 +197,15 @@ export function isOrdered(value, options) {
|
|
|
188
197
|
}
|
|
189
198
|
return true;
|
|
190
199
|
}
|
|
191
|
-
|
|
200
|
+
function runAssertion({ assert, ctx, assertionProperty, }) {
|
|
192
201
|
const currentLocation = assert.name === 'ref' ? ctx.rawLocation : ctx.location;
|
|
193
202
|
if (assertionProperty) {
|
|
194
|
-
const values = isRef(ctx.node[assertionProperty])
|
|
203
|
+
const values = (0, ref_utils_1.isRef)(ctx.node[assertionProperty])
|
|
195
204
|
? ctx.resolve(ctx.node[assertionProperty])?.node
|
|
196
205
|
: ctx.node[assertionProperty];
|
|
197
206
|
const rawValues = ctx.rawNode[assertionProperty];
|
|
198
207
|
const location = currentLocation.child(assertionProperty);
|
|
199
|
-
return asserts[assert.name](values, assert.conditions, {
|
|
208
|
+
return asserts_1.asserts[assert.name](values, assert.conditions, {
|
|
200
209
|
...ctx,
|
|
201
210
|
baseLocation: location,
|
|
202
211
|
rawValue: rawValues,
|
|
@@ -204,15 +213,14 @@ export function runAssertion({ assert, ctx, assertionProperty, }) {
|
|
|
204
213
|
}
|
|
205
214
|
else {
|
|
206
215
|
const value = Array.isArray(ctx.node) ? ctx.node : Object.keys(ctx.node);
|
|
207
|
-
return asserts[assert.name](value, assert.conditions, {
|
|
216
|
+
return asserts_1.asserts[assert.name](value, assert.conditions, {
|
|
208
217
|
...ctx,
|
|
209
218
|
rawValue: ctx.rawNode,
|
|
210
219
|
baseLocation: currentLocation,
|
|
211
220
|
});
|
|
212
221
|
}
|
|
213
222
|
}
|
|
214
|
-
|
|
223
|
+
function regexFromString(input) {
|
|
215
224
|
const matches = input.match(/^\/(.*)\/(.*)|(.*)/);
|
|
216
225
|
return matches && new RegExp(matches[1] || matches[3], matches[2]);
|
|
217
226
|
}
|
|
218
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfoContact = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const InfoContact = () => {
|
|
3
6
|
return {
|
|
4
7
|
Info(info, { report, location }) {
|
|
5
8
|
if (!info.contact) {
|
|
6
9
|
report({
|
|
7
|
-
message: missingRequiredField('Info', 'contact'),
|
|
10
|
+
message: (0, utils_1.missingRequiredField)('Info', 'contact'),
|
|
8
11
|
location: location.child('contact').key(),
|
|
9
12
|
});
|
|
10
13
|
}
|
|
11
14
|
},
|
|
12
15
|
};
|
|
13
16
|
};
|
|
14
|
-
|
|
17
|
+
exports.InfoContact = InfoContact;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { Oas3Rule, Oas2Rule, Async2Rule, Async3Rule } from '../../visitors
|
|
1
|
+
import type { Oas3Rule, Oas2Rule, Async2Rule, Async3Rule } from '../../visitors';
|
|
2
2
|
export declare const InfoLicenseStrict: Oas2Rule | Oas3Rule | Async2Rule | Async3Rule;
|
|
3
|
-
//# sourceMappingURL=info-license-strict.d.ts.map
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfoLicenseStrict = void 0;
|
|
4
|
+
const oas_types_1 = require("../../oas-types");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
const InfoLicenseStrict = () => {
|
|
4
7
|
let specVersion;
|
|
5
8
|
return {
|
|
6
9
|
Root: {
|
|
7
10
|
enter(root) {
|
|
8
|
-
specVersion = detectSpec(root);
|
|
11
|
+
specVersion = (0, oas_types_1.detectSpec)(root);
|
|
9
12
|
},
|
|
10
13
|
License: {
|
|
11
14
|
leave(license, ctx) {
|
|
12
15
|
if (specVersion === 'oas3_1') {
|
|
13
|
-
validateOneOfDefinedAndNonEmpty(['url', 'identifier'], license, ctx);
|
|
16
|
+
(0, utils_1.validateOneOfDefinedAndNonEmpty)(['url', 'identifier'], license, ctx);
|
|
14
17
|
}
|
|
15
18
|
else {
|
|
16
|
-
validateDefinedAndNonEmpty('url', license, ctx);
|
|
19
|
+
(0, utils_1.validateDefinedAndNonEmpty)('url', license, ctx);
|
|
17
20
|
}
|
|
18
21
|
},
|
|
19
22
|
},
|
|
20
23
|
},
|
|
21
24
|
};
|
|
22
25
|
};
|
|
23
|
-
|
|
26
|
+
exports.InfoLicenseStrict = InfoLicenseStrict;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfoLicenseUrl = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const InfoLicenseUrl = () => {
|
|
3
6
|
return {
|
|
4
7
|
License(license, ctx) {
|
|
5
|
-
validateDefinedAndNonEmpty('url', license, ctx);
|
|
8
|
+
(0, utils_1.validateDefinedAndNonEmpty)('url', license, ctx);
|
|
6
9
|
},
|
|
7
10
|
};
|
|
8
11
|
};
|
|
9
|
-
|
|
12
|
+
exports.InfoLicenseUrl = InfoLicenseUrl;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfoLicense = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const InfoLicense = () => {
|
|
3
6
|
return {
|
|
4
7
|
Info(info, { report }) {
|
|
5
8
|
if (!info.license) {
|
|
6
9
|
report({
|
|
7
|
-
message: missingRequiredField('Info', 'license'),
|
|
10
|
+
message: (0, utils_1.missingRequiredField)('Info', 'license'),
|
|
8
11
|
location: { reportOnKey: true },
|
|
9
12
|
});
|
|
10
13
|
}
|
|
11
14
|
},
|
|
12
15
|
};
|
|
13
16
|
};
|
|
14
|
-
|
|
17
|
+
exports.InfoLicense = InfoLicense;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoAmbiguousPaths = void 0;
|
|
4
|
+
const NoAmbiguousPaths = () => {
|
|
2
5
|
return {
|
|
3
6
|
Paths(pathMap, { report, location }) {
|
|
4
7
|
const seenPaths = [];
|
|
@@ -15,6 +18,7 @@ export const NoAmbiguousPaths = () => {
|
|
|
15
18
|
},
|
|
16
19
|
};
|
|
17
20
|
};
|
|
21
|
+
exports.NoAmbiguousPaths = NoAmbiguousPaths;
|
|
18
22
|
function arePathsAmbiguous(a, b) {
|
|
19
23
|
const partsA = a.split('/');
|
|
20
24
|
const partsB = b.split('/');
|
|
@@ -39,4 +43,3 @@ function arePathsAmbiguous(a, b) {
|
|
|
39
43
|
}
|
|
40
44
|
return ambiguous && aVars === bVars;
|
|
41
45
|
}
|
|
42
|
-
//# sourceMappingURL=no-ambiguous-paths.js.map
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoEnumTypeMismatch = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const NoEnumTypeMismatch = () => {
|
|
3
6
|
return {
|
|
4
7
|
Schema(schema, { report, location }) {
|
|
5
8
|
if (schema.enum && !Array.isArray(schema.enum))
|
|
6
9
|
return;
|
|
7
10
|
if (schema.enum && schema.type && !Array.isArray(schema.type)) {
|
|
8
|
-
const typeMismatchedValues = schema.enum.filter((item) => !matchesJsonSchemaType(item, schema.type, schema.nullable));
|
|
11
|
+
const typeMismatchedValues = schema.enum.filter((item) => !(0, utils_1.matchesJsonSchemaType)(item, schema.type, schema.nullable));
|
|
9
12
|
for (const mismatchedValue of typeMismatchedValues) {
|
|
10
13
|
report({
|
|
11
|
-
message: `All values of \`enum\` field must be of the same type as the \`type\` field: expected "${schema.type}" but received "${oasTypeOf(mismatchedValue)}".`,
|
|
14
|
+
message: `All values of \`enum\` field must be of the same type as the \`type\` field: expected "${schema.type}" but received "${(0, utils_1.oasTypeOf)(mismatchedValue)}".`,
|
|
12
15
|
location: location.child(['enum', schema.enum.indexOf(mismatchedValue)]),
|
|
13
16
|
});
|
|
14
17
|
}
|
|
@@ -18,7 +21,7 @@ export const NoEnumTypeMismatch = () => {
|
|
|
18
21
|
for (const enumValue of schema.enum) {
|
|
19
22
|
mismatchedResults[enumValue] = [];
|
|
20
23
|
for (const type of schema.type) {
|
|
21
|
-
const valid = matchesJsonSchemaType(enumValue, type, schema.nullable);
|
|
24
|
+
const valid = (0, utils_1.matchesJsonSchemaType)(enumValue, type, schema.nullable);
|
|
22
25
|
if (!valid)
|
|
23
26
|
mismatchedResults[enumValue].push(type);
|
|
24
27
|
}
|
|
@@ -35,4 +38,4 @@ export const NoEnumTypeMismatch = () => {
|
|
|
35
38
|
},
|
|
36
39
|
};
|
|
37
40
|
};
|
|
38
|
-
|
|
41
|
+
exports.NoEnumTypeMismatch = NoEnumTypeMismatch;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoHttpVerbsInPaths = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
2
5
|
const httpMethods = ['get', 'head', 'post', 'put', 'patch', 'delete', 'options', 'trace'];
|
|
3
|
-
|
|
6
|
+
const NoHttpVerbsInPaths = ({ splitIntoWords }) => {
|
|
4
7
|
return {
|
|
5
8
|
PathItem(_path, { key, report, location }) {
|
|
6
9
|
const pathKey = key.toString();
|
|
@@ -8,11 +11,11 @@ export const NoHttpVerbsInPaths = ({ splitIntoWords }) => {
|
|
|
8
11
|
return;
|
|
9
12
|
const pathSegments = pathKey.split('/');
|
|
10
13
|
for (const pathSegment of pathSegments) {
|
|
11
|
-
if (!pathSegment || isPathParameter(pathSegment))
|
|
14
|
+
if (!pathSegment || (0, utils_1.isPathParameter)(pathSegment))
|
|
12
15
|
continue;
|
|
13
16
|
const isHttpMethodIncluded = (method) => {
|
|
14
17
|
return splitIntoWords
|
|
15
|
-
? splitCamelCaseIntoWords(pathSegment).has(method)
|
|
18
|
+
? (0, utils_1.splitCamelCaseIntoWords)(pathSegment).has(method)
|
|
16
19
|
: pathSegment.toLocaleLowerCase().includes(method);
|
|
17
20
|
};
|
|
18
21
|
for (const method of httpMethods) {
|
|
@@ -27,4 +30,4 @@ export const NoHttpVerbsInPaths = ({ splitIntoWords }) => {
|
|
|
27
30
|
},
|
|
28
31
|
};
|
|
29
32
|
};
|
|
30
|
-
|
|
33
|
+
exports.NoHttpVerbsInPaths = NoHttpVerbsInPaths;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoIdenticalPaths = void 0;
|
|
4
|
+
const NoIdenticalPaths = () => {
|
|
2
5
|
return {
|
|
3
6
|
Paths(pathMap, { report, location }) {
|
|
4
7
|
const Paths = new Map();
|
|
@@ -18,4 +21,4 @@ export const NoIdenticalPaths = () => {
|
|
|
18
21
|
},
|
|
19
22
|
};
|
|
20
23
|
};
|
|
21
|
-
|
|
24
|
+
exports.NoIdenticalPaths = NoIdenticalPaths;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoInvalidParameterExamples = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const NoInvalidParameterExamples = (opts) => {
|
|
6
|
+
const allowAdditionalProperties = (0, utils_1.getAdditionalPropertiesOption)(opts) ?? false;
|
|
4
7
|
return {
|
|
5
8
|
Parameter: {
|
|
6
9
|
leave(parameter, ctx) {
|
|
7
10
|
if (parameter.example !== undefined) {
|
|
8
|
-
validateExample(parameter.example, parameter.schema, ctx.location.child('example'), ctx, allowAdditionalProperties);
|
|
11
|
+
(0, utils_1.validateExample)(parameter.example, parameter.schema, ctx.location.child('example'), ctx, allowAdditionalProperties);
|
|
9
12
|
}
|
|
10
13
|
if (parameter.examples) {
|
|
11
14
|
for (const [key, example] of Object.entries(parameter.examples)) {
|
|
12
15
|
if ('value' in example) {
|
|
13
|
-
validateExample(example.value, parameter.schema, ctx.location.child(['examples', key]), ctx, true);
|
|
16
|
+
(0, utils_1.validateExample)(example.value, parameter.schema, ctx.location.child(['examples', key]), ctx, true);
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
}
|
|
@@ -18,4 +21,4 @@ export const NoInvalidParameterExamples = (opts) => {
|
|
|
18
21
|
},
|
|
19
22
|
};
|
|
20
23
|
};
|
|
21
|
-
|
|
24
|
+
exports.NoInvalidParameterExamples = NoInvalidParameterExamples;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoInvalidSchemaExamples = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const NoInvalidSchemaExamples = (opts) => {
|
|
6
|
+
const allowAdditionalProperties = (0, utils_1.getAdditionalPropertiesOption)(opts) ?? false;
|
|
4
7
|
return {
|
|
5
8
|
Schema: {
|
|
6
9
|
leave(schema, ctx) {
|
|
7
10
|
const examples = schema.examples;
|
|
8
11
|
if (examples) {
|
|
9
12
|
for (const example of examples) {
|
|
10
|
-
validateExample(example, schema, ctx.location.child(['examples', examples.indexOf(example)]), ctx, allowAdditionalProperties);
|
|
13
|
+
(0, utils_1.validateExample)(example, schema, ctx.location.child(['examples', examples.indexOf(example)]), ctx, allowAdditionalProperties);
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
16
|
if (schema.example !== undefined) {
|
|
@@ -17,10 +20,10 @@ export const NoInvalidSchemaExamples = (opts) => {
|
|
|
17
20
|
schema.type !== undefined) {
|
|
18
21
|
return;
|
|
19
22
|
}
|
|
20
|
-
validateExample(schema.example, schema, ctx.location.child('example'), ctx, true);
|
|
23
|
+
(0, utils_1.validateExample)(schema.example, schema, ctx.location.child('example'), ctx, true);
|
|
21
24
|
}
|
|
22
25
|
},
|
|
23
26
|
},
|
|
24
27
|
};
|
|
25
28
|
};
|
|
26
|
-
|
|
29
|
+
exports.NoInvalidSchemaExamples = NoInvalidSchemaExamples;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoPathTrailingSlash = void 0;
|
|
4
|
+
const NoPathTrailingSlash = () => {
|
|
2
5
|
return {
|
|
3
6
|
PathItem(_path, { report, key, rawLocation }) {
|
|
4
7
|
if (key.endsWith('/') && key !== '/') {
|
|
@@ -10,4 +13,4 @@ export const NoPathTrailingSlash = () => {
|
|
|
10
13
|
},
|
|
11
14
|
};
|
|
12
15
|
};
|
|
13
|
-
|
|
16
|
+
exports.NoPathTrailingSlash = NoPathTrailingSlash;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoRequiredSchemaPropertiesUndefined = void 0;
|
|
4
|
+
const ref_utils_1 = require("../../ref-utils");
|
|
5
|
+
const NoRequiredSchemaPropertiesUndefined = () => {
|
|
3
6
|
return {
|
|
4
7
|
Schema: {
|
|
5
8
|
enter(schema, { location, report, resolve }) {
|
|
@@ -12,7 +15,7 @@ export const NoRequiredSchemaPropertiesUndefined = () => {
|
|
|
12
15
|
return {};
|
|
13
16
|
}
|
|
14
17
|
visitedSchemas.add(schema);
|
|
15
|
-
if (isRef(schema)) {
|
|
18
|
+
if ((0, ref_utils_1.isRef)(schema)) {
|
|
16
19
|
return elevateProperties(resolve(schema).node);
|
|
17
20
|
}
|
|
18
21
|
return Object.assign({}, schema.properties, ...(schema.allOf?.map(elevateProperties) ?? []), ...(schema.anyOf?.map(elevateProperties) ?? []));
|
|
@@ -30,4 +33,4 @@ export const NoRequiredSchemaPropertiesUndefined = () => {
|
|
|
30
33
|
},
|
|
31
34
|
};
|
|
32
35
|
};
|
|
33
|
-
|
|
36
|
+
exports.NoRequiredSchemaPropertiesUndefined = NoRequiredSchemaPropertiesUndefined;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoSchemaTypeMismatch = void 0;
|
|
4
|
+
const NoSchemaTypeMismatch = () => {
|
|
2
5
|
return {
|
|
3
6
|
Schema(schema, { report, location }) {
|
|
4
7
|
if (schema.type === 'object' && schema.items) {
|
|
@@ -16,4 +19,4 @@ export const NoSchemaTypeMismatch = () => {
|
|
|
16
19
|
},
|
|
17
20
|
};
|
|
18
21
|
};
|
|
19
|
-
|
|
22
|
+
exports.NoSchemaTypeMismatch = NoSchemaTypeMismatch;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Operation2xxResponse = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const Operation2xxResponse = ({ validateWebhooks }) => {
|
|
3
6
|
return {
|
|
4
7
|
Paths: {
|
|
5
8
|
Responses(responses, { report }) {
|
|
6
9
|
const codes = Object.keys(responses || {});
|
|
7
|
-
validateResponseCodes(codes, '2XX', { report });
|
|
10
|
+
(0, utils_1.validateResponseCodes)(codes, '2XX', { report });
|
|
8
11
|
},
|
|
9
12
|
},
|
|
10
13
|
WebhooksMap: {
|
|
@@ -12,9 +15,9 @@ export const Operation2xxResponse = ({ validateWebhooks }) => {
|
|
|
12
15
|
if (!validateWebhooks)
|
|
13
16
|
return;
|
|
14
17
|
const codes = Object.keys(responses || {});
|
|
15
|
-
validateResponseCodes(codes, '2XX', { report });
|
|
18
|
+
(0, utils_1.validateResponseCodes)(codes, '2XX', { report });
|
|
16
19
|
},
|
|
17
20
|
},
|
|
18
21
|
};
|
|
19
22
|
};
|
|
20
|
-
|
|
23
|
+
exports.Operation2xxResponse = Operation2xxResponse;
|