@redocly/openapi-core 0.0.0-snapshot.1744801622 → 0.0.0-snapshot.1747225307
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 +2 -1
- package/lib/benchmark/benches/lint-with-many-rules.bench.d.ts.map +1 -0
- package/lib/benchmark/benches/lint-with-many-rules.bench.js +17 -19
- package/lib/benchmark/benches/lint-with-many-rules.bench.js.map +1 -0
- package/lib/benchmark/benches/lint-with-nested-rule.bench.d.ts +2 -1
- package/lib/benchmark/benches/lint-with-nested-rule.bench.d.ts.map +1 -0
- package/lib/benchmark/benches/lint-with-nested-rule.bench.js +15 -19
- package/lib/benchmark/benches/lint-with-nested-rule.bench.js.map +1 -0
- package/lib/benchmark/benches/lint-with-no-rules.bench.d.ts +2 -1
- package/lib/benchmark/benches/lint-with-no-rules.bench.d.ts.map +1 -0
- package/lib/benchmark/benches/lint-with-no-rules.bench.js +15 -19
- package/lib/benchmark/benches/lint-with-no-rules.bench.js.map +1 -0
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.d.ts +2 -1
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.d.ts.map +1 -0
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.js +15 -19
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.js.map +1 -0
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.d.ts +2 -1
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.d.ts.map +1 -0
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.js +15 -19
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.js.map +1 -0
- package/lib/benchmark/benches/recommended-oas3.bench.d.ts +2 -1
- package/lib/benchmark/benches/recommended-oas3.bench.d.ts.map +1 -0
- package/lib/benchmark/benches/recommended-oas3.bench.js +15 -18
- package/lib/benchmark/benches/recommended-oas3.bench.js.map +1 -0
- package/lib/benchmark/benches/resolve-with-no-external.bench.d.ts +2 -1
- package/lib/benchmark/benches/resolve-with-no-external.bench.d.ts.map +1 -0
- package/lib/benchmark/benches/resolve-with-no-external.bench.js +14 -17
- package/lib/benchmark/benches/resolve-with-no-external.bench.js.map +1 -0
- package/lib/benchmark/utils.d.ts +5 -4
- package/lib/benchmark/utils.d.ts.map +1 -0
- package/lib/benchmark/utils.js +11 -14
- package/lib/benchmark/utils.js.map +1 -0
- package/lib/bundle.d.ts +8 -9
- package/lib/bundle.d.ts.map +1 -0
- package/lib/bundle.js +72 -84
- package/lib/bundle.js.map +1 -0
- package/lib/config/all.d.ts +2 -1
- package/lib/config/all.d.ts.map +1 -0
- package/lib/config/all.js +2 -3
- package/lib/config/all.js.map +1 -0
- package/lib/config/builtIn.d.ts +2 -1
- package/lib/config/builtIn.d.ts.map +1 -0
- package/lib/config/builtIn.js +44 -49
- package/lib/config/builtIn.js.map +1 -0
- package/lib/config/config-resolvers.d.ts +6 -5
- package/lib/config/config-resolvers.d.ts.map +1 -0
- package/lib/config/config-resolvers.js +86 -98
- package/lib/config/config-resolvers.js.map +1 -0
- package/lib/config/config.d.ts +6 -8
- package/lib/config/config.d.ts.map +1 -0
- package/lib/config/config.js +63 -92
- package/lib/config/config.js.map +1 -0
- package/lib/config/index.d.ts +8 -7
- package/lib/config/index.d.ts.map +1 -0
- package/lib/config/index.js +8 -23
- package/lib/config/index.js.map +1 -0
- package/lib/config/load.d.ts +5 -8
- package/lib/config/load.d.ts.map +1 -0
- package/lib/config/load.js +28 -73
- package/lib/config/load.js.map +1 -0
- package/lib/config/minimal.d.ts +2 -1
- package/lib/config/minimal.d.ts.map +1 -0
- package/lib/config/minimal.js +2 -3
- package/lib/config/minimal.js.map +1 -0
- package/lib/config/recommended-strict.d.ts +2 -1
- package/lib/config/recommended-strict.d.ts.map +1 -0
- package/lib/config/recommended-strict.js +2 -3
- package/lib/config/recommended-strict.js.map +1 -0
- package/lib/config/recommended.d.ts +2 -1
- package/lib/config/recommended.d.ts.map +1 -0
- package/lib/config/recommended.js +2 -3
- package/lib/config/recommended.js.map +1 -0
- package/lib/config/rules.d.ts +4 -3
- package/lib/config/rules.d.ts.map +1 -0
- package/lib/config/rules.js +4 -6
- package/lib/config/rules.js.map +1 -0
- package/lib/config/spec.d.ts +2 -1
- package/lib/config/spec.d.ts.map +1 -0
- package/lib/config/spec.js +2 -3
- package/lib/config/spec.js.map +1 -0
- package/lib/config/types.d.ts +6 -13
- package/lib/config/types.d.ts.map +1 -0
- package/lib/config/types.js +2 -2
- package/lib/config/types.js.map +1 -0
- package/lib/config/utils.d.ts +3 -2
- package/lib/config/utils.d.ts.map +1 -0
- package/lib/config/utils.js +74 -100
- package/lib/config/utils.js.map +1 -0
- package/lib/decorators/arazzo/index.d.ts +1 -0
- package/lib/decorators/arazzo/index.d.ts.map +1 -0
- package/lib/decorators/arazzo/index.js +2 -4
- package/lib/decorators/arazzo/index.js.map +1 -0
- package/lib/decorators/async2/index.d.ts +1 -0
- package/lib/decorators/async2/index.d.ts.map +1 -0
- package/lib/decorators/async2/index.js +2 -4
- package/lib/decorators/async2/index.js.map +1 -0
- package/lib/decorators/async3/index.d.ts +1 -0
- package/lib/decorators/async3/index.d.ts.map +1 -0
- package/lib/decorators/async3/index.js +2 -4
- package/lib/decorators/async3/index.js.map +1 -0
- package/lib/decorators/common/filters/filter-helper.d.ts +2 -1
- package/lib/decorators/common/filters/filter-helper.d.ts.map +1 -0
- package/lib/decorators/common/filters/filter-helper.js +9 -12
- package/lib/decorators/common/filters/filter-helper.js.map +1 -0
- package/lib/decorators/common/filters/filter-in.d.ts +2 -1
- package/lib/decorators/common/filters/filter-in.d.ts.map +1 -0
- package/lib/decorators/common/filters/filter-in.js +5 -8
- package/lib/decorators/common/filters/filter-in.js.map +1 -0
- package/lib/decorators/common/filters/filter-out.d.ts +2 -1
- package/lib/decorators/common/filters/filter-out.d.ts.map +1 -0
- package/lib/decorators/common/filters/filter-out.js +5 -8
- package/lib/decorators/common/filters/filter-out.js.map +1 -0
- package/lib/decorators/common/info-description-override.d.ts +2 -1
- package/lib/decorators/common/info-description-override.d.ts.map +1 -0
- package/lib/decorators/common/info-description-override.js +4 -7
- package/lib/decorators/common/info-description-override.js.map +1 -0
- package/lib/decorators/common/info-override.d.ts +2 -1
- package/lib/decorators/common/info-override.d.ts.map +1 -0
- package/lib/decorators/common/info-override.js +2 -5
- package/lib/decorators/common/info-override.js.map +1 -0
- package/lib/decorators/common/media-type-examples-override.d.ts +2 -1
- package/lib/decorators/common/media-type-examples-override.d.ts.map +1 -0
- package/lib/decorators/common/media-type-examples-override.js +7 -10
- package/lib/decorators/common/media-type-examples-override.js.map +1 -0
- package/lib/decorators/common/operation-description-override.d.ts +2 -1
- package/lib/decorators/common/operation-description-override.d.ts.map +1 -0
- package/lib/decorators/common/operation-description-override.js +4 -7
- package/lib/decorators/common/operation-description-override.js.map +1 -0
- package/lib/decorators/common/remove-x-internal.d.ts +2 -1
- package/lib/decorators/common/remove-x-internal.d.ts.map +1 -0
- package/lib/decorators/common/remove-x-internal.js +11 -14
- package/lib/decorators/common/remove-x-internal.js.map +1 -0
- package/lib/decorators/common/tag-description-override.d.ts +2 -1
- package/lib/decorators/common/tag-description-override.d.ts.map +1 -0
- package/lib/decorators/common/tag-description-override.js +4 -7
- package/lib/decorators/common/tag-description-override.js.map +1 -0
- package/lib/decorators/oas2/index.d.ts +2 -2
- package/lib/decorators/oas2/index.d.ts.map +1 -0
- package/lib/decorators/oas2/index.js +16 -20
- package/lib/decorators/oas2/index.js.map +1 -0
- package/lib/decorators/oas2/remove-unused-components.d.ts +2 -1
- package/lib/decorators/oas2/remove-unused-components.d.ts.map +1 -0
- package/lib/decorators/oas2/remove-unused-components.js +4 -7
- package/lib/decorators/oas2/remove-unused-components.js.map +1 -0
- package/lib/decorators/oas3/index.d.ts +2 -2
- package/lib/decorators/oas3/index.d.ts.map +1 -0
- package/lib/decorators/oas3/index.js +18 -22
- package/lib/decorators/oas3/index.js.map +1 -0
- package/lib/decorators/oas3/remove-unused-components.d.ts +2 -1
- package/lib/decorators/oas3/remove-unused-components.d.ts.map +1 -0
- package/lib/decorators/oas3/remove-unused-components.js +5 -8
- package/lib/decorators/oas3/remove-unused-components.js.map +1 -0
- package/lib/decorators/overlay1/index.d.ts +1 -0
- package/lib/decorators/overlay1/index.d.ts.map +1 -0
- package/lib/decorators/overlay1/index.js +2 -4
- package/lib/decorators/overlay1/index.js.map +1 -0
- package/lib/env.d.ts +1 -0
- package/lib/env.d.ts.map +1 -0
- package/lib/env.js +3 -5
- package/lib/env.js.map +1 -0
- package/lib/format/codeframes.d.ts +2 -1
- package/lib/format/codeframes.d.ts.map +1 -0
- package/lib/format/codeframes.js +15 -19
- package/lib/format/codeframes.js.map +1 -0
- package/lib/format/format.d.ts +2 -1
- package/lib/format/format.d.ts.map +1 -0
- package/lib/format/format.js +57 -62
- package/lib/format/format.js.map +1 -0
- package/lib/index.d.ts +29 -26
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +24 -98
- package/lib/index.js.map +1 -0
- package/lib/js-yaml/index.d.ts +1 -0
- package/lib/js-yaml/index.d.ts.map +1 -0
- package/lib/js-yaml/index.js +7 -11
- package/lib/js-yaml/index.js.map +1 -0
- package/lib/lint.d.ts +11 -10
- package/lib/lint.d.ts.map +1 -0
- package/lib/lint.js +40 -45
- package/lib/lint.js.map +1 -0
- package/lib/logger.d.ts +2 -1
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +15 -17
- package/lib/logger.js.map +1 -0
- package/lib/oas-types.d.ts +4 -3
- package/lib/oas-types.d.ts.map +1 -0
- package/lib/oas-types.js +27 -32
- package/lib/oas-types.js.map +1 -0
- package/lib/ref-utils.d.ts +3 -2
- package/lib/ref-utils.d.ts.map +1 -0
- package/lib/ref-utils.js +18 -33
- package/lib/ref-utils.js.map +1 -0
- package/lib/resolve.d.ts +3 -2
- package/lib/resolve.d.ts.map +1 -0
- package/lib/resolve.js +36 -45
- package/lib/resolve.js.map +1 -0
- package/lib/rules/ajv.d.ts +4 -3
- package/lib/rules/ajv.d.ts.map +1 -0
- package/lib/rules/ajv.js +7 -10
- package/lib/rules/ajv.js.map +1 -0
- package/lib/rules/arazzo/criteria-unique.d.ts +2 -1
- package/lib/rules/arazzo/criteria-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/criteria-unique.js +2 -5
- package/lib/rules/arazzo/criteria-unique.js.map +1 -0
- package/lib/rules/arazzo/index.d.ts +2 -1
- package/lib/rules/arazzo/index.d.ts.map +1 -0
- package/lib/rules/arazzo/index.js +33 -35
- package/lib/rules/arazzo/index.js.map +1 -0
- package/lib/rules/arazzo/parameters-unique.d.ts +2 -1
- package/lib/rules/arazzo/parameters-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/parameters-unique.js +2 -5
- package/lib/rules/arazzo/parameters-unique.js.map +1 -0
- package/lib/rules/arazzo/requestBody-replacements-unique.d.ts +2 -1
- package/lib/rules/arazzo/requestBody-replacements-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/requestBody-replacements-unique.js +2 -5
- package/lib/rules/arazzo/requestBody-replacements-unique.js.map +1 -0
- package/lib/rules/arazzo/sourceDescription-type.d.ts +2 -1
- package/lib/rules/arazzo/sourceDescription-type.d.ts.map +1 -0
- package/lib/rules/arazzo/sourceDescription-type.js +2 -5
- package/lib/rules/arazzo/sourceDescription-type.js.map +1 -0
- package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts +2 -1
- package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/sourceDescriptions-name-unique.js +2 -5
- package/lib/rules/arazzo/sourceDescriptions-name-unique.js.map +1 -0
- package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts +2 -1
- package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts.map +1 -0
- package/lib/rules/arazzo/sourceDescriptions-not-empty.js +2 -5
- package/lib/rules/arazzo/sourceDescriptions-not-empty.js.map +1 -0
- package/lib/rules/arazzo/step-onFailure-unique.d.ts +2 -1
- package/lib/rules/arazzo/step-onFailure-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/step-onFailure-unique.js +2 -5
- package/lib/rules/arazzo/step-onFailure-unique.js.map +1 -0
- package/lib/rules/arazzo/step-onSuccess-unique.d.ts +2 -1
- package/lib/rules/arazzo/step-onSuccess-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/step-onSuccess-unique.js +2 -5
- package/lib/rules/arazzo/step-onSuccess-unique.js.map +1 -0
- package/lib/rules/arazzo/stepId-unique.d.ts +2 -1
- package/lib/rules/arazzo/stepId-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/stepId-unique.js +2 -5
- package/lib/rules/arazzo/stepId-unique.js.map +1 -0
- package/lib/rules/arazzo/workflow-dependsOn.d.ts +2 -1
- package/lib/rules/arazzo/workflow-dependsOn.d.ts.map +1 -0
- package/lib/rules/arazzo/workflow-dependsOn.js +2 -5
- package/lib/rules/arazzo/workflow-dependsOn.js.map +1 -0
- package/lib/rules/arazzo/workflowId-unique.d.ts +2 -1
- package/lib/rules/arazzo/workflowId-unique.d.ts.map +1 -0
- package/lib/rules/arazzo/workflowId-unique.js +2 -5
- package/lib/rules/arazzo/workflowId-unique.js.map +1 -0
- package/lib/rules/async2/channels-kebab-case.d.ts +2 -1
- package/lib/rules/async2/channels-kebab-case.d.ts.map +1 -0
- package/lib/rules/async2/channels-kebab-case.js +2 -5
- package/lib/rules/async2/channels-kebab-case.js.map +1 -0
- package/lib/rules/async2/index.d.ts +2 -1
- package/lib/rules/async2/index.d.ts.map +1 -0
- package/lib/rules/async2/index.js +21 -26
- package/lib/rules/async2/index.js.map +1 -0
- package/lib/rules/async2/no-channel-trailing-slash.d.ts +2 -1
- package/lib/rules/async2/no-channel-trailing-slash.d.ts.map +1 -0
- package/lib/rules/async2/no-channel-trailing-slash.js +2 -5
- package/lib/rules/async2/no-channel-trailing-slash.js.map +1 -0
- package/lib/rules/async3/channels-kebab-case.d.ts +2 -1
- package/lib/rules/async3/channels-kebab-case.d.ts.map +1 -0
- package/lib/rules/async3/channels-kebab-case.js +2 -5
- package/lib/rules/async3/channels-kebab-case.js.map +1 -0
- package/lib/rules/async3/index.d.ts +2 -1
- package/lib/rules/async3/index.d.ts.map +1 -0
- package/lib/rules/async3/index.js +21 -26
- package/lib/rules/async3/index.js.map +1 -0
- package/lib/rules/async3/no-channel-trailing-slash.d.ts +2 -1
- package/lib/rules/async3/no-channel-trailing-slash.d.ts.map +1 -0
- package/lib/rules/async3/no-channel-trailing-slash.js +3 -6
- package/lib/rules/async3/no-channel-trailing-slash.js.map +1 -0
- package/lib/rules/common/assertions/asserts.d.ts +3 -2
- package/lib/rules/common/assertions/asserts.d.ts.map +1 -0
- package/lib/rules/common/assertions/asserts.js +35 -38
- package/lib/rules/common/assertions/asserts.js.map +1 -0
- package/lib/rules/common/assertions/index.d.ts +4 -3
- package/lib/rules/common/assertions/index.d.ts.map +1 -0
- package/lib/rules/common/assertions/index.js +7 -10
- package/lib/rules/common/assertions/index.js.map +1 -0
- package/lib/rules/common/assertions/utils.d.ts +5 -4
- package/lib/rules/common/assertions/utils.d.ts.map +1 -0
- package/lib/rules/common/assertions/utils.js +21 -29
- package/lib/rules/common/assertions/utils.js.map +1 -0
- package/lib/rules/common/info-contact.d.ts +2 -1
- package/lib/rules/common/info-contact.d.ts.map +1 -0
- package/lib/rules/common/info-contact.js +4 -7
- package/lib/rules/common/info-contact.js.map +1 -0
- package/lib/rules/common/info-license-strict.d.ts +2 -1
- package/lib/rules/common/info-license-strict.d.ts.map +1 -0
- package/lib/rules/common/info-license-strict.js +7 -10
- package/lib/rules/common/info-license-strict.js.map +1 -0
- package/lib/rules/common/info-license-url.d.ts +2 -1
- package/lib/rules/common/info-license-url.d.ts.map +1 -0
- package/lib/rules/common/info-license-url.js +4 -7
- package/lib/rules/common/info-license-url.js.map +1 -0
- package/lib/rules/common/info-license.d.ts +2 -1
- package/lib/rules/common/info-license.d.ts.map +1 -0
- package/lib/rules/common/info-license.js +4 -7
- package/lib/rules/common/info-license.js.map +1 -0
- package/lib/rules/common/no-ambiguous-paths.d.ts +2 -1
- package/lib/rules/common/no-ambiguous-paths.d.ts.map +1 -0
- package/lib/rules/common/no-ambiguous-paths.js +2 -5
- package/lib/rules/common/no-ambiguous-paths.js.map +1 -0
- package/lib/rules/common/no-enum-type-mismatch.d.ts +2 -1
- package/lib/rules/common/no-enum-type-mismatch.d.ts.map +1 -0
- package/lib/rules/common/no-enum-type-mismatch.js +6 -9
- package/lib/rules/common/no-enum-type-mismatch.js.map +1 -0
- package/lib/rules/common/no-http-verbs-in-paths.d.ts +2 -1
- package/lib/rules/common/no-http-verbs-in-paths.d.ts.map +1 -0
- package/lib/rules/common/no-http-verbs-in-paths.js +5 -8
- package/lib/rules/common/no-http-verbs-in-paths.js.map +1 -0
- package/lib/rules/common/no-identical-paths.d.ts +2 -1
- package/lib/rules/common/no-identical-paths.d.ts.map +1 -0
- package/lib/rules/common/no-identical-paths.js +2 -5
- package/lib/rules/common/no-identical-paths.js.map +1 -0
- package/lib/rules/common/no-invalid-parameter-examples.d.ts +1 -0
- package/lib/rules/common/no-invalid-parameter-examples.d.ts.map +1 -0
- package/lib/rules/common/no-invalid-parameter-examples.js +6 -9
- package/lib/rules/common/no-invalid-parameter-examples.js.map +1 -0
- package/lib/rules/common/no-invalid-schema-examples.d.ts +2 -1
- package/lib/rules/common/no-invalid-schema-examples.d.ts.map +1 -0
- package/lib/rules/common/no-invalid-schema-examples.js +6 -9
- package/lib/rules/common/no-invalid-schema-examples.js.map +1 -0
- package/lib/rules/common/no-path-trailing-slash.d.ts +2 -1
- package/lib/rules/common/no-path-trailing-slash.d.ts.map +1 -0
- package/lib/rules/common/no-path-trailing-slash.js +2 -5
- package/lib/rules/common/no-path-trailing-slash.js.map +1 -0
- package/lib/rules/common/no-required-schema-properties-undefined.d.ts +2 -1
- package/lib/rules/common/no-required-schema-properties-undefined.d.ts.map +1 -0
- package/lib/rules/common/no-required-schema-properties-undefined.js +4 -7
- package/lib/rules/common/no-required-schema-properties-undefined.js.map +1 -0
- package/lib/rules/common/no-schema-type-mismatch.d.ts +2 -1
- package/lib/rules/common/no-schema-type-mismatch.d.ts.map +1 -0
- package/lib/rules/common/no-schema-type-mismatch.js +2 -5
- package/lib/rules/common/no-schema-type-mismatch.js.map +1 -0
- package/lib/rules/common/operation-2xx-response.d.ts +2 -1
- package/lib/rules/common/operation-2xx-response.d.ts.map +1 -0
- package/lib/rules/common/operation-2xx-response.js +5 -8
- package/lib/rules/common/operation-2xx-response.js.map +1 -0
- package/lib/rules/common/operation-4xx-response.d.ts +2 -1
- package/lib/rules/common/operation-4xx-response.d.ts.map +1 -0
- package/lib/rules/common/operation-4xx-response.js +5 -8
- package/lib/rules/common/operation-4xx-response.js.map +1 -0
- package/lib/rules/common/operation-description.d.ts +2 -1
- package/lib/rules/common/operation-description.d.ts.map +1 -0
- package/lib/rules/common/operation-description.js +4 -7
- package/lib/rules/common/operation-description.js.map +1 -0
- package/lib/rules/common/operation-operationId-unique.d.ts +2 -1
- package/lib/rules/common/operation-operationId-unique.d.ts.map +1 -0
- package/lib/rules/common/operation-operationId-unique.js +2 -5
- package/lib/rules/common/operation-operationId-unique.js.map +1 -0
- package/lib/rules/common/operation-operationId-url-safe.d.ts +2 -1
- package/lib/rules/common/operation-operationId-url-safe.d.ts.map +1 -0
- package/lib/rules/common/operation-operationId-url-safe.js +2 -5
- package/lib/rules/common/operation-operationId-url-safe.js.map +1 -0
- package/lib/rules/common/operation-operationId.d.ts +2 -1
- package/lib/rules/common/operation-operationId.d.ts.map +1 -0
- package/lib/rules/common/operation-operationId.js +4 -7
- package/lib/rules/common/operation-operationId.js.map +1 -0
- package/lib/rules/common/operation-parameters-unique.d.ts +2 -1
- package/lib/rules/common/operation-parameters-unique.d.ts.map +1 -0
- package/lib/rules/common/operation-parameters-unique.js +2 -5
- package/lib/rules/common/operation-parameters-unique.js.map +1 -0
- package/lib/rules/common/operation-singular-tag.d.ts +2 -1
- package/lib/rules/common/operation-singular-tag.d.ts.map +1 -0
- package/lib/rules/common/operation-singular-tag.js +2 -5
- package/lib/rules/common/operation-singular-tag.js.map +1 -0
- package/lib/rules/common/operation-summary.d.ts +2 -1
- package/lib/rules/common/operation-summary.d.ts.map +1 -0
- package/lib/rules/common/operation-summary.js +4 -7
- package/lib/rules/common/operation-summary.js.map +1 -0
- package/lib/rules/common/operation-tag-defined.d.ts +2 -1
- package/lib/rules/common/operation-tag-defined.d.ts.map +1 -0
- package/lib/rules/common/operation-tag-defined.js +2 -5
- package/lib/rules/common/operation-tag-defined.js.map +1 -0
- package/lib/rules/common/parameter-description.d.ts +2 -1
- package/lib/rules/common/parameter-description.d.ts.map +1 -0
- package/lib/rules/common/parameter-description.js +2 -5
- package/lib/rules/common/parameter-description.js.map +1 -0
- package/lib/rules/common/path-declaration-must-exist.d.ts +2 -1
- package/lib/rules/common/path-declaration-must-exist.d.ts.map +1 -0
- package/lib/rules/common/path-declaration-must-exist.js +2 -5
- package/lib/rules/common/path-declaration-must-exist.js.map +1 -0
- package/lib/rules/common/path-excludes-patterns.d.ts +2 -1
- package/lib/rules/common/path-excludes-patterns.d.ts.map +1 -0
- package/lib/rules/common/path-excludes-patterns.js +2 -5
- package/lib/rules/common/path-excludes-patterns.js.map +1 -0
- package/lib/rules/common/path-http-verbs-order.d.ts +2 -1
- package/lib/rules/common/path-http-verbs-order.d.ts.map +1 -0
- package/lib/rules/common/path-http-verbs-order.js +2 -5
- package/lib/rules/common/path-http-verbs-order.js.map +1 -0
- package/lib/rules/common/path-not-include-query.d.ts +2 -1
- package/lib/rules/common/path-not-include-query.d.ts.map +1 -0
- package/lib/rules/common/path-not-include-query.js +2 -5
- package/lib/rules/common/path-not-include-query.js.map +1 -0
- package/lib/rules/common/path-params-defined.d.ts +2 -1
- package/lib/rules/common/path-params-defined.d.ts.map +1 -0
- package/lib/rules/common/path-params-defined.js +2 -5
- package/lib/rules/common/path-params-defined.js.map +1 -0
- package/lib/rules/common/path-segment-plural.d.ts +2 -1
- package/lib/rules/common/path-segment-plural.d.ts.map +1 -0
- package/lib/rules/common/path-segment-plural.js +6 -9
- package/lib/rules/common/path-segment-plural.js.map +1 -0
- package/lib/rules/common/paths-kebab-case.d.ts +2 -1
- package/lib/rules/common/paths-kebab-case.d.ts.map +1 -0
- package/lib/rules/common/paths-kebab-case.js +2 -5
- package/lib/rules/common/paths-kebab-case.js.map +1 -0
- package/lib/rules/common/required-string-property-missing-min-length.d.ts +2 -1
- package/lib/rules/common/required-string-property-missing-min-length.d.ts.map +1 -0
- package/lib/rules/common/required-string-property-missing-min-length.js +2 -5
- package/lib/rules/common/required-string-property-missing-min-length.js.map +1 -0
- package/lib/rules/common/response-contains-header.d.ts +2 -1
- package/lib/rules/common/response-contains-header.d.ts.map +1 -0
- package/lib/rules/common/response-contains-header.js +5 -8
- package/lib/rules/common/response-contains-header.js.map +1 -0
- package/lib/rules/common/scalar-property-missing-example.d.ts +2 -1
- package/lib/rules/common/scalar-property-missing-example.d.ts.map +1 -0
- package/lib/rules/common/scalar-property-missing-example.js +4 -7
- package/lib/rules/common/scalar-property-missing-example.js.map +1 -0
- package/lib/rules/common/security-defined.d.ts +2 -1
- package/lib/rules/common/security-defined.d.ts.map +1 -0
- package/lib/rules/common/security-defined.js +2 -5
- package/lib/rules/common/security-defined.js.map +1 -0
- package/lib/rules/common/spec-strict-refs.d.ts +2 -1
- package/lib/rules/common/spec-strict-refs.d.ts.map +1 -0
- package/lib/rules/common/spec-strict-refs.js +4 -7
- package/lib/rules/common/spec-strict-refs.js.map +1 -0
- package/lib/rules/common/struct.d.ts +2 -1
- package/lib/rules/common/struct.d.ts.map +1 -0
- package/lib/rules/common/struct.js +18 -21
- package/lib/rules/common/struct.js.map +1 -0
- package/lib/rules/common/tag-description.d.ts +2 -1
- package/lib/rules/common/tag-description.d.ts.map +1 -0
- package/lib/rules/common/tag-description.js +4 -7
- package/lib/rules/common/tag-description.js.map +1 -0
- package/lib/rules/common/tags-alphabetical.d.ts +2 -1
- package/lib/rules/common/tags-alphabetical.d.ts.map +1 -0
- package/lib/rules/common/tags-alphabetical.js +2 -5
- package/lib/rules/common/tags-alphabetical.js.map +1 -0
- package/lib/rules/no-unresolved-refs.d.ts +4 -3
- package/lib/rules/no-unresolved-refs.d.ts.map +1 -0
- package/lib/rules/no-unresolved-refs.js +5 -9
- package/lib/rules/no-unresolved-refs.js.map +1 -0
- package/lib/rules/oas2/boolean-parameter-prefixes.d.ts +2 -1
- package/lib/rules/oas2/boolean-parameter-prefixes.d.ts.map +1 -0
- package/lib/rules/oas2/boolean-parameter-prefixes.js +2 -5
- package/lib/rules/oas2/boolean-parameter-prefixes.js.map +1 -0
- package/lib/rules/oas2/index.d.ts +2 -1
- package/lib/rules/oas2/index.d.ts.map +1 -0
- package/lib/rules/oas2/index.js +94 -99
- package/lib/rules/oas2/index.js.map +1 -0
- package/lib/rules/oas2/request-mime-type.d.ts +2 -1
- package/lib/rules/oas2/request-mime-type.d.ts.map +1 -0
- package/lib/rules/oas2/request-mime-type.js +5 -8
- package/lib/rules/oas2/request-mime-type.js.map +1 -0
- package/lib/rules/oas2/response-contains-property.d.ts +2 -1
- package/lib/rules/oas2/response-contains-property.d.ts.map +1 -0
- package/lib/rules/oas2/response-contains-property.js +5 -8
- package/lib/rules/oas2/response-contains-property.js.map +1 -0
- package/lib/rules/oas2/response-mime-type.d.ts +2 -1
- package/lib/rules/oas2/response-mime-type.d.ts.map +1 -0
- package/lib/rules/oas2/response-mime-type.js +5 -8
- package/lib/rules/oas2/response-mime-type.js.map +1 -0
- package/lib/rules/oas3/array-parameter-serialization.d.ts +2 -1
- package/lib/rules/oas3/array-parameter-serialization.d.ts.map +1 -0
- package/lib/rules/oas3/array-parameter-serialization.js +4 -7
- package/lib/rules/oas3/array-parameter-serialization.js.map +1 -0
- package/lib/rules/oas3/boolean-parameter-prefixes.d.ts +2 -1
- package/lib/rules/oas3/boolean-parameter-prefixes.d.ts.map +1 -0
- package/lib/rules/oas3/boolean-parameter-prefixes.js +2 -5
- package/lib/rules/oas3/boolean-parameter-prefixes.js.map +1 -0
- package/lib/rules/oas3/component-name-unique.d.ts +2 -1
- package/lib/rules/oas3/component-name-unique.d.ts.map +1 -0
- package/lib/rules/oas3/component-name-unique.js +2 -5
- package/lib/rules/oas3/component-name-unique.js.map +1 -0
- package/lib/rules/oas3/index.d.ts +2 -1
- package/lib/rules/oas3/index.d.ts.map +1 -0
- package/lib/rules/oas3/index.js +118 -123
- package/lib/rules/oas3/index.js.map +1 -0
- package/lib/rules/oas3/no-empty-servers.d.ts +2 -1
- package/lib/rules/oas3/no-empty-servers.d.ts.map +1 -0
- package/lib/rules/oas3/no-empty-servers.js +2 -5
- package/lib/rules/oas3/no-empty-servers.js.map +1 -0
- package/lib/rules/oas3/no-example-value-and-externalValue.d.ts +2 -1
- package/lib/rules/oas3/no-example-value-and-externalValue.d.ts.map +1 -0
- package/lib/rules/oas3/no-example-value-and-externalValue.js +2 -5
- package/lib/rules/oas3/no-example-value-and-externalValue.js.map +1 -0
- package/lib/rules/oas3/no-invalid-media-type-examples.d.ts +2 -1
- package/lib/rules/oas3/no-invalid-media-type-examples.d.ts.map +1 -0
- package/lib/rules/oas3/no-invalid-media-type-examples.js +7 -10
- package/lib/rules/oas3/no-invalid-media-type-examples.js.map +1 -0
- package/lib/rules/oas3/no-server-example.com.d.ts +2 -1
- package/lib/rules/oas3/no-server-example.com.d.ts.map +1 -0
- package/lib/rules/oas3/no-server-example.com.js +2 -5
- package/lib/rules/oas3/no-server-example.com.js.map +1 -0
- package/lib/rules/oas3/no-server-trailing-slash.d.ts +2 -1
- package/lib/rules/oas3/no-server-trailing-slash.d.ts.map +1 -0
- package/lib/rules/oas3/no-server-trailing-slash.js +2 -5
- package/lib/rules/oas3/no-server-trailing-slash.js.map +1 -0
- package/lib/rules/oas3/no-server-variables-empty-enum.d.ts +2 -1
- package/lib/rules/oas3/no-server-variables-empty-enum.d.ts.map +1 -0
- package/lib/rules/oas3/no-server-variables-empty-enum.js +2 -5
- package/lib/rules/oas3/no-server-variables-empty-enum.js.map +1 -0
- package/lib/rules/oas3/no-undefined-server-variable.d.ts +2 -1
- package/lib/rules/oas3/no-undefined-server-variable.d.ts.map +1 -0
- package/lib/rules/oas3/no-undefined-server-variable.js +2 -5
- package/lib/rules/oas3/no-undefined-server-variable.js.map +1 -0
- package/lib/rules/oas3/no-unused-components.d.ts +2 -1
- package/lib/rules/oas3/no-unused-components.d.ts.map +1 -0
- package/lib/rules/oas3/no-unused-components.js +2 -5
- package/lib/rules/oas3/no-unused-components.js.map +1 -0
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts +2 -1
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts.map +1 -0
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js +6 -9
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js.map +1 -0
- package/lib/rules/oas3/request-mime-type.d.ts +2 -1
- package/lib/rules/oas3/request-mime-type.d.ts.map +1 -0
- package/lib/rules/oas3/request-mime-type.js +6 -9
- package/lib/rules/oas3/request-mime-type.js.map +1 -0
- package/lib/rules/oas3/response-contains-property.d.ts +2 -1
- package/lib/rules/oas3/response-contains-property.d.ts.map +1 -0
- package/lib/rules/oas3/response-contains-property.js +5 -8
- package/lib/rules/oas3/response-contains-property.js.map +1 -0
- package/lib/rules/oas3/response-mime-type.d.ts +2 -1
- package/lib/rules/oas3/response-mime-type.d.ts.map +1 -0
- package/lib/rules/oas3/response-mime-type.js +6 -9
- package/lib/rules/oas3/response-mime-type.js.map +1 -0
- package/lib/rules/oas3/spec-components-invalid-map-name.d.ts +2 -1
- package/lib/rules/oas3/spec-components-invalid-map-name.d.ts.map +1 -0
- package/lib/rules/oas3/spec-components-invalid-map-name.js +2 -5
- package/lib/rules/oas3/spec-components-invalid-map-name.js.map +1 -0
- package/lib/rules/other/stats.d.ts +4 -3
- package/lib/rules/other/stats.d.ts.map +1 -0
- package/lib/rules/other/stats.js +2 -5
- package/lib/rules/other/stats.js.map +1 -0
- package/lib/rules/overlay1/index.d.ts +2 -1
- package/lib/rules/overlay1/index.d.ts.map +1 -0
- package/lib/rules/overlay1/index.js +9 -11
- package/lib/rules/overlay1/index.js.map +1 -0
- package/lib/rules/respect/no-criteria-xpath.d.ts +2 -1
- package/lib/rules/respect/no-criteria-xpath.d.ts.map +1 -0
- package/lib/rules/respect/no-criteria-xpath.js +2 -5
- package/lib/rules/respect/no-criteria-xpath.js.map +1 -0
- package/lib/rules/respect/respect-supported-versions.d.ts +2 -1
- package/lib/rules/respect/respect-supported-versions.d.ts.map +1 -0
- package/lib/rules/respect/respect-supported-versions.js +7 -10
- package/lib/rules/respect/respect-supported-versions.js.map +1 -0
- package/lib/rules/utils.d.ts +4 -3
- package/lib/rules/utils.d.ts.map +1 -0
- package/lib/rules/utils.js +23 -36
- package/lib/rules/utils.js.map +1 -0
- package/lib/types/arazzo.d.ts +2 -1
- package/lib/types/arazzo.d.ts.map +1 -0
- package/lib/types/arazzo.js +21 -23
- package/lib/types/arazzo.js.map +1 -0
- package/lib/types/asyncapi2.d.ts +2 -1
- package/lib/types/asyncapi2.d.ts.map +1 -0
- package/lib/types/asyncapi2.js +54 -56
- package/lib/types/asyncapi2.js.map +1 -0
- package/lib/types/asyncapi3.d.ts +2 -1
- package/lib/types/asyncapi3.d.ts.map +1 -0
- package/lib/types/asyncapi3.js +41 -43
- package/lib/types/asyncapi3.js.map +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +7 -13
- package/lib/types/index.js.map +1 -0
- package/lib/types/json-schema-adapter.d.ts +2 -1
- package/lib/types/json-schema-adapter.d.ts.map +1 -0
- package/lib/types/json-schema-adapter.js +15 -17
- package/lib/types/json-schema-adapter.js.map +1 -0
- package/lib/types/oas2.d.ts +3 -2
- package/lib/types/oas2.d.ts.map +1 -0
- package/lib/types/oas2.js +17 -19
- package/lib/types/oas2.js.map +1 -0
- package/lib/types/oas3.d.ts +3 -2
- package/lib/types/oas3.d.ts.map +1 -0
- package/lib/types/oas3.js +39 -41
- package/lib/types/oas3.js.map +1 -0
- package/lib/types/oas3_1.d.ts +3 -2
- package/lib/types/oas3_1.d.ts.map +1 -0
- package/lib/types/oas3_1.js +18 -20
- package/lib/types/oas3_1.js.map +1 -0
- package/lib/types/overlay.d.ts +2 -1
- package/lib/types/overlay.d.ts.map +1 -0
- package/lib/types/overlay.js +4 -6
- package/lib/types/overlay.js.map +1 -0
- package/lib/types/redocly-yaml.d.ts +4 -3
- package/lib/types/redocly-yaml.d.ts.map +1 -0
- package/lib/types/redocly-yaml.js +31 -57
- package/lib/types/redocly-yaml.js.map +1 -0
- package/lib/typings/arazzo.d.ts +1 -0
- package/lib/typings/arazzo.d.ts.map +1 -0
- package/lib/typings/arazzo.js +3 -5
- package/lib/typings/arazzo.js.map +1 -0
- package/lib/typings/asyncapi.d.ts +1 -0
- package/lib/typings/asyncapi.d.ts.map +1 -0
- package/lib/typings/asyncapi.js +2 -2
- package/lib/typings/asyncapi.js.map +1 -0
- package/lib/typings/asyncapi3.d.ts +1 -0
- package/lib/typings/asyncapi3.d.ts.map +1 -0
- package/lib/typings/asyncapi3.js +2 -2
- package/lib/typings/asyncapi3.js.map +1 -0
- package/lib/typings/common.d.ts +1 -0
- package/lib/typings/common.d.ts.map +1 -0
- package/lib/typings/common.js +2 -2
- package/lib/typings/common.js.map +1 -0
- package/lib/typings/openapi.d.ts +1 -0
- package/lib/typings/openapi.d.ts.map +1 -0
- package/lib/typings/openapi.js +2 -2
- package/lib/typings/openapi.js.map +1 -0
- package/lib/typings/overlay.d.ts +1 -0
- package/lib/typings/overlay.d.ts.map +1 -0
- package/lib/typings/overlay.js +2 -4
- package/lib/typings/overlay.js.map +1 -0
- package/lib/typings/swagger.d.ts +2 -1
- package/lib/typings/swagger.d.ts.map +1 -0
- package/lib/typings/swagger.js +2 -2
- package/lib/typings/swagger.js.map +1 -0
- package/lib/utils/error.d.ts +3 -0
- package/lib/utils/error.d.ts.map +1 -0
- package/lib/utils/error.js +3 -0
- package/lib/utils/error.js.map +1 -0
- package/lib/utils.d.ts +4 -5
- package/lib/utils.d.ts.map +1 -0
- package/lib/utils.js +52 -99
- package/lib/utils.js.map +1 -0
- package/lib/visitors.d.ts +11 -10
- package/lib/visitors.d.ts.map +1 -0
- package/lib/visitors.js +4 -6
- package/lib/visitors.js.map +1 -0
- package/lib/walk.d.ts +9 -8
- package/lib/walk.d.ts.map +1 -0
- package/lib/walk.js +23 -25
- package/lib/walk.js.map +1 -0
- package/package.json +31 -10
- package/lib/decorators/common/registry-dependencies.d.ts +0 -2
- package/lib/decorators/common/registry-dependencies.js +0 -24
- package/lib/output.d.ts +0 -3
- package/lib/output.js +0 -9
- package/lib/redocly/domains.d.ts +0 -14
- package/lib/redocly/domains.js +0 -41
- package/lib/redocly/index.d.ts +0 -30
- package/lib/redocly/index.js +0 -131
- package/lib/redocly/redocly-client-types.d.ts +0 -8
- package/lib/redocly/redocly-client-types.js +0 -2
- package/lib/redocly/registry-api-types.d.ts +0 -29
- package/lib/redocly/registry-api-types.js +0 -2
- package/lib/redocly/registry-api.d.ts +0 -17
- package/lib/redocly/registry-api.js +0 -100
package/lib/index.d.ts
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
export { BundleOutputFormat, readFileFromUrl, slash, doesYamlFileExist, isTruthy,
|
|
2
|
-
export { Oas3_1Types } from './types/oas3_1';
|
|
3
|
-
export { Arazzo1Types } from './types/arazzo';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export
|
|
10
|
-
export type {
|
|
11
|
-
export type {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
1
|
+
export { type BundleOutputFormat, type CollectFn, type StrictObject, readFileFromUrl, slash, doesYamlFileExist, isTruthy, pause, isPlainObject, dequal, pluralize, isEmptyObject, isNotEmptyArray, isNotEmptyObject, } from './utils.js';
|
|
2
|
+
export { Oas3_1Types } from './types/oas3_1.js';
|
|
3
|
+
export { Arazzo1Types } from './types/arazzo.js';
|
|
4
|
+
export type { ArazzoDefinition, ExtendedOperation } from './typings/arazzo.js';
|
|
5
|
+
export { Oas3Types } from './types/oas3.js';
|
|
6
|
+
export { Oas2Types } from './types/oas2.js';
|
|
7
|
+
export { AsyncApi2Types } from './types/asyncapi2.js';
|
|
8
|
+
export { AsyncApi3Types } from './types/asyncapi3.js';
|
|
9
|
+
export { ConfigTypes, createConfigTypes } from './types/redocly-yaml.js';
|
|
10
|
+
export type { Oas3Definition, Oas3_1Definition, Oas3Components, Oas3_1Components, Oas3PathItem, Oas3Paths, Oas3ComponentName, Oas3Schema, Oas3_1Schema, Oas3Tag, Referenced, OasRef, Oas3Parameter, Oas3Server, Oas3Operation, Oas3Responses, Oas3SecurityScheme, Oas3SecurityRequirement, } from './typings/openapi.js';
|
|
11
|
+
export type { Oas2Definition } from './typings/swagger.js';
|
|
12
|
+
export type { StatsAccumulator, StatsName } from './typings/common.js';
|
|
13
|
+
export { type NormalizedNodeType, type NodeType, normalizeTypes } from './types/index.js';
|
|
14
|
+
export { Stats } from './rules/other/stats.js';
|
|
15
|
+
export { type RawConfigProcessor, type ResolvedConfig, type Plugin, Config, StyleguideConfig, RawConfig, RawUniversalConfig, IGNORE_FILE, getMergedConfig, transformConfig, loadConfig, getConfig, findConfig, CONFIG_FILE_NAMES, RuleSeverity, createConfig, ResolvedApi, ConfigValidationError, resolvePlugins, } from './config/index.js';
|
|
16
|
+
export { type ResolvedRefMap, Source, BaseResolver, Document, resolveDocument, ResolveError, YamlParseError, makeDocumentFromString, } from './resolve.js';
|
|
17
|
+
export { parseYaml, stringifyYaml } from './js-yaml/index.js';
|
|
18
|
+
export { unescapePointer, isRef, isAbsoluteUrl, escapePointer } from './ref-utils.js';
|
|
19
|
+
export { SpecMajorVersion, getMajorSpecVersion, SpecVersion, detectSpec, getTypes, } from './oas-types.js';
|
|
20
|
+
export { normalizeVisitors } from './visitors.js';
|
|
21
|
+
export { WalkContext, walkDocument, NormalizedProblem, ProblemSeverity, LineColLocationObject, LocationObject, Loc, } from './walk.js';
|
|
22
|
+
export { getAstNodeByPointer, getLineColLocation, getCodeframe } from './format/codeframes.js';
|
|
23
|
+
export { formatProblems, OutputFormat, getTotals, Totals } from './format/format.js';
|
|
24
|
+
export { lint, lint as validate, lintDocument, lintFromString, lintConfig } from './lint.js';
|
|
25
|
+
export { type BundleResult, bundle, bundleDocument, mapTypeToComponent, bundleFromString, } from './bundle.js';
|
|
26
|
+
export { type Assertions, type Assertion } from './rules/common/assertions/index.js';
|
|
27
|
+
export { logger } from './logger.js';
|
|
28
|
+
export { HandledError } from './utils/error.js';
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,eAAe,EACf,KAAK,EACL,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,aAAa,EACb,MAAM,EACN,SAAS,EACT,aAAa,EACb,eAAe,EACf,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAA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
-
|
|
24
|
-
|
|
25
|
-
Object.defineProperty(exports, "pause", { enumerable: true, get: function () { return utils_1.pause; } });
|
|
26
|
-
var oas3_1_1 = require("./types/oas3_1");
|
|
27
|
-
Object.defineProperty(exports, "Oas3_1Types", { enumerable: true, get: function () { return oas3_1_1.Oas3_1Types; } });
|
|
28
|
-
var arazzo_1 = require("./types/arazzo");
|
|
29
|
-
Object.defineProperty(exports, "Arazzo1Types", { enumerable: true, get: function () { return arazzo_1.Arazzo1Types; } });
|
|
30
|
-
var oas3_1 = require("./types/oas3");
|
|
31
|
-
Object.defineProperty(exports, "Oas3Types", { enumerable: true, get: function () { return oas3_1.Oas3Types; } });
|
|
32
|
-
var oas2_1 = require("./types/oas2");
|
|
33
|
-
Object.defineProperty(exports, "Oas2Types", { enumerable: true, get: function () { return oas2_1.Oas2Types; } });
|
|
34
|
-
var asyncapi2_1 = require("./types/asyncapi2");
|
|
35
|
-
Object.defineProperty(exports, "AsyncApi2Types", { enumerable: true, get: function () { return asyncapi2_1.AsyncApi2Types; } });
|
|
36
|
-
var asyncapi3_1 = require("./types/asyncapi3");
|
|
37
|
-
Object.defineProperty(exports, "AsyncApi3Types", { enumerable: true, get: function () { return asyncapi3_1.AsyncApi3Types; } });
|
|
38
|
-
var redocly_yaml_1 = require("./types/redocly-yaml");
|
|
39
|
-
Object.defineProperty(exports, "ConfigTypes", { enumerable: true, get: function () { return redocly_yaml_1.ConfigTypes; } });
|
|
40
|
-
var types_1 = require("./types");
|
|
41
|
-
Object.defineProperty(exports, "normalizeTypes", { enumerable: true, get: function () { return types_1.normalizeTypes; } });
|
|
42
|
-
var stats_1 = require("./rules/other/stats");
|
|
43
|
-
Object.defineProperty(exports, "Stats", { enumerable: true, get: function () { return stats_1.Stats; } });
|
|
44
|
-
var config_1 = require("./config");
|
|
45
|
-
Object.defineProperty(exports, "Config", { enumerable: true, get: function () { return config_1.Config; } });
|
|
46
|
-
Object.defineProperty(exports, "StyleguideConfig", { enumerable: true, get: function () { return config_1.StyleguideConfig; } });
|
|
47
|
-
Object.defineProperty(exports, "IGNORE_FILE", { enumerable: true, get: function () { return config_1.IGNORE_FILE; } });
|
|
48
|
-
Object.defineProperty(exports, "getMergedConfig", { enumerable: true, get: function () { return config_1.getMergedConfig; } });
|
|
49
|
-
Object.defineProperty(exports, "transformConfig", { enumerable: true, get: function () { return config_1.transformConfig; } });
|
|
50
|
-
Object.defineProperty(exports, "loadConfig", { enumerable: true, get: function () { return config_1.loadConfig; } });
|
|
51
|
-
Object.defineProperty(exports, "getConfig", { enumerable: true, get: function () { return config_1.getConfig; } });
|
|
52
|
-
Object.defineProperty(exports, "findConfig", { enumerable: true, get: function () { return config_1.findConfig; } });
|
|
53
|
-
Object.defineProperty(exports, "CONFIG_FILE_NAMES", { enumerable: true, get: function () { return config_1.CONFIG_FILE_NAMES; } });
|
|
54
|
-
Object.defineProperty(exports, "createConfig", { enumerable: true, get: function () { return config_1.createConfig; } });
|
|
55
|
-
var redocly_1 = require("./redocly");
|
|
56
|
-
Object.defineProperty(exports, "RedoclyClient", { enumerable: true, get: function () { return redocly_1.RedoclyClient; } });
|
|
57
|
-
__exportStar(require("./redocly/domains"), exports);
|
|
58
|
-
var resolve_1 = require("./resolve");
|
|
59
|
-
Object.defineProperty(exports, "Source", { enumerable: true, get: function () { return resolve_1.Source; } });
|
|
60
|
-
Object.defineProperty(exports, "BaseResolver", { enumerable: true, get: function () { return resolve_1.BaseResolver; } });
|
|
61
|
-
Object.defineProperty(exports, "resolveDocument", { enumerable: true, get: function () { return resolve_1.resolveDocument; } });
|
|
62
|
-
Object.defineProperty(exports, "ResolveError", { enumerable: true, get: function () { return resolve_1.ResolveError; } });
|
|
63
|
-
Object.defineProperty(exports, "YamlParseError", { enumerable: true, get: function () { return resolve_1.YamlParseError; } });
|
|
64
|
-
Object.defineProperty(exports, "makeDocumentFromString", { enumerable: true, get: function () { return resolve_1.makeDocumentFromString; } });
|
|
65
|
-
var js_yaml_1 = require("./js-yaml");
|
|
66
|
-
Object.defineProperty(exports, "parseYaml", { enumerable: true, get: function () { return js_yaml_1.parseYaml; } });
|
|
67
|
-
Object.defineProperty(exports, "stringifyYaml", { enumerable: true, get: function () { return js_yaml_1.stringifyYaml; } });
|
|
68
|
-
var ref_utils_1 = require("./ref-utils");
|
|
69
|
-
Object.defineProperty(exports, "unescapePointer", { enumerable: true, get: function () { return ref_utils_1.unescapePointer; } });
|
|
70
|
-
Object.defineProperty(exports, "isRef", { enumerable: true, get: function () { return ref_utils_1.isRef; } });
|
|
71
|
-
Object.defineProperty(exports, "isAbsoluteUrl", { enumerable: true, get: function () { return ref_utils_1.isAbsoluteUrl; } });
|
|
72
|
-
var oas_types_1 = require("./oas-types");
|
|
73
|
-
Object.defineProperty(exports, "SpecMajorVersion", { enumerable: true, get: function () { return oas_types_1.SpecMajorVersion; } });
|
|
74
|
-
Object.defineProperty(exports, "getMajorSpecVersion", { enumerable: true, get: function () { return oas_types_1.getMajorSpecVersion; } });
|
|
75
|
-
Object.defineProperty(exports, "SpecVersion", { enumerable: true, get: function () { return oas_types_1.SpecVersion; } });
|
|
76
|
-
Object.defineProperty(exports, "detectSpec", { enumerable: true, get: function () { return oas_types_1.detectSpec; } });
|
|
77
|
-
Object.defineProperty(exports, "getTypes", { enumerable: true, get: function () { return oas_types_1.getTypes; } });
|
|
78
|
-
var visitors_1 = require("./visitors");
|
|
79
|
-
Object.defineProperty(exports, "normalizeVisitors", { enumerable: true, get: function () { return visitors_1.normalizeVisitors; } });
|
|
80
|
-
var walk_1 = require("./walk");
|
|
81
|
-
Object.defineProperty(exports, "walkDocument", { enumerable: true, get: function () { return walk_1.walkDocument; } });
|
|
82
|
-
var codeframes_1 = require("./format/codeframes");
|
|
83
|
-
Object.defineProperty(exports, "getAstNodeByPointer", { enumerable: true, get: function () { return codeframes_1.getAstNodeByPointer; } });
|
|
84
|
-
Object.defineProperty(exports, "getLineColLocation", { enumerable: true, get: function () { return codeframes_1.getLineColLocation; } });
|
|
85
|
-
var format_1 = require("./format/format");
|
|
86
|
-
Object.defineProperty(exports, "formatProblems", { enumerable: true, get: function () { return format_1.formatProblems; } });
|
|
87
|
-
Object.defineProperty(exports, "getTotals", { enumerable: true, get: function () { return format_1.getTotals; } });
|
|
88
|
-
var lint_1 = require("./lint");
|
|
89
|
-
Object.defineProperty(exports, "lint", { enumerable: true, get: function () { return lint_1.lint; } });
|
|
90
|
-
Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return lint_1.lint; } });
|
|
91
|
-
Object.defineProperty(exports, "lintDocument", { enumerable: true, get: function () { return lint_1.lintDocument; } });
|
|
92
|
-
Object.defineProperty(exports, "lintFromString", { enumerable: true, get: function () { return lint_1.lintFromString; } });
|
|
93
|
-
Object.defineProperty(exports, "lintConfig", { enumerable: true, get: function () { return lint_1.lintConfig; } });
|
|
94
|
-
var bundle_1 = require("./bundle");
|
|
95
|
-
Object.defineProperty(exports, "bundle", { enumerable: true, get: function () { return bundle_1.bundle; } });
|
|
96
|
-
Object.defineProperty(exports, "bundleDocument", { enumerable: true, get: function () { return bundle_1.bundleDocument; } });
|
|
97
|
-
Object.defineProperty(exports, "mapTypeToComponent", { enumerable: true, get: function () { return bundle_1.mapTypeToComponent; } });
|
|
98
|
-
Object.defineProperty(exports, "bundleFromString", { enumerable: true, get: function () { return bundle_1.bundleFromString; } });
|
|
1
|
+
export { readFileFromUrl, slash, doesYamlFileExist, isTruthy, pause, isPlainObject, dequal, pluralize, isEmptyObject, isNotEmptyArray, isNotEmptyObject, } from './utils.js';
|
|
2
|
+
export { Oas3_1Types } from './types/oas3_1.js';
|
|
3
|
+
export { Arazzo1Types } from './types/arazzo.js';
|
|
4
|
+
export { Oas3Types } from './types/oas3.js';
|
|
5
|
+
export { Oas2Types } from './types/oas2.js';
|
|
6
|
+
export { AsyncApi2Types } from './types/asyncapi2.js';
|
|
7
|
+
export { AsyncApi3Types } from './types/asyncapi3.js';
|
|
8
|
+
export { ConfigTypes, createConfigTypes } from './types/redocly-yaml.js';
|
|
9
|
+
export { normalizeTypes } from './types/index.js';
|
|
10
|
+
export { Stats } from './rules/other/stats.js';
|
|
11
|
+
export { Config, StyleguideConfig, IGNORE_FILE, getMergedConfig, transformConfig, loadConfig, getConfig, findConfig, CONFIG_FILE_NAMES, createConfig, ConfigValidationError, resolvePlugins, } from './config/index.js';
|
|
12
|
+
export { Source, BaseResolver, resolveDocument, ResolveError, YamlParseError, makeDocumentFromString, } from './resolve.js';
|
|
13
|
+
export { parseYaml, stringifyYaml } from './js-yaml/index.js';
|
|
14
|
+
export { unescapePointer, isRef, isAbsoluteUrl, escapePointer } from './ref-utils.js';
|
|
15
|
+
export { SpecMajorVersion, getMajorSpecVersion, SpecVersion, detectSpec, getTypes, } from './oas-types.js';
|
|
16
|
+
export { normalizeVisitors } from './visitors.js';
|
|
17
|
+
export { walkDocument, } from './walk.js';
|
|
18
|
+
export { getAstNodeByPointer, getLineColLocation, getCodeframe } from './format/codeframes.js';
|
|
19
|
+
export { formatProblems, getTotals } from './format/format.js';
|
|
20
|
+
export { lint, lint as validate, lintDocument, lintFromString, lintConfig } from './lint.js';
|
|
21
|
+
export { bundle, bundleDocument, mapTypeToComponent, bundleFromString, } from './bundle.js';
|
|
22
|
+
export { logger } from './logger.js';
|
|
23
|
+
export { HandledError } from './utils/error.js';
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,eAAe,EACf,KAAK,EACL,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,aAAa,EACb,MAAM,EACN,SAAS,EACT,aAAa,EACb,eAAe,EACf,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,SA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AE,MAAM,WAAW,CAAC;AAC7F,OAAO,EAEL,MAAM,EACN,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAIrB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC"}
|
package/lib/js-yaml/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/js-yaml/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAOxD,eAAO,MAAM,SAAS,QAAS,MAAM,SAAS,WAAW,KAAG,OACM,CAAC;AAEnE,eAAO,MAAM,aAAa,QAAS,GAAG,SAAS,WAAW,KAAG,MAAyB,CAAC"}
|
package/lib/js-yaml/index.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stringifyYaml = exports.parseYaml = void 0;
|
|
4
1
|
// TODO: add a type for "types" https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/js-yaml/index.d.ts
|
|
5
2
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
6
3
|
// @ts-ignore
|
|
7
|
-
|
|
8
|
-
const DEFAULT_SCHEMA_WITHOUT_TIMESTAMP =
|
|
9
|
-
implicit: [
|
|
10
|
-
explicit: [
|
|
4
|
+
import { JSON_SCHEMA, types, load, dump } from 'js-yaml';
|
|
5
|
+
const DEFAULT_SCHEMA_WITHOUT_TIMESTAMP = JSON_SCHEMA.extend({
|
|
6
|
+
implicit: [types.merge],
|
|
7
|
+
explicit: [types.binary, types.omap, types.pairs, types.set],
|
|
11
8
|
});
|
|
12
|
-
const parseYaml = (str, opts) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
exports.stringifyYaml = stringifyYaml;
|
|
9
|
+
export const parseYaml = (str, opts) => load(str, { schema: DEFAULT_SCHEMA_WITHOUT_TIMESTAMP, ...opts });
|
|
10
|
+
export const stringifyYaml = (obj, opts) => dump(obj, opts);
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js-yaml/index.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,6DAA6D;AAC7D,aAAa;AACb,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAIzD,MAAM,gCAAgC,GAAG,WAAW,CAAC,MAAM,CAAC;IAC1D,QAAQ,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC;CAC7D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,IAAkB,EAAW,EAAE,CACpE,IAAI,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,gCAAgC,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;AAEnE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAQ,EAAE,IAAkB,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC"}
|
package/lib/lint.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { BaseResolver } from './resolve';
|
|
2
|
-
import type { StyleguideConfig, Config } from './config';
|
|
3
|
-
import type { Document, ResolvedRefMap } from './resolve';
|
|
4
|
-
import type { ProblemSeverity } from './walk';
|
|
5
|
-
import type { NodeType } from './types';
|
|
6
|
-
import type { CollectFn } from './utils';
|
|
1
|
+
import { BaseResolver } from './resolve.js';
|
|
2
|
+
import type { StyleguideConfig, Config } from './config/index.js';
|
|
3
|
+
import type { Document, ResolvedRefMap } from './resolve.js';
|
|
4
|
+
import type { ProblemSeverity } from './walk.js';
|
|
5
|
+
import type { NodeType } from './types/index.js';
|
|
6
|
+
import type { CollectFn } from './utils.js';
|
|
7
7
|
export declare function lint(opts: {
|
|
8
8
|
ref: string;
|
|
9
9
|
config: Config;
|
|
10
10
|
externalRefResolver?: BaseResolver;
|
|
11
11
|
collectSpecData?: CollectFn;
|
|
12
|
-
}): Promise<import("./walk").NormalizedProblem[]>;
|
|
12
|
+
}): Promise<import("./walk.js").NormalizedProblem[]>;
|
|
13
13
|
export declare function lintFromString(opts: {
|
|
14
14
|
source: string;
|
|
15
15
|
absoluteRef?: string;
|
|
16
16
|
config: Config;
|
|
17
17
|
externalRefResolver?: BaseResolver;
|
|
18
|
-
}): Promise<import("./walk").NormalizedProblem[]>;
|
|
18
|
+
}): Promise<import("./walk.js").NormalizedProblem[]>;
|
|
19
19
|
export declare function lintDocument(opts: {
|
|
20
20
|
document: Document;
|
|
21
21
|
config: StyleguideConfig;
|
|
22
22
|
customTypes?: Record<string, NodeType>;
|
|
23
23
|
externalRefResolver: BaseResolver;
|
|
24
|
-
}): Promise<import("./walk").NormalizedProblem[]>;
|
|
24
|
+
}): Promise<import("./walk.js").NormalizedProblem[]>;
|
|
25
25
|
export declare function lintConfig(opts: {
|
|
26
26
|
document: Document;
|
|
27
27
|
config: Config;
|
|
@@ -29,4 +29,5 @@ export declare function lintConfig(opts: {
|
|
|
29
29
|
severity?: ProblemSeverity;
|
|
30
30
|
externalRefResolver?: BaseResolver;
|
|
31
31
|
externalConfigTypes?: Record<string, NodeType>;
|
|
32
|
-
}): Promise<import("./walk").NormalizedProblem[]>;
|
|
32
|
+
}): Promise<import("./walk.js").NormalizedProblem[]>;
|
|
33
|
+
//# sourceMappingURL=lint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":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E,QAAQ,CAAC,CAAC;CAChD,oDA2DA"}
|
package/lib/lint.js
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
const oas_types_1 = require("./oas-types");
|
|
15
|
-
const redocly_yaml_1 = require("./types/redocly-yaml");
|
|
16
|
-
const struct_1 = require("./rules/common/struct");
|
|
17
|
-
const no_unresolved_refs_1 = require("./rules/no-unresolved-refs");
|
|
18
|
-
async function lint(opts) {
|
|
19
|
-
const { ref, externalRefResolver = new resolve_1.BaseResolver(opts.config.resolve) } = opts;
|
|
1
|
+
import { rootRedoclyConfigSchema } from '@redocly/config';
|
|
2
|
+
import { BaseResolver, resolveDocument, makeDocumentFromString } from './resolve.js';
|
|
3
|
+
import { normalizeVisitors } from './visitors.js';
|
|
4
|
+
import { walkDocument } from './walk.js';
|
|
5
|
+
import { initRules } from './config/rules.js';
|
|
6
|
+
import { normalizeTypes } from './types/index.js';
|
|
7
|
+
import { releaseAjvInstance } from './rules/ajv.js';
|
|
8
|
+
import { SpecVersion, getMajorSpecVersion, detectSpec, getTypes } from './oas-types.js';
|
|
9
|
+
import { createConfigTypes } from './types/redocly-yaml.js';
|
|
10
|
+
import { Struct } from './rules/common/struct.js';
|
|
11
|
+
import { NoUnresolvedRefs } from './rules/no-unresolved-refs.js';
|
|
12
|
+
export async function lint(opts) {
|
|
13
|
+
const { ref, externalRefResolver = new BaseResolver(opts.config.resolve) } = opts;
|
|
20
14
|
const document = (await externalRefResolver.resolveDocument(null, ref, true));
|
|
21
15
|
opts.collectSpecData?.(document.parsed);
|
|
22
16
|
return lintDocument({
|
|
@@ -26,9 +20,9 @@ async function lint(opts) {
|
|
|
26
20
|
config: opts.config.styleguide,
|
|
27
21
|
});
|
|
28
22
|
}
|
|
29
|
-
async function lintFromString(opts) {
|
|
30
|
-
const { source, absoluteRef, externalRefResolver = new
|
|
31
|
-
const document =
|
|
23
|
+
export async function lintFromString(opts) {
|
|
24
|
+
const { source, absoluteRef, externalRefResolver = new BaseResolver(opts.config.resolve) } = opts;
|
|
25
|
+
const document = makeDocumentFromString(source, absoluteRef || '/');
|
|
32
26
|
return lintDocument({
|
|
33
27
|
document,
|
|
34
28
|
...opts,
|
|
@@ -36,42 +30,42 @@ async function lintFromString(opts) {
|
|
|
36
30
|
config: opts.config.styleguide,
|
|
37
31
|
});
|
|
38
32
|
}
|
|
39
|
-
async function lintDocument(opts) {
|
|
40
|
-
|
|
33
|
+
export async function lintDocument(opts) {
|
|
34
|
+
releaseAjvInstance(); // FIXME: preprocessors can modify nodes which are then cached to ajv-instance by absolute path
|
|
41
35
|
const { document, customTypes, externalRefResolver, config } = opts;
|
|
42
|
-
const specVersion =
|
|
43
|
-
const specMajorVersion =
|
|
36
|
+
const specVersion = detectSpec(document.parsed);
|
|
37
|
+
const specMajorVersion = getMajorSpecVersion(specVersion);
|
|
44
38
|
const rules = config.getRulesForSpecVersion(specMajorVersion);
|
|
45
|
-
const types =
|
|
39
|
+
const types = normalizeTypes(config.extendTypes(customTypes ?? getTypes(specVersion), specVersion), config);
|
|
46
40
|
const ctx = {
|
|
47
41
|
problems: [],
|
|
48
42
|
oasVersion: specVersion,
|
|
49
43
|
visitorsData: {},
|
|
50
44
|
};
|
|
51
|
-
const preprocessors =
|
|
52
|
-
const regularRules =
|
|
53
|
-
let resolvedRefMap = await
|
|
45
|
+
const preprocessors = initRules(rules, config, 'preprocessors', specVersion);
|
|
46
|
+
const regularRules = initRules(rules, config, 'rules', specVersion);
|
|
47
|
+
let resolvedRefMap = await resolveDocument({
|
|
54
48
|
rootDocument: document,
|
|
55
49
|
rootType: types.Root,
|
|
56
50
|
externalRefResolver,
|
|
57
51
|
});
|
|
58
52
|
if (preprocessors.length > 0) {
|
|
59
53
|
// Make additional pass to resolve refs defined in preprocessors.
|
|
60
|
-
|
|
54
|
+
walkDocument({
|
|
61
55
|
document,
|
|
62
56
|
rootType: types.Root,
|
|
63
|
-
normalizedVisitors:
|
|
57
|
+
normalizedVisitors: normalizeVisitors(preprocessors, types),
|
|
64
58
|
resolvedRefMap,
|
|
65
59
|
ctx,
|
|
66
60
|
});
|
|
67
|
-
resolvedRefMap = await
|
|
61
|
+
resolvedRefMap = await resolveDocument({
|
|
68
62
|
rootDocument: document,
|
|
69
63
|
rootType: types.Root,
|
|
70
64
|
externalRefResolver,
|
|
71
65
|
});
|
|
72
66
|
}
|
|
73
|
-
const normalizedVisitors =
|
|
74
|
-
|
|
67
|
+
const normalizedVisitors = normalizeVisitors(regularRules, types);
|
|
68
|
+
walkDocument({
|
|
75
69
|
document,
|
|
76
70
|
rootType: types.Root,
|
|
77
71
|
normalizedVisitors,
|
|
@@ -80,34 +74,34 @@ async function lintDocument(opts) {
|
|
|
80
74
|
});
|
|
81
75
|
return ctx.problems.map((problem) => config.addProblemToIgnore(problem));
|
|
82
76
|
}
|
|
83
|
-
async function lintConfig(opts) {
|
|
84
|
-
const { document, severity, externalRefResolver = new
|
|
77
|
+
export async function lintConfig(opts) {
|
|
78
|
+
const { document, severity, externalRefResolver = new BaseResolver(), config } = opts;
|
|
85
79
|
const ctx = {
|
|
86
80
|
problems: [],
|
|
87
|
-
oasVersion:
|
|
81
|
+
oasVersion: SpecVersion.OAS3_0,
|
|
88
82
|
visitorsData: {},
|
|
89
83
|
};
|
|
90
|
-
const types =
|
|
84
|
+
const types = normalizeTypes(opts.externalConfigTypes || createConfigTypes(rootRedoclyConfigSchema, config), { doNotResolveExamples: config.styleguide.doNotResolveExamples });
|
|
91
85
|
const rules = [
|
|
92
86
|
{
|
|
93
87
|
severity: severity || 'error',
|
|
94
|
-
ruleId: 'configuration
|
|
95
|
-
visitor:
|
|
88
|
+
ruleId: 'configuration struct',
|
|
89
|
+
visitor: Struct({ severity: 'error' }),
|
|
96
90
|
},
|
|
97
91
|
{
|
|
98
92
|
severity: severity || 'error',
|
|
99
93
|
ruleId: 'configuration no-unresolved-refs',
|
|
100
|
-
visitor:
|
|
94
|
+
visitor: NoUnresolvedRefs({ severity: 'error' }),
|
|
101
95
|
},
|
|
102
96
|
];
|
|
103
|
-
const normalizedVisitors =
|
|
97
|
+
const normalizedVisitors = normalizeVisitors(rules, types);
|
|
104
98
|
const resolvedRefMap = opts.resolvedRefMap ||
|
|
105
|
-
(await
|
|
99
|
+
(await resolveDocument({
|
|
106
100
|
rootDocument: document,
|
|
107
101
|
rootType: types.ConfigRoot,
|
|
108
102
|
externalRefResolver,
|
|
109
103
|
}));
|
|
110
|
-
|
|
104
|
+
walkDocument({
|
|
111
105
|
document,
|
|
112
106
|
rootType: types.ConfigRoot,
|
|
113
107
|
normalizedVisitors,
|
|
@@ -116,3 +110,4 @@ async function lintConfig(opts) {
|
|
|
116
110
|
});
|
|
117
111
|
return ctx.problems;
|
|
118
112
|
}
|
|
113
|
+
//# sourceMappingURL=lint.js.map
|
package/lib/lint.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lint.js","sourceRoot":"","sources":["../src/lint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAA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E,KAAK,CAAC,UAAU;YAC1B,mBAAmB;SACpB,CAAC,CAAC,CAAC;IACN,YAAY,CAAC;QACX,QAAQ;QACR,QAAQ,EAAE,KAAK,CAAC,UAAU;QAC1B,kBAAkB;QAClB,cAAc;QACd,GAAG;KACJ,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC,QAAQ,CAAC;AACtB,CAAC"}
|
package/lib/logger.d.ts
CHANGED
|
@@ -4,10 +4,11 @@ export declare const colorOptions: {
|
|
|
4
4
|
};
|
|
5
5
|
export declare const colorize: typeof colorette;
|
|
6
6
|
declare class Logger {
|
|
7
|
-
protected stderr(str: string): boolean;
|
|
8
7
|
info(str: string): boolean | void;
|
|
9
8
|
warn(str: string): boolean | void;
|
|
10
9
|
error(str: string): boolean | void;
|
|
10
|
+
output(str: string): boolean | void;
|
|
11
11
|
}
|
|
12
12
|
export declare const logger: Logger;
|
|
13
13
|
export {};
|
|
14
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,WAAW,CAAC;AAMvC,eAAO,MAAM,YAAY;;CAAoB,CAAC;AAE9C,eAAO,MAAM,QAAQ,kBAQnB,CAAC;AAEH,cAAM,MAAM;IACV,IAAI,CAAC,GAAG,EAAE,MAAM;IAIhB,IAAI,CAAC,GAAG,EAAE,MAAM;IAIhB,KAAK,CAAC,GAAG,EAAE,MAAM;IAIjB,MAAM,CAAC,GAAG,EAAE,MAAM;CAGnB;AAED,eAAO,MAAM,MAAM,QAAe,CAAC"}
|
package/lib/logger.js
CHANGED
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const colorette = require("colorette");
|
|
5
|
-
const env_1 = require("./env");
|
|
6
|
-
const utils_1 = require("./utils");
|
|
1
|
+
import * as colorette from 'colorette';
|
|
2
|
+
import { isBrowser } from './env.js';
|
|
3
|
+
import { identity } from './utils.js';
|
|
7
4
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
8
5
|
// @ts-ignore this works but some types are not working
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export const colorOptions = colorette.options;
|
|
7
|
+
export const colorize = new Proxy(colorette, {
|
|
11
8
|
get(target, prop) {
|
|
12
|
-
if (
|
|
13
|
-
return
|
|
9
|
+
if (isBrowser) {
|
|
10
|
+
return identity;
|
|
14
11
|
}
|
|
15
12
|
return target[prop];
|
|
16
13
|
},
|
|
17
14
|
});
|
|
18
15
|
class Logger {
|
|
19
|
-
stderr(str) {
|
|
20
|
-
return process.stderr.write(str);
|
|
21
|
-
}
|
|
22
16
|
info(str) {
|
|
23
|
-
return
|
|
17
|
+
return isBrowser ? console.info(str) : process.stderr.write(str);
|
|
24
18
|
}
|
|
25
19
|
warn(str) {
|
|
26
|
-
return
|
|
20
|
+
return isBrowser ? console.warn(str) : process.stderr.write(colorize.yellow(str));
|
|
27
21
|
}
|
|
28
22
|
error(str) {
|
|
29
|
-
return
|
|
23
|
+
return isBrowser ? console.error(str) : process.stderr.write(colorize.red(str));
|
|
24
|
+
}
|
|
25
|
+
output(str) {
|
|
26
|
+
return isBrowser ? console.info(str) : process.stdout.write(str);
|
|
30
27
|
}
|
|
31
28
|
}
|
|
32
|
-
|
|
29
|
+
export const logger = new Logger();
|
|
30
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,6DAA6D;AAC7D,uDAAuD;AACvD,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC,OAA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, BuiltInOAS2RuleId, BuiltInOAS3RuleId, BuiltInOverlay1RuleId } from './types/redocly-yaml';
|
|
2
|
-
import type { Oas3Rule, Oas3Preprocessor, Oas2Rule, Oas2Preprocessor, Async2Preprocessor, Async2Rule, Async3Preprocessor, Async3Rule, Arazzo1Preprocessor, Arazzo1Rule, Overlay1Preprocessor, Overlay1Rule } from './visitors';
|
|
1
|
+
import type { BuiltInAsync2RuleId, BuiltInAsync3RuleId, BuiltInArazzo1RuleId, BuiltInOAS2RuleId, BuiltInOAS3RuleId, BuiltInOverlay1RuleId } from './types/redocly-yaml.js';
|
|
2
|
+
import type { Oas3Rule, Oas3Preprocessor, Oas2Rule, Oas2Preprocessor, Async2Preprocessor, Async2Rule, Async3Preprocessor, Async3Rule, Arazzo1Preprocessor, Arazzo1Rule, Overlay1Preprocessor, Overlay1Rule } from './visitors.js';
|
|
3
3
|
export declare enum SpecVersion {
|
|
4
4
|
OAS2 = "oas2",
|
|
5
5
|
OAS3_0 = "oas3_0",
|
|
@@ -38,4 +38,5 @@ export type Arazzo1DecoratorsSet = Record<string, Arazzo1Preprocessor>;
|
|
|
38
38
|
export type Overlay1DecoratorsSet = Record<string, Overlay1Preprocessor>;
|
|
39
39
|
export declare function detectSpec(root: unknown): SpecVersion;
|
|
40
40
|
export declare function getMajorSpecVersion(version: SpecVersion): SpecMajorVersion;
|
|
41
|
-
export declare function getTypes(spec: SpecVersion): Record<string, import("./
|
|
41
|
+
export declare function getTypes(spec: SpecVersion): Record<string, import("./index.js").NodeType> | Record<"Root" | "Tag" | "TagList" | "ExternalDocs" | "SecurityRequirement" | "SecurityRequirementList" | "Info" | "Contact" | "License" | "Paths" | "PathItem" | "Parameter" | "ParameterList" | "ParameterItems" | "Operation" | "Example" | "ExamplesMap" | "Examples" | "Header" | "Responses" | "Response" | "Schema" | "Xml" | "SchemaProperties" | "NamedSchemas" | "NamedResponses" | "NamedParameters" | "NamedSecuritySchemes" | "SecurityScheme" | "TagGroup" | "TagGroups" | "EnumDescriptions" | "Logo" | "XCodeSample" | "XCodeSampleList" | "XServer" | "XServerList", import("./index.js").NodeType> | Record<"Root" | "Tag" | "TagList" | "ExternalDocs" | "SecurityRequirement" | "SecurityRequirementList" | "Info" | "Contact" | "License" | "Paths" | "PathItem" | "Parameter" | "ParameterList" | "Operation" | "Example" | "ExamplesMap" | "Header" | "Responses" | "Response" | "Schema" | "Xml" | "SchemaProperties" | "NamedSchemas" | "NamedResponses" | "NamedParameters" | "NamedSecuritySchemes" | "SecurityScheme" | "TagGroup" | "TagGroups" | "EnumDescriptions" | "Logo" | "XCodeSample" | "XCodeSampleList" | "Server" | "ServerList" | "ServerVariable" | "ServerVariablesMap" | "Callback" | "CallbacksMap" | "RequestBody" | "MediaTypesMap" | "MediaType" | "Encoding" | "EncodingMap" | "HeadersMap" | "Link" | "LinksMap" | "DiscriminatorMapping" | "Discriminator" | "Components" | "NamedExamples" | "NamedRequestBodies" | "NamedHeaders" | "NamedLinks" | "NamedCallbacks" | "ImplicitFlow" | "PasswordFlow" | "ClientCredentials" | "AuthorizationCode" | "OAuth2Flows" | "XUsePkce" | "WebhooksMap", import("./index.js").NodeType> | Record<"Root" | "Info" | "License" | "Operation" | "Schema" | "SchemaProperties" | "SecurityScheme" | "Components" | "PatternProperties" | "NamedPathItems" | "DependentRequired", import("./index.js").NodeType>;
|
|
42
|
+
//# sourceMappingURL=oas-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oas-types.d.ts","sourceRoot":"","sources":["../src/oas-types.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,mBA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