@redocly/openapi-core 0.0.0-snapshot.1744188073 → 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 -53
- 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,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResponseContainsProperty = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
|
+
const ResponseContainsProperty = (options) => {
|
|
3
6
|
const names = options.names || {};
|
|
4
7
|
let key;
|
|
5
8
|
return {
|
|
@@ -16,8 +19,8 @@ export const ResponseContainsProperty = (options) => {
|
|
|
16
19
|
if (schema.type !== 'object')
|
|
17
20
|
return;
|
|
18
21
|
const expectedProperties = names[key] ||
|
|
19
|
-
names[getMatchingStatusCodeRange(key)] ||
|
|
20
|
-
names[getMatchingStatusCodeRange(key).toLowerCase()] ||
|
|
22
|
+
names[(0, utils_1.getMatchingStatusCodeRange)(key)] ||
|
|
23
|
+
names[(0, utils_1.getMatchingStatusCodeRange)(key).toLowerCase()] ||
|
|
21
24
|
[];
|
|
22
25
|
for (const expectedProperty of expectedProperties) {
|
|
23
26
|
if (!schema.properties?.[expectedProperty]) {
|
|
@@ -33,4 +36,4 @@ export const ResponseContainsProperty = (options) => {
|
|
|
33
36
|
},
|
|
34
37
|
};
|
|
35
38
|
};
|
|
36
|
-
|
|
39
|
+
exports.ResponseContainsProperty = ResponseContainsProperty;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResponseMimeType = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
|
+
const ResponseMimeType = ({ allowedValues }) => {
|
|
3
6
|
return {
|
|
4
7
|
Paths: {
|
|
5
8
|
Response: {
|
|
6
9
|
leave(response, ctx) {
|
|
7
|
-
validateMimeTypeOAS3({ type: 'produces', value: response }, ctx, allowedValues);
|
|
10
|
+
(0, utils_1.validateMimeTypeOAS3)({ type: 'produces', value: response }, ctx, allowedValues);
|
|
8
11
|
},
|
|
9
12
|
},
|
|
10
13
|
Callback: {
|
|
11
14
|
Response() { },
|
|
12
15
|
RequestBody: {
|
|
13
16
|
leave(requestBody, ctx) {
|
|
14
|
-
validateMimeTypeOAS3({ type: 'produces', value: requestBody }, ctx, allowedValues);
|
|
17
|
+
(0, utils_1.validateMimeTypeOAS3)({ type: 'produces', value: requestBody }, ctx, allowedValues);
|
|
15
18
|
},
|
|
16
19
|
},
|
|
17
20
|
},
|
|
@@ -19,10 +22,10 @@ export const ResponseMimeType = ({ allowedValues }) => {
|
|
|
19
22
|
WebhooksMap: {
|
|
20
23
|
RequestBody: {
|
|
21
24
|
leave(requestBody, ctx) {
|
|
22
|
-
validateMimeTypeOAS3({ type: 'produces', value: requestBody }, ctx, allowedValues);
|
|
25
|
+
(0, utils_1.validateMimeTypeOAS3)({ type: 'produces', value: requestBody }, ctx, allowedValues);
|
|
23
26
|
},
|
|
24
27
|
},
|
|
25
28
|
},
|
|
26
29
|
};
|
|
27
30
|
};
|
|
28
|
-
|
|
31
|
+
exports.ResponseMimeType = ResponseMimeType;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpecComponentsInvalidMapName = void 0;
|
|
4
|
+
const SpecComponentsInvalidMapName = () => {
|
|
2
5
|
const KEYS_REGEX = '^[a-zA-Z0-9\\.\\-_]+$';
|
|
3
6
|
function validateKey(key, report, location, component) {
|
|
4
7
|
if (!new RegExp(KEYS_REGEX).test(key)) {
|
|
@@ -56,4 +59,4 @@ export const SpecComponentsInvalidMapName = () => {
|
|
|
56
59
|
},
|
|
57
60
|
};
|
|
58
61
|
};
|
|
59
|
-
|
|
62
|
+
exports.SpecComponentsInvalidMapName = SpecComponentsInvalidMapName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Oas3Parameter, OasRef, Oas3Tag } from '../../typings/openapi
|
|
2
|
-
import type { Oas2Parameter } from '../../typings/swagger
|
|
3
|
-
import type { StatsAccumulator } from '../../typings/common
|
|
1
|
+
import type { Oas3Parameter, OasRef, Oas3Tag } from '../../typings/openapi';
|
|
2
|
+
import type { Oas2Parameter } from '../../typings/swagger';
|
|
3
|
+
import type { StatsAccumulator } from '../../typings/common';
|
|
4
4
|
export declare const Stats: (statsAccumulator: StatsAccumulator) => {
|
|
5
5
|
ExternalDocs: {
|
|
6
6
|
leave(): void;
|
|
@@ -39,4 +39,3 @@ export declare const Stats: (statsAccumulator: StatsAccumulator) => {
|
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
|
-
//# sourceMappingURL=stats.d.ts.map
|
package/lib/rules/other/stats.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Stats = void 0;
|
|
4
|
+
const Stats = (statsAccumulator) => {
|
|
2
5
|
return {
|
|
3
6
|
ExternalDocs: {
|
|
4
7
|
leave() {
|
|
@@ -69,4 +72,4 @@ export const Stats = (statsAccumulator) => {
|
|
|
69
72
|
},
|
|
70
73
|
};
|
|
71
74
|
};
|
|
72
|
-
|
|
75
|
+
exports.Stats = Stats;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.preprocessors = exports.rules = void 0;
|
|
4
|
+
const assertions_1 = require("../common/assertions");
|
|
5
|
+
const info_contact_1 = require("../common/info-contact");
|
|
6
|
+
const struct_1 = require("../common/struct");
|
|
7
|
+
exports.rules = {
|
|
8
|
+
'info-contact': info_contact_1.InfoContact,
|
|
9
|
+
struct: struct_1.Struct,
|
|
10
|
+
assertions: assertions_1.Assertions,
|
|
8
11
|
};
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
+
exports.preprocessors = {};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoCriteriaXpath = void 0;
|
|
4
|
+
const NoCriteriaXpath = () => {
|
|
2
5
|
return {
|
|
3
6
|
CriterionObject: {
|
|
4
7
|
enter(criteria, { report, location }) {
|
|
@@ -15,4 +18,4 @@ export const NoCriteriaXpath = () => {
|
|
|
15
18
|
},
|
|
16
19
|
};
|
|
17
20
|
};
|
|
18
|
-
|
|
21
|
+
exports.NoCriteriaXpath = NoCriteriaXpath;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RespectSupportedVersions = void 0;
|
|
4
|
+
const arazzo_1 = require("../../typings/arazzo");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
const RespectSupportedVersions = () => {
|
|
7
|
+
const supportedVersions = arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.join(', ');
|
|
5
8
|
return {
|
|
6
9
|
Root: {
|
|
7
10
|
enter(root, { report, location }) {
|
|
8
|
-
if (!ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.includes(root.arazzo)) {
|
|
11
|
+
if (!arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.includes(root.arazzo)) {
|
|
9
12
|
report({
|
|
10
|
-
message: `Only ${supportedVersions} Arazzo ${pluralize('version is', ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.length)} fully supported by Respect.`,
|
|
13
|
+
message: `Only ${supportedVersions} Arazzo ${(0, utils_1.pluralize)('version is', arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.length)} fully supported by Respect.`,
|
|
11
14
|
location: location.child('arazzo'),
|
|
12
15
|
});
|
|
13
16
|
}
|
|
@@ -15,4 +18,4 @@ export const RespectSupportedVersions = () => {
|
|
|
15
18
|
},
|
|
16
19
|
};
|
|
17
20
|
};
|
|
18
|
-
|
|
21
|
+
exports.RespectSupportedVersions = RespectSupportedVersions;
|
package/lib/rules/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Location } from '../ref-utils
|
|
2
|
-
import type { Oas3Schema, Oas3_1Schema, Referenced } from '../typings/openapi
|
|
3
|
-
import type { UserContext } from '../walk
|
|
1
|
+
import { Location } from '../ref-utils';
|
|
2
|
+
import type { Oas3Schema, Oas3_1Schema, Referenced } from '../typings/openapi';
|
|
3
|
+
import type { UserContext } from '../walk';
|
|
4
4
|
export declare function oasTypeOf(value: unknown): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "integer" | "array" | "null";
|
|
5
5
|
/**
|
|
6
6
|
* Checks if value matches specified JSON schema type
|
|
@@ -20,4 +20,3 @@ export declare function validateExample(example: any, schema: Referenced<Oas3Sch
|
|
|
20
20
|
export declare function getAdditionalPropertiesOption(opts: Record<string, any>): boolean;
|
|
21
21
|
export declare function validateSchemaEnumType(schemaEnum: string[], propertyValue: string, propName: string, refLocation: Location | undefined, { report, location }: UserContext): void;
|
|
22
22
|
export declare function validateResponseCodes(responseCodes: string[], codeRange: string, { report }: UserContext): void;
|
|
23
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/lib/rules/utils.js
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.oasTypeOf = oasTypeOf;
|
|
4
|
+
exports.matchesJsonSchemaType = matchesJsonSchemaType;
|
|
5
|
+
exports.missingRequiredField = missingRequiredField;
|
|
6
|
+
exports.missingRequiredOneOfFields = missingRequiredOneOfFields;
|
|
7
|
+
exports.fieldNonEmpty = fieldNonEmpty;
|
|
8
|
+
exports.validateDefinedAndNonEmpty = validateDefinedAndNonEmpty;
|
|
9
|
+
exports.validateOneOfDefinedAndNonEmpty = validateOneOfDefinedAndNonEmpty;
|
|
10
|
+
exports.getSuggest = getSuggest;
|
|
11
|
+
exports.validateExample = validateExample;
|
|
12
|
+
exports.getAdditionalPropertiesOption = getAdditionalPropertiesOption;
|
|
13
|
+
exports.validateSchemaEnumType = validateSchemaEnumType;
|
|
14
|
+
exports.validateResponseCodes = validateResponseCodes;
|
|
15
|
+
const levenshtein = require("js-levenshtein");
|
|
16
|
+
const ref_utils_1 = require("../ref-utils");
|
|
17
|
+
const ajv_1 = require("./ajv");
|
|
18
|
+
const utils_1 = require("../utils");
|
|
19
|
+
function oasTypeOf(value) {
|
|
6
20
|
if (Array.isArray(value)) {
|
|
7
21
|
return 'array';
|
|
8
22
|
}
|
|
@@ -23,7 +37,7 @@ export function oasTypeOf(value) {
|
|
|
23
37
|
* @param {JSONSchemaType} type - JSON Schema type
|
|
24
38
|
* @returns boolean
|
|
25
39
|
*/
|
|
26
|
-
|
|
40
|
+
function matchesJsonSchemaType(value, type, nullable) {
|
|
27
41
|
if (nullable && value === null) {
|
|
28
42
|
return true;
|
|
29
43
|
}
|
|
@@ -40,19 +54,19 @@ export function matchesJsonSchemaType(value, type, nullable) {
|
|
|
40
54
|
return typeof value === type;
|
|
41
55
|
}
|
|
42
56
|
}
|
|
43
|
-
|
|
57
|
+
function missingRequiredField(type, field) {
|
|
44
58
|
return `${type} object should contain \`${field}\` field.`;
|
|
45
59
|
}
|
|
46
|
-
|
|
60
|
+
function missingRequiredOneOfFields(type, fields) {
|
|
47
61
|
return `${type} object should contain one of the fields: ${fields
|
|
48
62
|
.map((field) => `\`${field}\``)
|
|
49
63
|
.join(', ')}.`;
|
|
50
64
|
}
|
|
51
|
-
|
|
65
|
+
function fieldNonEmpty(type, field) {
|
|
52
66
|
return `${type} object \`${field}\` must be non-empty string.`;
|
|
53
67
|
}
|
|
54
|
-
|
|
55
|
-
if (!isPlainObject(value)) {
|
|
68
|
+
function validateDefinedAndNonEmpty(fieldName, value, ctx) {
|
|
69
|
+
if (!(0, utils_1.isPlainObject)(value)) {
|
|
56
70
|
return;
|
|
57
71
|
}
|
|
58
72
|
if (value[fieldName] === undefined) {
|
|
@@ -68,8 +82,8 @@ export function validateDefinedAndNonEmpty(fieldName, value, ctx) {
|
|
|
68
82
|
});
|
|
69
83
|
}
|
|
70
84
|
}
|
|
71
|
-
|
|
72
|
-
if (!isPlainObject(value)) {
|
|
85
|
+
function validateOneOfDefinedAndNonEmpty(fieldNames, value, ctx) {
|
|
86
|
+
if (!(0, utils_1.isPlainObject)(value)) {
|
|
73
87
|
return;
|
|
74
88
|
}
|
|
75
89
|
if (!fieldNames.some((fieldName) => value.hasOwnProperty(fieldName))) {
|
|
@@ -87,7 +101,7 @@ export function validateOneOfDefinedAndNonEmpty(fieldNames, value, ctx) {
|
|
|
87
101
|
}
|
|
88
102
|
}
|
|
89
103
|
}
|
|
90
|
-
|
|
104
|
+
function getSuggest(given, variants) {
|
|
91
105
|
if (given === null)
|
|
92
106
|
return variants;
|
|
93
107
|
if (typeof given !== 'string' || !variants.length)
|
|
@@ -103,15 +117,15 @@ export function getSuggest(given, variants) {
|
|
|
103
117
|
// if (bestMatch.distance <= 4) return bestMatch.string;
|
|
104
118
|
return distances.map((d) => d.variant);
|
|
105
119
|
}
|
|
106
|
-
|
|
120
|
+
function validateExample(example, schema, dataLoc, { resolve, location, report }, allowAdditionalProperties) {
|
|
107
121
|
try {
|
|
108
|
-
const { valid, errors } = validateJsonSchema(example, schema, location.child('schema'), dataLoc.pointer, resolve, allowAdditionalProperties);
|
|
122
|
+
const { valid, errors } = (0, ajv_1.validateJsonSchema)(example, schema, location.child('schema'), dataLoc.pointer, resolve, allowAdditionalProperties);
|
|
109
123
|
if (!valid) {
|
|
110
124
|
for (const error of errors) {
|
|
111
125
|
report({
|
|
112
126
|
message: `Example value must conform to the schema: ${error.message}.`,
|
|
113
127
|
location: {
|
|
114
|
-
...new Location(dataLoc.source, error.instancePath),
|
|
128
|
+
...new ref_utils_1.Location(dataLoc.source, error.instancePath),
|
|
115
129
|
reportOnKey: error.keyword === 'unevaluatedProperties' || error.keyword === 'additionalProperties',
|
|
116
130
|
},
|
|
117
131
|
from: location,
|
|
@@ -131,17 +145,17 @@ export function validateExample(example, schema, dataLoc, { resolve, location, r
|
|
|
131
145
|
});
|
|
132
146
|
}
|
|
133
147
|
}
|
|
134
|
-
|
|
148
|
+
function getAdditionalPropertiesOption(opts) {
|
|
135
149
|
if (opts.disallowAdditionalProperties === undefined) {
|
|
136
150
|
return opts.allowAdditionalProperties;
|
|
137
151
|
}
|
|
138
152
|
if (opts.allowAdditionalProperties !== undefined) {
|
|
139
|
-
showErrorForDeprecatedField('disallowAdditionalProperties', 'allowAdditionalProperties', undefined);
|
|
153
|
+
(0, utils_1.showErrorForDeprecatedField)('disallowAdditionalProperties', 'allowAdditionalProperties', undefined);
|
|
140
154
|
}
|
|
141
|
-
showWarningForDeprecatedField('disallowAdditionalProperties', 'allowAdditionalProperties');
|
|
155
|
+
(0, utils_1.showWarningForDeprecatedField)('disallowAdditionalProperties', 'allowAdditionalProperties');
|
|
142
156
|
return !opts.disallowAdditionalProperties;
|
|
143
157
|
}
|
|
144
|
-
|
|
158
|
+
function validateSchemaEnumType(schemaEnum, propertyValue, propName, refLocation, { report, location }) {
|
|
145
159
|
if (!schemaEnum) {
|
|
146
160
|
return;
|
|
147
161
|
}
|
|
@@ -156,7 +170,7 @@ export function validateSchemaEnumType(schemaEnum, propertyValue, propName, refL
|
|
|
156
170
|
});
|
|
157
171
|
}
|
|
158
172
|
}
|
|
159
|
-
|
|
173
|
+
function validateResponseCodes(responseCodes, codeRange, { report }) {
|
|
160
174
|
const responseCodeRegexp = new RegExp(`^${codeRange[0]}[0-9Xx]{2}$`);
|
|
161
175
|
const containsNeededCode = responseCodes.some((code) => (codeRange === '2XX' && code === 'default') || // It's OK to replace 2xx codes with the default
|
|
162
176
|
responseCodeRegexp.test(code));
|
|
@@ -167,4 +181,3 @@ export function validateResponseCodes(responseCodes, codeRange, { report }) {
|
|
|
167
181
|
});
|
|
168
182
|
}
|
|
169
183
|
}
|
|
170
|
-
//# sourceMappingURL=utils.js.map
|
package/lib/types/arazzo.d.ts
CHANGED
package/lib/types/arazzo.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Arazzo1Types = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const oas3_1_1 = require("./oas3_1");
|
|
6
|
+
const oas3_1 = require("./oas3");
|
|
4
7
|
const Root = {
|
|
5
8
|
properties: {
|
|
6
9
|
arazzo: { type: 'string' },
|
|
@@ -33,7 +36,7 @@ const Components = {
|
|
|
33
36
|
},
|
|
34
37
|
extensionsPrefix: 'x-',
|
|
35
38
|
};
|
|
36
|
-
const NamedInputs = mapOf('Schema');
|
|
39
|
+
const NamedInputs = (0, _1.mapOf)('Schema');
|
|
37
40
|
const Info = {
|
|
38
41
|
properties: {
|
|
39
42
|
title: { type: 'string' },
|
|
@@ -118,8 +121,8 @@ const Workflow = {
|
|
|
118
121
|
required: ['workflowId', 'steps'],
|
|
119
122
|
extensionsPrefix: 'x-',
|
|
120
123
|
};
|
|
121
|
-
const Workflows = listOf('Workflow');
|
|
122
|
-
const Steps = listOf('Step');
|
|
124
|
+
const Workflows = (0, _1.listOf)('Workflow');
|
|
125
|
+
const Steps = (0, _1.listOf)('Step');
|
|
123
126
|
const Step = {
|
|
124
127
|
properties: {
|
|
125
128
|
stepId: { type: 'string' },
|
|
@@ -128,7 +131,7 @@ const Step = {
|
|
|
128
131
|
operationPath: { type: 'string' },
|
|
129
132
|
workflowId: { type: 'string' },
|
|
130
133
|
parameters: 'Parameters',
|
|
131
|
-
successCriteria: listOf('CriterionObject'),
|
|
134
|
+
successCriteria: (0, _1.listOf)('CriterionObject'),
|
|
132
135
|
onSuccess: 'OnSuccessActionList',
|
|
133
136
|
onFailure: 'OnFailureActionList',
|
|
134
137
|
outputs: 'Outputs',
|
|
@@ -149,7 +152,7 @@ const RequestBody = {
|
|
|
149
152
|
properties: {
|
|
150
153
|
contentType: { type: 'string' },
|
|
151
154
|
payload: {},
|
|
152
|
-
replacements: listOf('Replacement'),
|
|
155
|
+
replacements: (0, _1.listOf)('Replacement'),
|
|
153
156
|
},
|
|
154
157
|
required: ['payload'],
|
|
155
158
|
extensionsPrefix: 'x-',
|
|
@@ -231,7 +234,7 @@ const SuccessActionObject = {
|
|
|
231
234
|
type: { type: 'string', enum: ['goto', 'end'] },
|
|
232
235
|
stepId: { type: 'string' },
|
|
233
236
|
workflowId: { type: 'string' },
|
|
234
|
-
criteria: listOf('CriterionObject'),
|
|
237
|
+
criteria: (0, _1.listOf)('CriterionObject'),
|
|
235
238
|
},
|
|
236
239
|
required: ['type', 'name'],
|
|
237
240
|
};
|
|
@@ -254,7 +257,7 @@ const FailureActionObject = {
|
|
|
254
257
|
stepId: { type: 'string' },
|
|
255
258
|
retryAfter: { type: 'number' },
|
|
256
259
|
retryLimit: { type: 'number' },
|
|
257
|
-
criteria: listOf('CriterionObject'),
|
|
260
|
+
criteria: (0, _1.listOf)('CriterionObject'),
|
|
258
261
|
},
|
|
259
262
|
required: ['type', 'name'],
|
|
260
263
|
};
|
|
@@ -269,7 +272,7 @@ const OnFailureActionList = {
|
|
|
269
272
|
}
|
|
270
273
|
},
|
|
271
274
|
};
|
|
272
|
-
|
|
275
|
+
exports.Arazzo1Types = {
|
|
273
276
|
Root,
|
|
274
277
|
Info,
|
|
275
278
|
SourceDescriptions,
|
|
@@ -293,19 +296,18 @@ export const Arazzo1Types = {
|
|
|
293
296
|
OnSuccessActionList,
|
|
294
297
|
FailureActionObject,
|
|
295
298
|
OnFailureActionList,
|
|
296
|
-
Schema,
|
|
297
|
-
NamedSchemas: mapOf('Schema'),
|
|
298
|
-
ExternalDocs,
|
|
299
|
-
DiscriminatorMapping,
|
|
300
|
-
Discriminator,
|
|
301
|
-
DependentRequired,
|
|
302
|
-
SchemaProperties,
|
|
303
|
-
PatternProperties: SchemaProperties,
|
|
299
|
+
Schema: oas3_1_1.Schema,
|
|
300
|
+
NamedSchemas: (0, _1.mapOf)('Schema'),
|
|
301
|
+
ExternalDocs: oas3_1.ExternalDocs,
|
|
302
|
+
DiscriminatorMapping: oas3_1.DiscriminatorMapping,
|
|
303
|
+
Discriminator: oas3_1.Discriminator,
|
|
304
|
+
DependentRequired: oas3_1_1.DependentRequired,
|
|
305
|
+
SchemaProperties: oas3_1_1.SchemaProperties,
|
|
306
|
+
PatternProperties: oas3_1_1.SchemaProperties,
|
|
304
307
|
Components,
|
|
305
308
|
NamedInputs,
|
|
306
309
|
NamedParameters,
|
|
307
310
|
NamedSuccessActions,
|
|
308
311
|
NamedFailureActions,
|
|
309
|
-
Xml,
|
|
312
|
+
Xml: oas3_1.Xml,
|
|
310
313
|
};
|
|
311
|
-
//# sourceMappingURL=arazzo.js.map
|
package/lib/types/asyncapi2.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NodeType } from '
|
|
1
|
+
import type { NodeType } from '.';
|
|
2
2
|
export declare const Tag: NodeType;
|
|
3
3
|
export declare const ExternalDocs: NodeType;
|
|
4
4
|
export declare const ServerMap: NodeType;
|
|
@@ -15,4 +15,3 @@ export declare const SecuritySchemeFlows: NodeType;
|
|
|
15
15
|
export declare const Dependencies: NodeType;
|
|
16
16
|
export declare const AsyncApi2Bindings: Record<string, NodeType>;
|
|
17
17
|
export declare const AsyncApi2Types: Record<string, NodeType>;
|
|
18
|
-
//# sourceMappingURL=asyncapi2.d.ts.map
|