@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.OperationDescriptionOverride = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
|
+
const OperationDescriptionOverride = ({ operationIds }) => {
|
|
3
6
|
return {
|
|
4
7
|
Operation: {
|
|
5
8
|
leave(operation, { report, location }) {
|
|
@@ -10,7 +13,7 @@ export const OperationDescriptionOverride = ({ operationIds }) => {
|
|
|
10
13
|
const operationId = operation.operationId;
|
|
11
14
|
if (operationIds[operationId]) {
|
|
12
15
|
try {
|
|
13
|
-
operation.description = readFileAsStringSync(operationIds[operationId]);
|
|
16
|
+
operation.description = (0, utils_1.readFileAsStringSync)(operationIds[operationId]);
|
|
14
17
|
}
|
|
15
18
|
catch (e) {
|
|
16
19
|
report({
|
|
@@ -23,4 +26,4 @@ export const OperationDescriptionOverride = ({ operationIds }) => {
|
|
|
23
26
|
},
|
|
24
27
|
};
|
|
25
28
|
};
|
|
26
|
-
|
|
29
|
+
exports.OperationDescriptionOverride = OperationDescriptionOverride;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RegistryDependencies = void 0;
|
|
4
|
+
const domains_1 = require("../../redocly/domains");
|
|
5
|
+
const RegistryDependencies = () => {
|
|
6
|
+
const registryDependencies = new Set();
|
|
7
|
+
return {
|
|
8
|
+
Root: {
|
|
9
|
+
leave(_, ctx) {
|
|
10
|
+
const data = ctx.getVisitorData();
|
|
11
|
+
data.links = Array.from(registryDependencies);
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
ref(node) {
|
|
15
|
+
if (node.$ref) {
|
|
16
|
+
const link = node.$ref.split('#/')[0];
|
|
17
|
+
if ((0, domains_1.isRedoclyRegistryURL)(link)) {
|
|
18
|
+
registryDependencies.add(link);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
exports.RegistryDependencies = RegistryDependencies;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RemoveXInternal = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
|
+
const ref_utils_1 = require("../../ref-utils");
|
|
3
6
|
const DEFAULT_INTERNAL_PROPERTY_NAME = 'x-internal';
|
|
4
|
-
|
|
7
|
+
const RemoveXInternal = ({ internalFlagProperty = DEFAULT_INTERNAL_PROPERTY_NAME, }) => {
|
|
5
8
|
function removeInternal(node, ctx, originalMapping) {
|
|
6
9
|
const { parent, key } = ctx;
|
|
7
10
|
let didDelete = false;
|
|
8
11
|
if (Array.isArray(node)) {
|
|
9
12
|
for (let i = 0; i < node.length; i++) {
|
|
10
|
-
if (isRef(node[i])) {
|
|
13
|
+
if ((0, ref_utils_1.isRef)(node[i])) {
|
|
11
14
|
const resolved = ctx.resolve(node[i]);
|
|
12
15
|
if (resolved.node?.[internalFlagProperty]) {
|
|
13
16
|
// First, remove the reference in the discriminator mapping, if it exists:
|
|
14
|
-
if (isPlainObject(parent.discriminator?.mapping)) {
|
|
17
|
+
if ((0, utils_1.isPlainObject)(parent.discriminator?.mapping)) {
|
|
15
18
|
for (const mapping in parent.discriminator.mapping) {
|
|
16
19
|
if (originalMapping?.[mapping] === node[i].$ref) {
|
|
17
20
|
delete parent.discriminator.mapping[mapping];
|
|
@@ -30,22 +33,22 @@ export const RemoveXInternal = ({ internalFlagProperty = DEFAULT_INTERNAL_PROPER
|
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
|
-
else if (isPlainObject(node)) {
|
|
36
|
+
else if ((0, utils_1.isPlainObject)(node)) {
|
|
34
37
|
for (const key of Object.keys(node)) {
|
|
35
|
-
if (isRef(node[key])) {
|
|
38
|
+
if ((0, ref_utils_1.isRef)(node[key])) {
|
|
36
39
|
const resolved = ctx.resolve(node[key]);
|
|
37
|
-
if (isPlainObject(resolved.node) && resolved.node?.[internalFlagProperty]) {
|
|
40
|
+
if ((0, utils_1.isPlainObject)(resolved.node) && resolved.node?.[internalFlagProperty]) {
|
|
38
41
|
delete node[key];
|
|
39
42
|
didDelete = true;
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
|
-
if (isPlainObject(node[key]) && node[key]?.[internalFlagProperty]) {
|
|
45
|
+
if ((0, utils_1.isPlainObject)(node[key]) && node[key]?.[internalFlagProperty]) {
|
|
43
46
|
delete node[key];
|
|
44
47
|
didDelete = true;
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
|
-
if (didDelete && (isEmptyObject(node) || isEmptyArray(node))) {
|
|
51
|
+
if (didDelete && ((0, utils_1.isEmptyObject)(node) || (0, utils_1.isEmptyArray)(node))) {
|
|
49
52
|
delete parent[key];
|
|
50
53
|
}
|
|
51
54
|
}
|
|
@@ -63,4 +66,4 @@ export const RemoveXInternal = ({ internalFlagProperty = DEFAULT_INTERNAL_PROPER
|
|
|
63
66
|
},
|
|
64
67
|
};
|
|
65
68
|
};
|
|
66
|
-
|
|
69
|
+
exports.RemoveXInternal = RemoveXInternal;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { Oas3Decorator, Oas2Decorator } from '../../visitors
|
|
1
|
+
import type { Oas3Decorator, Oas2Decorator } from '../../visitors';
|
|
2
2
|
export declare const TagDescriptionOverride: Oas3Decorator | Oas2Decorator;
|
|
3
|
-
//# sourceMappingURL=tag-description-override.d.ts.map
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TagDescriptionOverride = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
|
+
const TagDescriptionOverride = ({ tagNames }) => {
|
|
3
6
|
return {
|
|
4
7
|
Tag: {
|
|
5
8
|
leave(tag, { report }) {
|
|
@@ -7,7 +10,7 @@ export const TagDescriptionOverride = ({ tagNames }) => {
|
|
|
7
10
|
throw new Error(`Parameter "tagNames" is not provided for "tag-description-override" rule`);
|
|
8
11
|
if (tagNames[tag.name]) {
|
|
9
12
|
try {
|
|
10
|
-
tag.description = readFileAsStringSync(tagNames[tag.name]);
|
|
13
|
+
tag.description = (0, utils_1.readFileAsStringSync)(tagNames[tag.name]);
|
|
11
14
|
}
|
|
12
15
|
catch (e) {
|
|
13
16
|
report({
|
|
@@ -19,4 +22,4 @@ export const TagDescriptionOverride = ({ tagNames }) => {
|
|
|
19
22
|
},
|
|
20
23
|
};
|
|
21
24
|
};
|
|
22
|
-
|
|
25
|
+
exports.TagDescriptionOverride = TagDescriptionOverride;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Oas2Decorator } from '../../visitors
|
|
1
|
+
import type { Oas2Decorator } from '../../visitors';
|
|
2
2
|
export declare const decorators: {
|
|
3
|
+
'registry-dependencies': Oas2Decorator;
|
|
3
4
|
'operation-description-override': Oas2Decorator;
|
|
4
5
|
'tag-description-override': Oas2Decorator;
|
|
5
6
|
'info-description-override': Oas2Decorator;
|
|
@@ -8,4 +9,3 @@ export declare const decorators: {
|
|
|
8
9
|
'filter-in': Oas2Decorator;
|
|
9
10
|
'filter-out': Oas2Decorator;
|
|
10
11
|
};
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decorators = void 0;
|
|
4
|
+
const registry_dependencies_1 = require("../common/registry-dependencies");
|
|
5
|
+
const operation_description_override_1 = require("../common/operation-description-override");
|
|
6
|
+
const tag_description_override_1 = require("../common/tag-description-override");
|
|
7
|
+
const info_description_override_1 = require("../common/info-description-override");
|
|
8
|
+
const info_override_1 = require("../common/info-override");
|
|
9
|
+
const remove_x_internal_1 = require("../common/remove-x-internal");
|
|
10
|
+
const filter_in_1 = require("../common/filters/filter-in");
|
|
11
|
+
const filter_out_1 = require("../common/filters/filter-out");
|
|
12
|
+
exports.decorators = {
|
|
13
|
+
'registry-dependencies': registry_dependencies_1.RegistryDependencies,
|
|
14
|
+
'operation-description-override': operation_description_override_1.OperationDescriptionOverride,
|
|
15
|
+
'tag-description-override': tag_description_override_1.TagDescriptionOverride,
|
|
16
|
+
'info-description-override': info_description_override_1.InfoDescriptionOverride,
|
|
17
|
+
'info-override': info_override_1.InfoOverride,
|
|
18
|
+
'remove-x-internal': remove_x_internal_1.RemoveXInternal,
|
|
19
|
+
'filter-in': filter_in_1.FilterIn,
|
|
20
|
+
'filter-out': filter_out_1.FilterOut,
|
|
16
21
|
};
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RemoveUnusedComponents = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
|
+
const RemoveUnusedComponents = () => {
|
|
3
6
|
const components = new Map();
|
|
4
7
|
function registerComponent(location, componentType, name) {
|
|
5
8
|
components.set(location.absolutePointer, {
|
|
@@ -21,7 +24,7 @@ export const RemoveUnusedComponents = () => {
|
|
|
21
24
|
removedPaths.push(path);
|
|
22
25
|
delete root[componentType][name];
|
|
23
26
|
components.delete(path);
|
|
24
|
-
if (isEmptyObject(root[componentType])) {
|
|
27
|
+
if ((0, utils_1.isEmptyObject)(root[componentType])) {
|
|
25
28
|
delete root[componentType];
|
|
26
29
|
}
|
|
27
30
|
}
|
|
@@ -83,4 +86,4 @@ export const RemoveUnusedComponents = () => {
|
|
|
83
86
|
},
|
|
84
87
|
};
|
|
85
88
|
};
|
|
86
|
-
|
|
89
|
+
exports.RemoveUnusedComponents = RemoveUnusedComponents;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Oas3Decorator } from '../../visitors
|
|
1
|
+
import type { Oas3Decorator } from '../../visitors';
|
|
2
2
|
export declare const decorators: {
|
|
3
|
+
'registry-dependencies': Oas3Decorator;
|
|
3
4
|
'operation-description-override': Oas3Decorator;
|
|
4
5
|
'tag-description-override': Oas3Decorator;
|
|
5
6
|
'info-description-override': Oas3Decorator;
|
|
@@ -9,4 +10,3 @@ export declare const decorators: {
|
|
|
9
10
|
'filter-out': Oas3Decorator;
|
|
10
11
|
'media-type-examples-override': Oas3Decorator;
|
|
11
12
|
};
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decorators = void 0;
|
|
4
|
+
const registry_dependencies_1 = require("../common/registry-dependencies");
|
|
5
|
+
const operation_description_override_1 = require("../common/operation-description-override");
|
|
6
|
+
const tag_description_override_1 = require("../common/tag-description-override");
|
|
7
|
+
const info_description_override_1 = require("../common/info-description-override");
|
|
8
|
+
const info_override_1 = require("../common/info-override");
|
|
9
|
+
const remove_x_internal_1 = require("../common/remove-x-internal");
|
|
10
|
+
const filter_in_1 = require("../common/filters/filter-in");
|
|
11
|
+
const filter_out_1 = require("../common/filters/filter-out");
|
|
12
|
+
const media_type_examples_override_1 = require("../common/media-type-examples-override");
|
|
13
|
+
exports.decorators = {
|
|
14
|
+
'registry-dependencies': registry_dependencies_1.RegistryDependencies,
|
|
15
|
+
'operation-description-override': operation_description_override_1.OperationDescriptionOverride,
|
|
16
|
+
'tag-description-override': tag_description_override_1.TagDescriptionOverride,
|
|
17
|
+
'info-description-override': info_description_override_1.InfoDescriptionOverride,
|
|
18
|
+
'info-override': info_override_1.InfoOverride,
|
|
19
|
+
'remove-x-internal': remove_x_internal_1.RemoveXInternal,
|
|
20
|
+
'filter-in': filter_in_1.FilterIn,
|
|
21
|
+
'filter-out': filter_out_1.FilterOut,
|
|
22
|
+
'media-type-examples-override': media_type_examples_override_1.MediaTypeExamplesOverride,
|
|
18
23
|
};
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RemoveUnusedComponents = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
|
+
const RemoveUnusedComponents = () => {
|
|
3
6
|
const components = new Map();
|
|
4
7
|
function registerComponent(location, componentType, name) {
|
|
5
8
|
components.set(location.absolutePointer, {
|
|
@@ -19,7 +22,7 @@ export const RemoveUnusedComponents = () => {
|
|
|
19
22
|
const componentChild = root.components[componentType];
|
|
20
23
|
delete componentChild[name];
|
|
21
24
|
components.delete(path);
|
|
22
|
-
if (isEmptyObject(componentChild)) {
|
|
25
|
+
if ((0, utils_1.isEmptyObject)(componentChild)) {
|
|
23
26
|
delete root.components[componentType];
|
|
24
27
|
}
|
|
25
28
|
}
|
|
@@ -55,7 +58,7 @@ export const RemoveUnusedComponents = () => {
|
|
|
55
58
|
leave(root, ctx) {
|
|
56
59
|
const data = ctx.getVisitorData();
|
|
57
60
|
data.removedCount = removeUnusedComponents(root, []);
|
|
58
|
-
if (isEmptyObject(root.components)) {
|
|
61
|
+
if ((0, utils_1.isEmptyObject)(root.components)) {
|
|
59
62
|
delete root.components;
|
|
60
63
|
}
|
|
61
64
|
},
|
|
@@ -94,4 +97,4 @@ export const RemoveUnusedComponents = () => {
|
|
|
94
97
|
},
|
|
95
98
|
};
|
|
96
99
|
};
|
|
97
|
-
|
|
100
|
+
exports.RemoveUnusedComponents = RemoveUnusedComponents;
|
package/lib/env.d.ts
CHANGED
package/lib/env.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.env = exports.isBrowser = void 0;
|
|
4
|
+
exports.isBrowser = typeof window !== 'undefined' ||
|
|
2
5
|
typeof process === 'undefined' ||
|
|
3
6
|
process?.platform === 'browser'; // main and worker thread
|
|
4
|
-
|
|
5
|
-
//# sourceMappingURL=env.js.map
|
|
7
|
+
exports.env = exports.isBrowser ? {} : process.env || {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as yamlAst from 'yaml-ast-parser';
|
|
2
|
-
import type { LineColLocationObject, LocationObject } from '../walk
|
|
2
|
+
import type { LineColLocationObject, LocationObject } from '../walk';
|
|
3
3
|
type YAMLMapping = yamlAst.YAMLMapping & {
|
|
4
4
|
kind: yamlAst.Kind.MAPPING;
|
|
5
5
|
};
|
|
@@ -20,4 +20,3 @@ export declare function getCodeframe(location: LineColLocationObject, color: boo
|
|
|
20
20
|
export declare function getLineColLocation(location: LocationObject): LineColLocationObject;
|
|
21
21
|
export declare function getAstNodeByPointer(root: YAMLNode, pointer: string, reportOnKey: boolean): YAMLMapping | YAMLMap | YAMLAnchorReference | YAMLSequence | yamlAst.YAMLScalar | undefined;
|
|
22
22
|
export {};
|
|
23
|
-
//# sourceMappingURL=codeframes.d.ts.map
|
package/lib/format/codeframes.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCodeframe = getCodeframe;
|
|
4
|
+
exports.getLineColLocation = getLineColLocation;
|
|
5
|
+
exports.getAstNodeByPointer = getAstNodeByPointer;
|
|
6
|
+
const yamlAst = require("yaml-ast-parser");
|
|
7
|
+
const ref_utils_1 = require("../ref-utils");
|
|
8
|
+
const logger_1 = require("../logger");
|
|
4
9
|
const MAX_LINE_LENGTH = 150;
|
|
5
10
|
const MAX_CODEFRAME_LINES = 3;
|
|
6
11
|
// TODO: temporary
|
|
7
12
|
function parsePointer(pointer) {
|
|
8
|
-
return pointer.substr(2).split('/').map(unescapePointer);
|
|
13
|
+
return pointer.substr(2).split('/').map(ref_utils_1.unescapePointer);
|
|
9
14
|
}
|
|
10
|
-
|
|
11
|
-
colorOptions.enabled = color;
|
|
15
|
+
function getCodeframe(location, color) {
|
|
16
|
+
logger_1.colorOptions.enabled = color;
|
|
12
17
|
const { start, end = { line: start.line, col: start.col + 1 }, source } = location;
|
|
13
18
|
const lines = source.getLines();
|
|
14
19
|
const startLineNum = start.line;
|
|
@@ -27,19 +32,19 @@ export function getCodeframe(location, color) {
|
|
|
27
32
|
currentPad = padSize(line);
|
|
28
33
|
const startIdx = i === startLineNum ? start.col - 1 : currentPad;
|
|
29
34
|
const endIdx = i === endLineNum ? end.col - 1 : line.length;
|
|
30
|
-
prefixedLines.push([`${i}`, markLine(line, startIdx, endIdx, colorize.red)]);
|
|
35
|
+
prefixedLines.push([`${i}`, markLine(line, startIdx, endIdx, logger_1.colorize.red)]);
|
|
31
36
|
if (!color)
|
|
32
37
|
prefixedLines.push(['', underlineLine(line, startIdx, endIdx)]);
|
|
33
38
|
}
|
|
34
39
|
if (skipLines > 0) {
|
|
35
40
|
prefixedLines.push([
|
|
36
41
|
`…`,
|
|
37
|
-
`${whitespace(currentPad)}${colorize.gray(`< ${skipLines} more lines >`)}`,
|
|
42
|
+
`${whitespace(currentPad)}${logger_1.colorize.gray(`< ${skipLines} more lines >`)}`,
|
|
38
43
|
]);
|
|
39
44
|
// print last line
|
|
40
45
|
prefixedLines.push([
|
|
41
46
|
`${endLineNum}`,
|
|
42
|
-
markLine(lines[endLineNum - 1], -1, end.col - 1, colorize.red),
|
|
47
|
+
markLine(lines[endLineNum - 1], -1, end.col - 1, logger_1.colorize.red),
|
|
43
48
|
]);
|
|
44
49
|
if (!color)
|
|
45
50
|
prefixedLines.push(['', underlineLine(lines[endLineNum - 1], -1, end.col - 1)]);
|
|
@@ -51,7 +56,7 @@ export function getCodeframe(location, color) {
|
|
|
51
56
|
[`${endLineNum + 1}`, markLine(lines[endLineNum - 1 + 1])],
|
|
52
57
|
[`${endLineNum + 2}`, markLine(lines[endLineNum - 1 + 2])],
|
|
53
58
|
]);
|
|
54
|
-
function markLine(line, startIdx = -1, endIdx = +Infinity, variant = colorize.gray) {
|
|
59
|
+
function markLine(line, startIdx = -1, endIdx = +Infinity, variant = logger_1.colorize.gray) {
|
|
55
60
|
if (!color)
|
|
56
61
|
return line;
|
|
57
62
|
if (!line)
|
|
@@ -68,14 +73,14 @@ function printPrefixedLines(lines) {
|
|
|
68
73
|
const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));
|
|
69
74
|
const dedentLen = Math.min(...existingLines.map(([_, line]) => (line === '' ? Infinity : padSize(line))));
|
|
70
75
|
return existingLines
|
|
71
|
-
.map(([prefix, line]) => colorize.gray(leftPad(padLen, prefix) + ' |') +
|
|
76
|
+
.map(([prefix, line]) => logger_1.colorize.gray(leftPad(padLen, prefix) + ' |') +
|
|
72
77
|
(line ? ' ' + limitLineLength(line.substring(dedentLen)) : ''))
|
|
73
78
|
.join('\n');
|
|
74
79
|
}
|
|
75
80
|
function limitLineLength(line, maxLen = MAX_LINE_LENGTH) {
|
|
76
81
|
const overflowLen = line.length - maxLen;
|
|
77
82
|
if (overflowLen > 0) {
|
|
78
|
-
const charsMoreText = colorize.gray(`...<${overflowLen} chars>`);
|
|
83
|
+
const charsMoreText = logger_1.colorize.gray(`...<${overflowLen} chars>`);
|
|
79
84
|
return line.substring(0, maxLen - charsMoreText.length) + charsMoreText;
|
|
80
85
|
}
|
|
81
86
|
else {
|
|
@@ -102,7 +107,7 @@ function padSize(line) {
|
|
|
102
107
|
}
|
|
103
108
|
return line.length;
|
|
104
109
|
}
|
|
105
|
-
|
|
110
|
+
function getLineColLocation(location) {
|
|
106
111
|
if (location.pointer === undefined)
|
|
107
112
|
return location;
|
|
108
113
|
const { source, pointer, reportOnKey } = location;
|
|
@@ -137,7 +142,7 @@ function positionsToLoc(source, startPos, endPos) {
|
|
|
137
142
|
const end = startPos === endPos ? { ...start } : { line: currentLine, col: currentCol + 1 };
|
|
138
143
|
return { start, end };
|
|
139
144
|
}
|
|
140
|
-
|
|
145
|
+
function getAstNodeByPointer(root, pointer, reportOnKey) {
|
|
141
146
|
const pointerSegments = parsePointer(pointer);
|
|
142
147
|
if (root === undefined) {
|
|
143
148
|
return undefined;
|
|
@@ -178,4 +183,3 @@ export function getAstNodeByPointer(root, pointer, reportOnKey) {
|
|
|
178
183
|
}
|
|
179
184
|
}
|
|
180
185
|
}
|
|
181
|
-
//# sourceMappingURL=codeframes.js.map
|
package/lib/format/format.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NormalizedProblem } from '../walk
|
|
1
|
+
import type { NormalizedProblem } from '../walk';
|
|
2
2
|
export type Totals = {
|
|
3
3
|
errors: number;
|
|
4
4
|
warnings: number;
|
|
@@ -18,4 +18,3 @@ export declare function formatProblems(problems: (NormalizedProblem & {
|
|
|
18
18
|
totals: Totals;
|
|
19
19
|
version: string;
|
|
20
20
|
}): void;
|
|
21
|
-
//# sourceMappingURL=format.d.ts.map
|