@redocly/openapi-core 1.34.4 → 2.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -4
- package/lib/bundle.d.ts +16 -15
- package/lib/bundle.d.ts.map +1 -0
- package/lib/bundle.js +88 -109
- package/lib/bundle.js.map +1 -0
- package/lib/config/all.d.ts +3 -2
- package/lib/config/all.d.ts.map +1 -0
- package/lib/config/all.js +11 -3
- package/lib/config/all.js.map +1 -0
- package/lib/config/builtIn.d.ts +3 -2
- 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/bundle-extends.d.ts +8 -0
- package/lib/config/bundle-extends.d.ts.map +1 -0
- package/lib/config/bundle-extends.js +27 -0
- package/lib/config/bundle-extends.js.map +1 -0
- package/lib/config/config-resolvers.d.ts +15 -27
- package/lib/config/config-resolvers.d.ts.map +1 -0
- package/lib/config/config-resolvers.js +259 -373
- package/lib/config/config-resolvers.js.map +1 -0
- package/lib/config/config.d.ts +22 -26
- package/lib/config/config.d.ts.map +1 -0
- package/lib/config/config.js +104 -112
- 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 +8 -19
- package/lib/config/load.d.ts.map +1 -0
- package/lib/config/load.js +62 -107
- package/lib/config/load.js.map +1 -0
- package/lib/config/minimal.d.ts +3 -2
- package/lib/config/minimal.d.ts.map +1 -0
- package/lib/config/minimal.js +11 -3
- package/lib/config/minimal.js.map +1 -0
- package/lib/config/recommended-strict.d.ts +3 -2
- package/lib/config/recommended-strict.d.ts.map +1 -0
- package/lib/config/recommended-strict.js +11 -3
- package/lib/config/recommended-strict.js.map +1 -0
- package/lib/config/recommended.d.ts +3 -2
- package/lib/config/recommended.d.ts.map +1 -0
- package/lib/config/recommended.js +11 -3
- package/lib/config/recommended.js.map +1 -0
- package/lib/config/rules.d.ts +5 -4
- 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 +3 -2
- package/lib/config/spec.d.ts.map +1 -0
- package/lib/config/spec.js +6 -4
- package/lib/config/spec.js.map +1 -0
- package/lib/config/types.d.ts +19 -62
- 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 +5 -9
- package/lib/config/utils.d.ts.map +1 -0
- package/lib/config/utils.js +56 -258
- package/lib/config/utils.js.map +1 -0
- package/lib/config/visitors.d.ts +36 -0
- package/lib/config/visitors.d.ts.map +1 -0
- package/lib/config/visitors.js +88 -0
- package/lib/config/visitors.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 +31 -26
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +25 -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 +12 -13
- package/lib/lint.d.ts.map +1 -0
- package/lib/lint.js +46 -50
- 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 +395 -3
- package/lib/oas-types.d.ts.map +1 -0
- package/lib/oas-types.js +28 -32
- package/lib/oas-types.js.map +1 -0
- package/lib/ref-utils.d.ts +5 -2
- package/lib/ref-utils.d.ts.map +1 -0
- package/lib/ref-utils.js +30 -33
- package/lib/ref-utils.js.map +1 -0
- package/lib/resolve.d.ts +7 -9
- package/lib/resolve.d.ts.map +1 -0
- package/lib/resolve.js +40 -47
- 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 +39 -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 +23 -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 +23 -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 -3
- package/lib/rules/common/assertions/asserts.d.ts.map +1 -0
- package/lib/rules/common/assertions/asserts.js +35 -51
- 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-duplicated-tag-names.d.ts +3 -0
- package/lib/rules/common/no-duplicated-tag-names.d.ts.map +1 -0
- package/lib/rules/common/no-duplicated-tag-names.js +21 -0
- package/lib/rules/common/no-duplicated-tag-names.js.map +1 -0
- package/lib/rules/common/no-enum-type-mismatch.d.ts +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 +5 -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 +5 -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 +6 -8
- 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 +6 -8
- 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 +19 -28
- 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 +3 -8
- 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 +96 -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 +122 -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 +6 -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 +3 -6
- 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/nullable-type-sibling.d.ts +3 -0
- package/lib/rules/oas3/nullable-type-sibling.d.ts.map +1 -0
- package/lib/rules/oas3/nullable-type-sibling.js +15 -0
- package/lib/rules/oas3/nullable-type-sibling.js.map +1 -0
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts +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/no-x-security-scheme-name-in-workflow.d.ts +3 -0
- package/lib/rules/respect/no-x-security-scheme-name-in-workflow.d.ts.map +1 -0
- package/lib/rules/respect/no-x-security-scheme-name-in-workflow.js +21 -0
- package/lib/rules/respect/no-x-security-scheme-name-in-workflow.js.map +1 -0
- package/lib/rules/respect/no-x-security-scheme-name-without-openapi.d.ts +3 -0
- package/lib/rules/respect/no-x-security-scheme-name-without-openapi.d.ts.map +1 -0
- package/lib/rules/respect/no-x-security-scheme-name-without-openapi.js +25 -0
- package/lib/rules/respect/no-x-security-scheme-name-without-openapi.js.map +1 -0
- package/lib/rules/respect/respect-supported-versions.d.ts +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/respect/x-security-scheme-required-values.d.ts +3 -0
- package/lib/rules/respect/x-security-scheme-required-values.d.ts.map +1 -0
- package/lib/rules/respect/x-security-scheme-required-values.js +60 -0
- package/lib/rules/respect/x-security-scheme-required-values.js.map +1 -0
- package/lib/rules/utils.d.ts +6 -4
- package/lib/rules/utils.d.ts.map +1 -0
- package/lib/rules/utils.js +23 -43
- 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 +40 -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 +2 -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 +85 -3
- 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 +159 -3
- package/lib/types/oas3.d.ts.map +1 -0
- package/lib/types/oas3.js +44 -46
- package/lib/types/oas3.js.map +1 -0
- package/lib/types/oas3_1.d.ts +162 -3
- package/lib/types/oas3_1.d.ts.map +1 -0
- package/lib/types/oas3_1.js +19 -21
- 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 +10 -14
- package/lib/types/redocly-yaml.d.ts.map +1 -0
- package/lib/types/redocly-yaml.js +79 -813
- package/lib/types/redocly-yaml.js.map +1 -0
- package/lib/typings/arazzo.d.ts +41 -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 +45 -15
- 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 +6 -11
- package/lib/utils.d.ts.map +1 -0
- package/lib/utils.js +50 -123
- package/lib/utils.js.map +1 -0
- package/lib/visitors.d.ts +16 -15
- 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 +31 -28
- package/lib/walk.js.map +1 -0
- package/package.json +31 -10
- package/CHANGELOG.md +0 -563
- package/__tests__/utils.ts +0 -92
- package/lib/benchmark/benches/lint-with-many-rules.bench.d.ts +0 -4
- package/lib/benchmark/benches/lint-with-many-rules.bench.js +0 -38
- package/lib/benchmark/benches/lint-with-nested-rule.bench.d.ts +0 -4
- package/lib/benchmark/benches/lint-with-nested-rule.bench.js +0 -44
- package/lib/benchmark/benches/lint-with-no-rules.bench.d.ts +0 -4
- package/lib/benchmark/benches/lint-with-no-rules.bench.js +0 -25
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.d.ts +0 -4
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.js +0 -37
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.d.ts +0 -4
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.js +0 -36
- package/lib/benchmark/benches/recommended-oas3.bench.d.ts +0 -3
- package/lib/benchmark/benches/recommended-oas3.bench.js +0 -21
- package/lib/benchmark/benches/resolve-with-no-external.bench.d.ts +0 -3
- package/lib/benchmark/benches/resolve-with-no-external.bench.js +0 -22
- package/lib/benchmark/utils.d.ts +0 -6
- package/lib/benchmark/utils.js +0 -34
- 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/src/__tests__/__snapshots__/bundle.test.ts.snap +0 -461
- package/src/__tests__/bundle.test.ts +0 -478
- package/src/__tests__/codeframes.test.ts +0 -530
- package/src/__tests__/fixtures/.redocly.lint-ignore.yaml +0 -5
- package/src/__tests__/fixtures/extension.js +0 -24
- package/src/__tests__/fixtures/lint/openapi.yaml +0 -10
- package/src/__tests__/fixtures/redocly.yaml +0 -2
- package/src/__tests__/fixtures/refs/definitions.yaml +0 -3
- package/src/__tests__/fixtures/refs/examples.yaml +0 -8
- package/src/__tests__/fixtures/refs/external-request-body.yaml +0 -13
- package/src/__tests__/fixtures/refs/externalref.yaml +0 -35
- package/src/__tests__/fixtures/refs/hosted.yaml +0 -35
- package/src/__tests__/fixtures/refs/openapi-with-external-refs-conflicting-names.yaml +0 -21
- package/src/__tests__/fixtures/refs/openapi-with-external-refs.yaml +0 -33
- package/src/__tests__/fixtures/refs/openapi-with-special-names-in-props.yaml +0 -19
- package/src/__tests__/fixtures/refs/openapi-with-url-refs.yaml +0 -18
- package/src/__tests__/fixtures/refs/param-b.yaml +0 -1
- package/src/__tests__/fixtures/refs/param-c.yaml +0 -1
- package/src/__tests__/fixtures/refs/rename.yaml +0 -1
- package/src/__tests__/fixtures/refs/requestBody.yaml +0 -9
- package/src/__tests__/fixtures/refs/schema-a.yaml +0 -1
- package/src/__tests__/fixtures/refs/simple.yaml +0 -1
- package/src/__tests__/fixtures/refs/vendor.schema.yaml +0 -20
- package/src/__tests__/fixtures/resolve/External.yaml +0 -10
- package/src/__tests__/fixtures/resolve/External2.yaml +0 -4
- package/src/__tests__/fixtures/resolve/description.md +0 -3
- package/src/__tests__/fixtures/resolve/externalInfo.yaml +0 -4
- package/src/__tests__/fixtures/resolve/externalLicense.yaml +0 -1
- package/src/__tests__/fixtures/resolve/openapi-with-back.yaml +0 -13
- package/src/__tests__/fixtures/resolve/openapi-with-md-description.yaml +0 -5
- package/src/__tests__/fixtures/resolve/openapi.yaml +0 -28
- package/src/__tests__/fixtures/resolve/schemas/type-a.yaml +0 -10
- package/src/__tests__/fixtures/resolve/schemas/type-b.yaml +0 -6
- package/src/__tests__/fixtures/resolve/transitive/a.yaml +0 -1
- package/src/__tests__/fixtures/resolve/transitive/components.yaml +0 -5
- package/src/__tests__/fixtures/resolve/transitive/schemas.yaml +0 -3
- package/src/__tests__/format.test.ts +0 -147
- package/src/__tests__/js-yaml.test.ts +0 -73
- package/src/__tests__/lint.test.ts +0 -1772
- package/src/__tests__/logger-browser.test.ts +0 -53
- package/src/__tests__/logger.test.ts +0 -47
- package/src/__tests__/login.test.ts +0 -17
- package/src/__tests__/normalizeVisitors.test.ts +0 -169
- package/src/__tests__/output-browser.test.ts +0 -18
- package/src/__tests__/output.test.ts +0 -15
- package/src/__tests__/ref-utils.test.ts +0 -142
- package/src/__tests__/resolve-http.test.ts +0 -77
- package/src/__tests__/resolve.test.ts +0 -431
- package/src/__tests__/utils-browser.test.ts +0 -11
- package/src/__tests__/utils.test.ts +0 -144
- package/src/__tests__/walk.test.ts +0 -1596
- package/src/benchmark/benches/lint-with-many-rules.bench.ts +0 -41
- package/src/benchmark/benches/lint-with-nested-rule.bench.ts +0 -45
- package/src/benchmark/benches/lint-with-no-rules.bench.ts +0 -27
- package/src/benchmark/benches/lint-with-top-level-rule-report.bench.ts +0 -40
- package/src/benchmark/benches/lint-with-top-level-rule.bench.ts +0 -38
- package/src/benchmark/benches/rebilly.yaml +0 -32272
- package/src/benchmark/benches/recommended-oas3.bench.ts +0 -22
- package/src/benchmark/benches/resolve-with-no-external.bench.ts +0 -23
- package/src/benchmark/benchmark.js +0 -311
- package/src/benchmark/colors.js +0 -29
- package/src/benchmark/fork.js +0 -87
- package/src/benchmark/utils.ts +0 -37
- package/src/bundle.ts +0 -531
- package/src/config/__tests__/__snapshots__/config-resolvers.test.ts.snap +0 -485
- package/src/config/__tests__/__snapshots__/config.test.ts.snap +0 -232
- package/src/config/__tests__/config-resolvers.test.ts +0 -668
- package/src/config/__tests__/config.test.ts +0 -356
- package/src/config/__tests__/fixtures/ingore-file.ts +0 -8
- package/src/config/__tests__/fixtures/load-external.yaml +0 -2
- package/src/config/__tests__/fixtures/load-redocly.yaml +0 -2
- package/src/config/__tests__/fixtures/plugin-config.yaml +0 -2
- package/src/config/__tests__/fixtures/plugin.js +0 -56
- package/src/config/__tests__/fixtures/resolve-config/api/nested-config.yaml +0 -11
- package/src/config/__tests__/fixtures/resolve-config/api/plugin.js +0 -69
- package/src/config/__tests__/fixtures/resolve-config/local-config-with-circular.yaml +0 -7
- package/src/config/__tests__/fixtures/resolve-config/local-config-with-commonjs-export-function.yaml +0 -2
- package/src/config/__tests__/fixtures/resolve-config/local-config-with-custom-function.yaml +0 -17
- package/src/config/__tests__/fixtures/resolve-config/local-config-with-esm.yaml +0 -2
- package/src/config/__tests__/fixtures/resolve-config/local-config-with-file.yaml +0 -18
- package/src/config/__tests__/fixtures/resolve-config/local-config-with-plugin-init.yaml +0 -2
- package/src/config/__tests__/fixtures/resolve-config/local-config-with-realm-plugin.yaml +0 -2
- package/src/config/__tests__/fixtures/resolve-config/local-config-with-wrong-custom-function.yaml +0 -15
- package/src/config/__tests__/fixtures/resolve-config/local-config.yaml +0 -9
- package/src/config/__tests__/fixtures/resolve-config/plugin-esm.mjs +0 -10
- package/src/config/__tests__/fixtures/resolve-config/plugin-with-export-function.cjs +0 -10
- package/src/config/__tests__/fixtures/resolve-config/plugin-with-init-logic.js +0 -9
- package/src/config/__tests__/fixtures/resolve-config/plugin.js +0 -80
- package/src/config/__tests__/fixtures/resolve-config/realm-plugin.js +0 -12
- package/src/config/__tests__/fixtures/resolve-refs-in-config/config-with-refs.yaml +0 -8
- package/src/config/__tests__/fixtures/resolve-refs-in-config/rules.yaml +0 -2
- package/src/config/__tests__/fixtures/resolve-refs-in-config/seo.yaml +0 -1
- package/src/config/__tests__/fixtures/resolve-remote-configs/nested-remote-config.yaml +0 -3
- package/src/config/__tests__/fixtures/resolve-remote-configs/remote-config.yaml +0 -4
- package/src/config/__tests__/load.test.ts +0 -320
- package/src/config/__tests__/resolve-plugins.test.ts +0 -30
- package/src/config/__tests__/utils.test.ts +0 -225
- package/src/config/all.ts +0 -234
- package/src/config/builtIn.ts +0 -59
- package/src/config/config-resolvers.ts +0 -657
- package/src/config/config.ts +0 -423
- package/src/config/index.ts +0 -7
- package/src/config/load.ts +0 -213
- package/src/config/minimal.ts +0 -210
- package/src/config/recommended-strict.ts +0 -210
- package/src/config/recommended.ts +0 -210
- package/src/config/rules.ts +0 -72
- package/src/config/spec.ts +0 -33
- package/src/config/types.ts +0 -306
- package/src/config/utils.ts +0 -439
- package/src/decorators/__tests__/filter-in.test.ts +0 -313
- package/src/decorators/__tests__/filter-out.test.ts +0 -344
- package/src/decorators/__tests__/media-type-examples-override.test.ts +0 -665
- package/src/decorators/__tests__/remove-x-internal.test.ts +0 -416
- package/src/decorators/__tests__/resources/request.yaml +0 -3
- package/src/decorators/__tests__/resources/response.yaml +0 -3
- package/src/decorators/arazzo/index.ts +0 -1
- package/src/decorators/async2/index.ts +0 -1
- package/src/decorators/async3/index.ts +0 -1
- package/src/decorators/common/filters/filter-helper.ts +0 -73
- package/src/decorators/common/filters/filter-in.ts +0 -19
- package/src/decorators/common/filters/filter-out.ts +0 -19
- package/src/decorators/common/info-description-override.ts +0 -25
- package/src/decorators/common/info-override.ts +0 -15
- package/src/decorators/common/media-type-examples-override.ts +0 -80
- package/src/decorators/common/operation-description-override.ts +0 -31
- package/src/decorators/common/registry-dependencies.ts +0 -25
- package/src/decorators/common/remove-x-internal.ts +0 -77
- package/src/decorators/common/tag-description-override.ts +0 -26
- package/src/decorators/oas2/__tests__/remove-unused-components.test.ts +0 -228
- package/src/decorators/oas2/index.ts +0 -21
- package/src/decorators/oas2/remove-unused-components.ts +0 -109
- package/src/decorators/oas3/__tests__/remove-unused-components.test.ts +0 -313
- package/src/decorators/oas3/index.ts +0 -23
- package/src/decorators/oas3/remove-unused-components.ts +0 -138
- package/src/decorators/overlay1/index.ts +0 -1
- package/src/env.ts +0 -5
- package/src/format/codeframes.ts +0 -217
- package/src/format/format.ts +0 -479
- package/src/index.ts +0 -91
- package/src/js-yaml/index.ts +0 -16
- package/src/lint.ts +0 -190
- package/src/logger.ts +0 -36
- package/src/oas-types.ts +0 -178
- package/src/output.ts +0 -7
- package/src/redocly/__tests__/domains.test.ts +0 -52
- package/src/redocly/__tests__/redocly-client.test.ts +0 -156
- package/src/redocly/domains.ts +0 -48
- package/src/redocly/index.ts +0 -177
- package/src/redocly/redocly-client-types.ts +0 -10
- package/src/redocly/registry-api-types.ts +0 -32
- package/src/redocly/registry-api.ts +0 -147
- package/src/ref-utils.ts +0 -91
- package/src/resolve.ts +0 -461
- package/src/rules/__tests__/fixtures/code-sample.php +0 -9
- package/src/rules/__tests__/fixtures/invalid-yaml.yaml +0 -1
- package/src/rules/__tests__/fixtures/ref.yaml +0 -1
- package/src/rules/__tests__/no-unresolved-refs.test.ts +0 -271
- package/src/rules/__tests__/utils.test.ts +0 -160
- package/src/rules/ajv.ts +0 -105
- package/src/rules/arazzo/__tests__/criteria-unique.test.ts +0 -160
- package/src/rules/arazzo/__tests__/no-criteria-xpath.test.ts +0 -126
- package/src/rules/arazzo/__tests__/parameters-unique.test.ts +0 -113
- package/src/rules/arazzo/__tests__/requestBody-replacements-unique.test.ts +0 -108
- package/src/rules/arazzo/__tests__/respect-supported-versions.test.ts +0 -116
- package/src/rules/arazzo/__tests__/source-description-type.test.ts +0 -78
- package/src/rules/arazzo/__tests__/sourceDescription-name-unique.test.ts +0 -78
- package/src/rules/arazzo/__tests__/sourceDescriptions-not-empty.test.ts +0 -104
- package/src/rules/arazzo/__tests__/step-onFailure-unique.test.ts +0 -110
- package/src/rules/arazzo/__tests__/step-onSuccess-unique.test.ts +0 -110
- package/src/rules/arazzo/__tests__/stepId-unique.test.ts +0 -94
- package/src/rules/arazzo/__tests__/workflow-dependsOn.test.ts +0 -209
- package/src/rules/arazzo/__tests__/workflowId-unique.test.ts +0 -88
- package/src/rules/arazzo/criteria-unique.ts +0 -70
- package/src/rules/arazzo/index.ts +0 -38
- package/src/rules/arazzo/parameters-unique.ts +0 -33
- package/src/rules/arazzo/requestBody-replacements-unique.ts +0 -33
- package/src/rules/arazzo/sourceDescription-type.ts +0 -21
- package/src/rules/arazzo/sourceDescriptions-name-unique.ts +0 -23
- package/src/rules/arazzo/sourceDescriptions-not-empty.ts +0 -17
- package/src/rules/arazzo/step-onFailure-unique.ts +0 -33
- package/src/rules/arazzo/step-onSuccess-unique.ts +0 -33
- package/src/rules/arazzo/stepId-unique.ts +0 -24
- package/src/rules/arazzo/workflow-dependsOn.ts +0 -56
- package/src/rules/arazzo/workflowId-unique.ts +0 -21
- package/src/rules/async2/__tests__/channels-kebab-case.test.ts +0 -145
- package/src/rules/async2/__tests__/no-channel-trailing-slash.test.ts +0 -97
- package/src/rules/async2/channels-kebab-case.ts +0 -18
- package/src/rules/async2/index.ts +0 -29
- package/src/rules/async2/no-channel-trailing-slash.ts +0 -15
- package/src/rules/async3/__tests__/channels-kebab-case.test.ts +0 -145
- package/src/rules/async3/__tests__/no-channel-trailing-slash.test.ts +0 -96
- package/src/rules/async3/channels-kebab-case.ts +0 -19
- package/src/rules/async3/index.ts +0 -29
- package/src/rules/async3/no-channel-trailing-slash.ts +0 -16
- package/src/rules/common/__tests__/info-license-strict.test.ts +0 -141
- package/src/rules/common/__tests__/info-license.test.ts +0 -62
- package/src/rules/common/__tests__/license-url.test.ts +0 -63
- package/src/rules/common/__tests__/no-ambiguous-paths.test.ts +0 -96
- package/src/rules/common/__tests__/no-enum-type-mismatch.test.ts +0 -210
- package/src/rules/common/__tests__/no-identical-paths.test.ts +0 -58
- package/src/rules/common/__tests__/no-invalid-parameter-examples.test.ts +0 -53
- package/src/rules/common/__tests__/no-invalid-schema-examples.test.ts +0 -86
- package/src/rules/common/__tests__/no-path-trailing-slash.test.ts +0 -126
- package/src/rules/common/__tests__/no-required-schema-properties-undefined.test.ts +0 -550
- package/src/rules/common/__tests__/no-schema-type-mismatch.test.ts +0 -126
- package/src/rules/common/__tests__/operation-2xx-response.test.ts +0 -194
- package/src/rules/common/__tests__/operation-4xx-response.test.ts +0 -233
- package/src/rules/common/__tests__/operation-operationId-unique.test.ts +0 -76
- package/src/rules/common/__tests__/operation-operationId-url-safe.test.ts +0 -45
- package/src/rules/common/__tests__/operation-parameters-unique.test.ts +0 -167
- package/src/rules/common/__tests__/operation-singular-tag.test.ts +0 -72
- package/src/rules/common/__tests__/operation-tag-defined.test.ts +0 -68
- package/src/rules/common/__tests__/path-http-verbs-order.test.ts +0 -95
- package/src/rules/common/__tests__/path-not-include-query.test.ts +0 -64
- package/src/rules/common/__tests__/path-params-defined.test.ts +0 -202
- package/src/rules/common/__tests__/paths-kebab-case.test.ts +0 -110
- package/src/rules/common/__tests__/scalar-property-missing-example.test.ts +0 -264
- package/src/rules/common/__tests__/security-defined.test.ts +0 -284
- package/src/rules/common/__tests__/spec-strict-refs.test.ts +0 -69
- package/src/rules/common/__tests__/struct.test.ts +0 -657
- package/src/rules/common/__tests__/tag-description.test.ts +0 -65
- package/src/rules/common/__tests__/tags-alphabetical.test.ts +0 -124
- package/src/rules/common/assertions/__tests__/asserts.test.ts +0 -877
- package/src/rules/common/assertions/__tests__/index.test.ts +0 -100
- package/src/rules/common/assertions/__tests__/utils.test.ts +0 -236
- package/src/rules/common/assertions/asserts.ts +0 -365
- package/src/rules/common/assertions/index.ts +0 -68
- package/src/rules/common/assertions/utils.ts +0 -333
- package/src/rules/common/info-contact.ts +0 -16
- package/src/rules/common/info-license-strict.ts +0 -24
- package/src/rules/common/info-license-url.ts +0 -11
- package/src/rules/common/info-license.ts +0 -16
- package/src/rules/common/no-ambiguous-paths.ts +0 -50
- package/src/rules/common/no-enum-type-mismatch.ts +0 -53
- package/src/rules/common/no-http-verbs-in-paths.ts +0 -37
- package/src/rules/common/no-identical-paths.ts +0 -24
- package/src/rules/common/no-invalid-parameter-examples.ts +0 -37
- package/src/rules/common/no-invalid-schema-examples.ts +0 -40
- package/src/rules/common/no-path-trailing-slash.ts +0 -15
- package/src/rules/common/no-required-schema-properties-undefined.ts +0 -54
- package/src/rules/common/no-schema-type-mismatch.ts +0 -24
- package/src/rules/common/operation-2xx-response.ts +0 -25
- package/src/rules/common/operation-4xx-response.ts +0 -25
- package/src/rules/common/operation-description.ts +0 -14
- package/src/rules/common/operation-operationId-unique.ts +0 -21
- package/src/rules/common/operation-operationId-url-safe.ts +0 -20
- package/src/rules/common/operation-operationId.ts +0 -18
- package/src/rules/common/operation-parameters-unique.ts +0 -48
- package/src/rules/common/operation-singular-tag.ts +0 -17
- package/src/rules/common/operation-summary.ts +0 -14
- package/src/rules/common/operation-tag-defined.ts +0 -31
- package/src/rules/common/parameter-description.ts +0 -22
- package/src/rules/common/path-declaration-must-exist.ts +0 -15
- package/src/rules/common/path-excludes-patterns.ts +0 -23
- package/src/rules/common/path-http-verbs-order.ts +0 -30
- package/src/rules/common/path-not-include-query.ts +0 -17
- package/src/rules/common/path-params-defined.ts +0 -65
- package/src/rules/common/path-segment-plural.ts +0 -33
- package/src/rules/common/paths-kebab-case.ts +0 -19
- package/src/rules/common/required-string-property-missing-min-length.ts +0 -44
- package/src/rules/common/response-contains-header.ts +0 -36
- package/src/rules/common/scalar-property-missing-example.ts +0 -59
- package/src/rules/common/security-defined.ts +0 -89
- package/src/rules/common/spec-strict-refs.ts +0 -31
- package/src/rules/common/struct.ts +0 -189
- package/src/rules/common/tag-description.ts +0 -11
- package/src/rules/common/tags-alphabetical.ts +0 -27
- package/src/rules/no-unresolved-refs.ts +0 -52
- package/src/rules/oas2/__tests__/boolean-parameter-prefixes.test.ts +0 -112
- package/src/rules/oas2/__tests__/response-contains-header.test.ts +0 -180
- package/src/rules/oas2/__tests__/response-contains-property.test.ts +0 -161
- package/src/rules/oas2/__tests__/spec/fixtures/description.md +0 -1
- package/src/rules/oas2/__tests__/spec/info.test.ts +0 -355
- package/src/rules/oas2/__tests__/spec/operation.test.ts +0 -123
- package/src/rules/oas2/__tests__/spec/paths.test.ts +0 -245
- package/src/rules/oas2/__tests__/spec/referenceableScalars.test.ts +0 -37
- package/src/rules/oas2/__tests__/spec/utils.ts +0 -32
- package/src/rules/oas2/boolean-parameter-prefixes.ts +0 -26
- package/src/rules/oas2/index.ts +0 -102
- package/src/rules/oas2/request-mime-type.ts +0 -17
- package/src/rules/oas2/response-contains-property.ts +0 -37
- package/src/rules/oas2/response-mime-type.ts +0 -17
- package/src/rules/oas3/__tests__/array-parameter-serialization.test.ts +0 -275
- package/src/rules/oas3/__tests__/boolean-parameter-prefixes.test.ts +0 -113
- package/src/rules/oas3/__tests__/component-name-unique.test.ts +0 -966
- package/src/rules/oas3/__tests__/fixtures/common.yaml +0 -11
- package/src/rules/oas3/__tests__/fixtures/external-value.yaml +0 -2
- package/src/rules/oas3/__tests__/no-empty-enum-servers.com.test.ts +0 -205
- package/src/rules/oas3/__tests__/no-example-value-and-externalValue.test.ts +0 -65
- package/src/rules/oas3/__tests__/no-invalid-media-type-examples.test.ts +0 -732
- package/src/rules/oas3/__tests__/no-server-example.com.test.ts +0 -95
- package/src/rules/oas3/__tests__/no-server-trailing-slash.test.ts +0 -79
- package/src/rules/oas3/__tests__/no-unused-components.test.ts +0 -131
- package/src/rules/oas3/__tests__/operation-4xx-problem-details-rfc7807.test.ts +0 -145
- package/src/rules/oas3/__tests__/response-contains-header.test.ts +0 -401
- package/src/rules/oas3/__tests__/response-contains-property.test.ts +0 -417
- package/src/rules/oas3/__tests__/spec/callbacks.test.ts +0 -41
- package/src/rules/oas3/__tests__/spec/fixtures/description.md +0 -1
- package/src/rules/oas3/__tests__/spec/info.test.ts +0 -391
- package/src/rules/oas3/__tests__/spec/operation.test.ts +0 -253
- package/src/rules/oas3/__tests__/spec/paths.test.ts +0 -284
- package/src/rules/oas3/__tests__/spec/referenceableScalars.test.ts +0 -77
- package/src/rules/oas3/__tests__/spec/servers.test.ts +0 -505
- package/src/rules/oas3/__tests__/spec/spec.test.ts +0 -307
- package/src/rules/oas3/__tests__/spec/utils.ts +0 -32
- package/src/rules/oas3/__tests__/spec-components-invalid-map-name.test.ts +0 -282
- package/src/rules/oas3/__tests__/utils/lint-document-for-test.ts +0 -23
- package/src/rules/oas3/array-parameter-serialization.ts +0 -47
- package/src/rules/oas3/boolean-parameter-prefixes.ts +0 -28
- package/src/rules/oas3/component-name-unique.ts +0 -162
- package/src/rules/oas3/index.ts +0 -126
- package/src/rules/oas3/no-empty-servers.ts +0 -22
- package/src/rules/oas3/no-example-value-and-externalValue.ts +0 -14
- package/src/rules/oas3/no-invalid-media-type-examples.ts +0 -54
- package/src/rules/oas3/no-server-example.com.ts +0 -16
- package/src/rules/oas3/no-server-trailing-slash.ts +0 -15
- package/src/rules/oas3/no-server-variables-empty-enum.ts +0 -66
- package/src/rules/oas3/no-undefined-server-variable.ts +0 -30
- package/src/rules/oas3/no-unused-components.ts +0 -75
- package/src/rules/oas3/operation-4xx-problem-details-rfc7807.ts +0 -36
- package/src/rules/oas3/request-mime-type.ts +0 -31
- package/src/rules/oas3/response-contains-property.ts +0 -39
- package/src/rules/oas3/response-mime-type.ts +0 -31
- package/src/rules/oas3/spec-components-invalid-map-name.ts +0 -69
- package/src/rules/other/stats.ts +0 -75
- package/src/rules/overlay1/__tests__/info-contact.test.ts +0 -112
- package/src/rules/overlay1/index.ts +0 -14
- package/src/rules/respect/no-criteria-xpath.ts +0 -20
- package/src/rules/respect/respect-supported-versions.ts +0 -24
- package/src/rules/utils.ts +0 -230
- package/src/types/arazzo.ts +0 -305
- package/src/types/asyncapi2.ts +0 -1121
- package/src/types/asyncapi3.ts +0 -383
- package/src/types/index.ts +0 -144
- package/src/types/json-schema-adapter.ts +0 -217
- package/src/types/oas2.ts +0 -481
- package/src/types/oas3.ts +0 -594
- package/src/types/oas3_1.ts +0 -290
- package/src/types/overlay.ts +0 -40
- package/src/types/redocly-yaml.ts +0 -1226
- package/src/typings/arazzo.ts +0 -172
- package/src/typings/asyncapi.ts +0 -26
- package/src/typings/asyncapi3.ts +0 -61
- package/src/typings/common.ts +0 -18
- package/src/typings/openapi.ts +0 -347
- package/src/typings/overlay.ts +0 -19
- package/src/typings/swagger.ts +0 -236
- package/src/utils.ts +0 -357
- package/src/visitors.ts +0 -598
- package/src/walk.ts +0 -467
- package/tsconfig.json +0 -8
- package/tsconfig.tsbuildinfo +0 -1
package/README.md
CHANGED
|
@@ -137,6 +137,17 @@ const bundleResults = await bundleFromString({
|
|
|
137
137
|
});
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
+
### Load and lint a configuration file
|
|
141
|
+
|
|
142
|
+
[Lint](https://redocly.com/docs/cli/commands/lint/) a configuration file to validate its structure and rules.
|
|
143
|
+
|
|
144
|
+
```js
|
|
145
|
+
import { lintConfig, loadConfig } from '@redocly/openapi-core';
|
|
146
|
+
|
|
147
|
+
const config = await loadConfig({ configPath: 'redocly.yaml' });
|
|
148
|
+
const configProblems = await lintConfig({ config });
|
|
149
|
+
```
|
|
150
|
+
|
|
140
151
|
## API
|
|
141
152
|
|
|
142
153
|
### `createConfig`
|
|
@@ -164,11 +175,28 @@ it tries to find `redocly.yaml` in the current working directory.
|
|
|
164
175
|
async function loadConfig(options?: {
|
|
165
176
|
// optional path to the config file for resolving $refs and proper error locations
|
|
166
177
|
configPath?: string;
|
|
167
|
-
// allows to add custom `extends`
|
|
178
|
+
// allows to add custom `extends` instead of the one from the config file
|
|
168
179
|
customExtends?: string[];
|
|
169
180
|
}): Promise<Config>;
|
|
170
181
|
```
|
|
171
182
|
|
|
183
|
+
### `lintConfig`
|
|
184
|
+
|
|
185
|
+
Lint a configuration file to validate its structure and rules.
|
|
186
|
+
|
|
187
|
+
```ts
|
|
188
|
+
async function lintConfig(options: {
|
|
189
|
+
// config object to validate
|
|
190
|
+
config: Config;
|
|
191
|
+
// optional severity level for validation
|
|
192
|
+
severity?: ProblemSeverity;
|
|
193
|
+
// optional external reference resolver
|
|
194
|
+
externalRefResolver?: BaseResolver;
|
|
195
|
+
// optional override for config types
|
|
196
|
+
externalConfigTypes?: Record<string, NodeType>;
|
|
197
|
+
}): Promise<NormalizedProblem[]>;
|
|
198
|
+
```
|
|
199
|
+
|
|
172
200
|
### `lint`
|
|
173
201
|
|
|
174
202
|
Lint an OpenAPI document from the file system.
|
|
@@ -179,6 +207,8 @@ async function lint(options: {
|
|
|
179
207
|
ref: string;
|
|
180
208
|
// config object
|
|
181
209
|
config: Config;
|
|
210
|
+
// optional external reference resolver
|
|
211
|
+
externalRefResolver?: BaseResolver;
|
|
182
212
|
}): Promise<NormalizedProblem[]>;
|
|
183
213
|
```
|
|
184
214
|
|
|
@@ -194,6 +224,8 @@ async function lintFromString(options: {
|
|
|
194
224
|
absoluteRef?: string;
|
|
195
225
|
// config object
|
|
196
226
|
config: Config;
|
|
227
|
+
// optional external reference resolver
|
|
228
|
+
externalRefResolver?: BaseResolver;
|
|
197
229
|
}): Promise<NormalizedProblem[]>;
|
|
198
230
|
```
|
|
199
231
|
|
|
@@ -204,7 +236,9 @@ Bundle an OpenAPI document from the file system.
|
|
|
204
236
|
```ts
|
|
205
237
|
async function bundle(options: {
|
|
206
238
|
// path to the OpenAPI document root
|
|
207
|
-
ref
|
|
239
|
+
ref?: string;
|
|
240
|
+
// optional document object (alternative to ref)
|
|
241
|
+
doc?: Document;
|
|
208
242
|
// config object
|
|
209
243
|
config: Config;
|
|
210
244
|
// whether to fully dereference $refs, resulting document won't have any $ref
|
|
@@ -214,6 +248,10 @@ async function bundle(options: {
|
|
|
214
248
|
removeUnusedComponents?: boolean;
|
|
215
249
|
// whether to keep $ref pointers to the http URLs and resolve only local fs $refs
|
|
216
250
|
keepUrlRefs?: boolean;
|
|
251
|
+
// optional external reference resolver
|
|
252
|
+
externalRefResolver?: BaseResolver;
|
|
253
|
+
// optional base path for resolution
|
|
254
|
+
base?: string | null;
|
|
217
255
|
}): Promise<{
|
|
218
256
|
bundle: {
|
|
219
257
|
parsed: object; // OpenAPI document object as js object
|
|
@@ -223,7 +261,6 @@ async function bundle(options: {
|
|
|
223
261
|
rootType
|
|
224
262
|
refTypes
|
|
225
263
|
visitorsData
|
|
226
|
-
|
|
227
264
|
}>;
|
|
228
265
|
```
|
|
229
266
|
|
|
@@ -246,6 +283,8 @@ async function bundleFromString(options: {
|
|
|
246
283
|
removeUnusedComponents?: boolean;
|
|
247
284
|
// whether to keep $ref pointers to the http URLs and resolve only local fs $refs
|
|
248
285
|
keepUrlRefs?: boolean;
|
|
286
|
+
// optional external reference resolver
|
|
287
|
+
externalRefResolver?: BaseResolver;
|
|
249
288
|
}): Promise<{
|
|
250
289
|
bundle: {
|
|
251
290
|
parsed: object; // OpenAPI document object as js object
|
|
@@ -255,7 +294,6 @@ async function bundleFromString(options: {
|
|
|
255
294
|
rootType
|
|
256
295
|
refTypes
|
|
257
296
|
visitorsData
|
|
258
|
-
|
|
259
297
|
}>;
|
|
260
298
|
```
|
|
261
299
|
|
package/lib/bundle.d.ts
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { BaseResolver } from './resolve';
|
|
2
|
-
import { SpecMajorVersion } from './oas-types';
|
|
3
|
-
import
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
1
|
+
import { BaseResolver } from './resolve.js';
|
|
2
|
+
import { SpecMajorVersion } from './oas-types.js';
|
|
3
|
+
import { type Config } from './config/index.js';
|
|
4
|
+
import type { Plugin, ResolvedConfig } from './config/types.js';
|
|
5
|
+
import type { NormalizedNodeType, NodeType } from './types/index.js';
|
|
6
|
+
import type { NormalizedProblem } from './walk.js';
|
|
7
|
+
import type { Document, ResolvedRefMap } from './resolve.js';
|
|
8
|
+
import type { CollectFn } from './utils.js';
|
|
8
9
|
export declare enum OasVersion {
|
|
9
10
|
Version2 = "oas2",
|
|
10
11
|
Version3_0 = "oas3_0",
|
|
11
12
|
Version3_1 = "oas3_1"
|
|
12
13
|
}
|
|
13
|
-
export type
|
|
14
|
+
export type CoreBundleOptions = {
|
|
14
15
|
externalRefResolver?: BaseResolver;
|
|
15
16
|
config: Config;
|
|
16
17
|
dereference?: boolean;
|
|
17
18
|
base?: string | null;
|
|
18
|
-
skipRedoclyRegistryRefs?: boolean;
|
|
19
19
|
removeUnusedComponents?: boolean;
|
|
20
20
|
keepUrlRefs?: boolean;
|
|
21
21
|
};
|
|
22
|
-
export declare function
|
|
22
|
+
export declare function collectConfigPlugins(document: Document, resolvedRefMap: ResolvedRefMap, rootConfigDir: string): (string | Plugin)[];
|
|
23
|
+
export declare function bundleConfig(document: Document, resolvedRefMap: ResolvedRefMap, plugins: Plugin[]): ResolvedConfig;
|
|
23
24
|
export declare function bundle(opts: {
|
|
24
25
|
ref?: string;
|
|
25
26
|
doc?: Document;
|
|
26
27
|
collectSpecData?: CollectFn;
|
|
27
|
-
} &
|
|
28
|
+
} & CoreBundleOptions): Promise<BundleResult>;
|
|
28
29
|
export declare function bundleFromString(opts: {
|
|
29
30
|
source: string;
|
|
30
31
|
absoluteRef?: string;
|
|
31
|
-
} &
|
|
32
|
+
} & CoreBundleOptions): Promise<BundleResult>;
|
|
32
33
|
export type BundleResult = {
|
|
33
34
|
bundle: Document;
|
|
34
35
|
problems: NormalizedProblem[];
|
|
@@ -39,12 +40,12 @@ export type BundleResult = {
|
|
|
39
40
|
};
|
|
40
41
|
export declare function bundleDocument(opts: {
|
|
41
42
|
document: Document;
|
|
42
|
-
config:
|
|
43
|
+
config: Config;
|
|
43
44
|
customTypes?: Record<string, NodeType>;
|
|
44
45
|
externalRefResolver: BaseResolver;
|
|
45
46
|
dereference?: boolean;
|
|
46
|
-
skipRedoclyRegistryRefs?: boolean;
|
|
47
47
|
removeUnusedComponents?: boolean;
|
|
48
48
|
keepUrlRefs?: boolean;
|
|
49
49
|
}): Promise<BundleResult>;
|
|
50
|
-
export declare function mapTypeToComponent(typeName: string, version: SpecMajorVersion): "
|
|
50
|
+
export declare function mapTypeToComponent(typeName: string, version: SpecMajorVersion): "responses" | "definitions" | "links" | "parameters" | "examples" | "headers" | "schemas" | "requestBodies" | "securitySchemes" | "callbacks" | null;
|
|
51
|
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
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const rules_1 = require("./config/rules");
|
|
16
|
-
const no_unresolved_refs_1 = require("./rules/no-unresolved-refs");
|
|
17
|
-
const utils_1 = require("./utils");
|
|
18
|
-
const domains_1 = require("./redocly/domains");
|
|
19
|
-
const remove_unused_components_1 = require("./decorators/oas2/remove-unused-components");
|
|
20
|
-
const remove_unused_components_2 = require("./decorators/oas3/remove-unused-components");
|
|
21
|
-
const redocly_yaml_1 = require("./types/redocly-yaml");
|
|
22
|
-
var OasVersion;
|
|
1
|
+
import { BaseResolver, resolveDocument, makeRefId, makeDocumentFromString } from './resolve.js';
|
|
2
|
+
import { normalizeVisitors } from './visitors.js';
|
|
3
|
+
import { normalizeTypes } from './types/index.js';
|
|
4
|
+
import { walkDocument } from './walk.js';
|
|
5
|
+
import { detectSpec, getTypes, getMajorSpecVersion, SpecMajorVersion, SpecVersion, } from './oas-types.js';
|
|
6
|
+
import { isAbsoluteUrl, isExternalValue, isRef, refBaseName, replaceRef } from './ref-utils.js';
|
|
7
|
+
import { initRules } from './config/rules.js';
|
|
8
|
+
import { reportUnresolvedRef } from './rules/no-unresolved-refs.js';
|
|
9
|
+
import { dequal, isTruthy } from './utils.js';
|
|
10
|
+
import { RemoveUnusedComponents as RemoveUnusedComponentsOas2 } from './decorators/oas2/remove-unused-components.js';
|
|
11
|
+
import { RemoveUnusedComponents as RemoveUnusedComponentsOas3 } from './decorators/oas3/remove-unused-components.js';
|
|
12
|
+
import { NormalizedConfigTypes } from './types/redocly-yaml.js';
|
|
13
|
+
import { makeConfigBundlerVisitor, makePluginsCollectorVisitor } from './config/visitors.js';
|
|
14
|
+
export var OasVersion;
|
|
23
15
|
(function (OasVersion) {
|
|
24
16
|
OasVersion["Version2"] = "oas2";
|
|
25
17
|
OasVersion["Version3_0"] = "oas3_0";
|
|
26
18
|
OasVersion["Version3_1"] = "oas3_1";
|
|
27
|
-
})(OasVersion || (
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
severity: 'error',
|
|
31
|
-
ruleId: 'configBundler',
|
|
32
|
-
visitor: {
|
|
33
|
-
ref: {
|
|
34
|
-
leave(node, ctx, resolved) {
|
|
35
|
-
replaceRef(node, resolved, ctx);
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
], redocly_yaml_1.NormalizedConfigTypes);
|
|
41
|
-
async function bundleConfig(document, resolvedRefMap) {
|
|
19
|
+
})(OasVersion || (OasVersion = {}));
|
|
20
|
+
export function collectConfigPlugins(document, resolvedRefMap, rootConfigDir) {
|
|
42
21
|
const ctx = {
|
|
43
22
|
problems: [],
|
|
44
|
-
oasVersion:
|
|
23
|
+
oasVersion: SpecVersion.OAS3_0, // TODO: change it after we rename oasVersion to specVersion
|
|
45
24
|
refTypes: new Map(),
|
|
46
25
|
visitorsData: {},
|
|
47
26
|
};
|
|
48
|
-
|
|
27
|
+
const plugins = [];
|
|
28
|
+
walkDocument({
|
|
49
29
|
document,
|
|
50
|
-
rootType:
|
|
51
|
-
normalizedVisitors:
|
|
30
|
+
rootType: NormalizedConfigTypes.ConfigRoot,
|
|
31
|
+
normalizedVisitors: makePluginsCollectorVisitor(plugins, rootConfigDir),
|
|
32
|
+
resolvedRefMap,
|
|
33
|
+
ctx,
|
|
34
|
+
});
|
|
35
|
+
return plugins;
|
|
36
|
+
}
|
|
37
|
+
export function bundleConfig(document, resolvedRefMap, plugins) {
|
|
38
|
+
const ctx = {
|
|
39
|
+
problems: [],
|
|
40
|
+
oasVersion: SpecVersion.OAS3_0,
|
|
41
|
+
refTypes: new Map(),
|
|
42
|
+
visitorsData: {},
|
|
43
|
+
};
|
|
44
|
+
walkDocument({
|
|
45
|
+
document,
|
|
46
|
+
rootType: NormalizedConfigTypes.ConfigRoot,
|
|
47
|
+
normalizedVisitors: makeConfigBundlerVisitor(plugins),
|
|
52
48
|
resolvedRefMap,
|
|
53
49
|
ctx,
|
|
54
50
|
});
|
|
55
51
|
return document.parsed ?? {};
|
|
56
52
|
}
|
|
57
|
-
async function bundle(opts) {
|
|
58
|
-
const { ref, doc, externalRefResolver = new
|
|
53
|
+
export async function bundle(opts) {
|
|
54
|
+
const { ref, doc, externalRefResolver = new BaseResolver(opts.config.resolve), base = null, } = opts;
|
|
59
55
|
if (!(ref || doc)) {
|
|
60
56
|
throw new Error('Document or reference is required.\n');
|
|
61
57
|
}
|
|
@@ -67,28 +63,26 @@ async function bundle(opts) {
|
|
|
67
63
|
return bundleDocument({
|
|
68
64
|
document,
|
|
69
65
|
...opts,
|
|
70
|
-
config: opts.config.styleguide,
|
|
71
66
|
externalRefResolver,
|
|
72
67
|
});
|
|
73
68
|
}
|
|
74
|
-
async function bundleFromString(opts) {
|
|
75
|
-
const { source, absoluteRef, externalRefResolver = new
|
|
76
|
-
const document =
|
|
69
|
+
export async function bundleFromString(opts) {
|
|
70
|
+
const { source, absoluteRef, externalRefResolver = new BaseResolver(opts.config.resolve) } = opts;
|
|
71
|
+
const document = makeDocumentFromString(source, absoluteRef || '/');
|
|
77
72
|
return bundleDocument({
|
|
78
73
|
document,
|
|
79
74
|
...opts,
|
|
80
75
|
externalRefResolver,
|
|
81
|
-
config: opts.config.styleguide,
|
|
82
76
|
});
|
|
83
77
|
}
|
|
84
|
-
async function bundleDocument(opts) {
|
|
85
|
-
const { document, config, customTypes, externalRefResolver, dereference = false,
|
|
86
|
-
const specVersion =
|
|
87
|
-
const specMajorVersion =
|
|
78
|
+
export async function bundleDocument(opts) {
|
|
79
|
+
const { document, config, customTypes, externalRefResolver, dereference = false, removeUnusedComponents = false, keepUrlRefs = false, } = opts;
|
|
80
|
+
const specVersion = detectSpec(document.parsed);
|
|
81
|
+
const specMajorVersion = getMajorSpecVersion(specVersion);
|
|
88
82
|
const rules = config.getRulesForSpecVersion(specMajorVersion);
|
|
89
|
-
const types =
|
|
90
|
-
const preprocessors =
|
|
91
|
-
const decorators =
|
|
83
|
+
const types = normalizeTypes(config.extendTypes(customTypes ?? getTypes(specVersion), specVersion), config);
|
|
84
|
+
const preprocessors = initRules(rules, config, 'preprocessors', specVersion);
|
|
85
|
+
const decorators = initRules(rules, config, 'decorators', specVersion);
|
|
92
86
|
const ctx = {
|
|
93
87
|
problems: [],
|
|
94
88
|
oasVersion: specVersion,
|
|
@@ -99,40 +93,40 @@ async function bundleDocument(opts) {
|
|
|
99
93
|
decorators.push({
|
|
100
94
|
severity: 'error',
|
|
101
95
|
ruleId: 'remove-unused-components',
|
|
102
|
-
visitor: specMajorVersion ===
|
|
103
|
-
? (
|
|
104
|
-
: (
|
|
96
|
+
visitor: specMajorVersion === SpecMajorVersion.OAS2
|
|
97
|
+
? RemoveUnusedComponentsOas2({})
|
|
98
|
+
: RemoveUnusedComponentsOas3({}),
|
|
105
99
|
});
|
|
106
100
|
}
|
|
107
|
-
let resolvedRefMap = await
|
|
101
|
+
let resolvedRefMap = await resolveDocument({
|
|
108
102
|
rootDocument: document,
|
|
109
103
|
rootType: types.Root,
|
|
110
104
|
externalRefResolver,
|
|
111
105
|
});
|
|
112
106
|
if (preprocessors.length > 0) {
|
|
113
107
|
// Make additional pass to resolve refs defined in preprocessors.
|
|
114
|
-
|
|
108
|
+
walkDocument({
|
|
115
109
|
document,
|
|
116
110
|
rootType: types.Root,
|
|
117
|
-
normalizedVisitors:
|
|
111
|
+
normalizedVisitors: normalizeVisitors(preprocessors, types),
|
|
118
112
|
resolvedRefMap,
|
|
119
113
|
ctx,
|
|
120
114
|
});
|
|
121
|
-
resolvedRefMap = await
|
|
115
|
+
resolvedRefMap = await resolveDocument({
|
|
122
116
|
rootDocument: document,
|
|
123
117
|
rootType: types.Root,
|
|
124
118
|
externalRefResolver,
|
|
125
119
|
});
|
|
126
120
|
}
|
|
127
|
-
const bundleVisitor =
|
|
121
|
+
const bundleVisitor = normalizeVisitors([
|
|
128
122
|
{
|
|
129
123
|
severity: 'error',
|
|
130
124
|
ruleId: 'bundler',
|
|
131
|
-
visitor: makeBundleVisitor(specMajorVersion, dereference,
|
|
125
|
+
visitor: makeBundleVisitor(specMajorVersion, dereference, document, resolvedRefMap, keepUrlRefs),
|
|
132
126
|
},
|
|
133
127
|
...decorators,
|
|
134
128
|
], types);
|
|
135
|
-
|
|
129
|
+
walkDocument({
|
|
136
130
|
document,
|
|
137
131
|
rootType: types.Root,
|
|
138
132
|
normalizedVisitors: bundleVisitor,
|
|
@@ -148,9 +142,9 @@ async function bundleDocument(opts) {
|
|
|
148
142
|
visitorsData: ctx.visitorsData,
|
|
149
143
|
};
|
|
150
144
|
}
|
|
151
|
-
function mapTypeToComponent(typeName, version) {
|
|
145
|
+
export function mapTypeToComponent(typeName, version) {
|
|
152
146
|
switch (version) {
|
|
153
|
-
case
|
|
147
|
+
case SpecMajorVersion.OAS3:
|
|
154
148
|
switch (typeName) {
|
|
155
149
|
case 'Schema':
|
|
156
150
|
return 'schemas';
|
|
@@ -173,7 +167,7 @@ function mapTypeToComponent(typeName, version) {
|
|
|
173
167
|
default:
|
|
174
168
|
return null;
|
|
175
169
|
}
|
|
176
|
-
case
|
|
170
|
+
case SpecMajorVersion.OAS2:
|
|
177
171
|
switch (typeName) {
|
|
178
172
|
case 'Schema':
|
|
179
173
|
return 'definitions';
|
|
@@ -184,7 +178,7 @@ function mapTypeToComponent(typeName, version) {
|
|
|
184
178
|
default:
|
|
185
179
|
return null;
|
|
186
180
|
}
|
|
187
|
-
case
|
|
181
|
+
case SpecMajorVersion.Async2:
|
|
188
182
|
switch (typeName) {
|
|
189
183
|
case 'Schema':
|
|
190
184
|
return 'schemas';
|
|
@@ -193,7 +187,7 @@ function mapTypeToComponent(typeName, version) {
|
|
|
193
187
|
default:
|
|
194
188
|
return null;
|
|
195
189
|
}
|
|
196
|
-
case
|
|
190
|
+
case SpecMajorVersion.Async3:
|
|
197
191
|
switch (typeName) {
|
|
198
192
|
case 'Schema':
|
|
199
193
|
return 'schemas';
|
|
@@ -202,7 +196,7 @@ function mapTypeToComponent(typeName, version) {
|
|
|
202
196
|
default:
|
|
203
197
|
return null;
|
|
204
198
|
}
|
|
205
|
-
case
|
|
199
|
+
case SpecMajorVersion.Arazzo1:
|
|
206
200
|
switch (typeName) {
|
|
207
201
|
case 'Root.workflows_items.parameters_items':
|
|
208
202
|
case 'Root.workflows_items.steps_items.parameters_items':
|
|
@@ -210,34 +204,22 @@ function mapTypeToComponent(typeName, version) {
|
|
|
210
204
|
default:
|
|
211
205
|
return null;
|
|
212
206
|
}
|
|
213
|
-
case
|
|
207
|
+
case SpecMajorVersion.Overlay1:
|
|
214
208
|
switch (typeName) {
|
|
215
209
|
default:
|
|
216
210
|
return null;
|
|
217
211
|
}
|
|
218
212
|
}
|
|
219
213
|
}
|
|
220
|
-
function replaceRef(ref, resolved, ctx) {
|
|
221
|
-
if (!(0, utils_1.isPlainObject)(resolved.node)) {
|
|
222
|
-
ctx.parent[ctx.key] = resolved.node;
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
226
|
-
// @ts-ignore
|
|
227
|
-
delete ref.$ref;
|
|
228
|
-
const obj = Object.assign({}, resolved.node, ref);
|
|
229
|
-
Object.assign(ref, obj); // assign ref itself again so ref fields take precedence
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
214
|
// function oas3Move
|
|
233
|
-
function makeBundleVisitor(version, dereference,
|
|
215
|
+
function makeBundleVisitor(version, dereference, rootDocument, resolvedRefMap, keepUrlRefs) {
|
|
234
216
|
let components;
|
|
235
217
|
let rootLocation;
|
|
236
218
|
const visitor = {
|
|
237
219
|
ref: {
|
|
238
220
|
leave(node, ctx, resolved) {
|
|
239
221
|
if (!resolved.location || resolved.node === undefined) {
|
|
240
|
-
|
|
222
|
+
reportUnresolvedRef(resolved, ctx.report, ctx.location);
|
|
241
223
|
return;
|
|
242
224
|
}
|
|
243
225
|
if (resolved.location.source === rootDocument.source &&
|
|
@@ -246,11 +228,7 @@ function makeBundleVisitor(version, dereference, skipRedoclyRegistryRefs, rootDo
|
|
|
246
228
|
!dereference) {
|
|
247
229
|
return;
|
|
248
230
|
}
|
|
249
|
-
|
|
250
|
-
if (skipRedoclyRegistryRefs && (0, domains_1.isRedoclyRegistryURL)(node.$ref)) {
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
if (keepUrlRefs && (0, ref_utils_1.isAbsoluteUrl)(node.$ref)) {
|
|
231
|
+
if (keepUrlRefs && isAbsoluteUrl(node.$ref)) {
|
|
254
232
|
return;
|
|
255
233
|
}
|
|
256
234
|
const componentType = mapTypeToComponent(ctx.type.name, version);
|
|
@@ -271,13 +249,13 @@ function makeBundleVisitor(version, dereference, skipRedoclyRegistryRefs, rootDo
|
|
|
271
249
|
},
|
|
272
250
|
Example: {
|
|
273
251
|
leave(node, ctx) {
|
|
274
|
-
if (
|
|
252
|
+
if (isExternalValue(node) && node.value === undefined) {
|
|
275
253
|
const resolved = ctx.resolve({ $ref: node.externalValue });
|
|
276
254
|
if (!resolved.location || resolved.node === undefined) {
|
|
277
|
-
|
|
255
|
+
reportUnresolvedRef(resolved, ctx.report, ctx.location);
|
|
278
256
|
return;
|
|
279
257
|
}
|
|
280
|
-
if (keepUrlRefs &&
|
|
258
|
+
if (keepUrlRefs && isAbsoluteUrl(node.externalValue)) {
|
|
281
259
|
return;
|
|
282
260
|
}
|
|
283
261
|
node.value = ctx.resolve({ $ref: node.externalValue }).node;
|
|
@@ -288,32 +266,32 @@ function makeBundleVisitor(version, dereference, skipRedoclyRegistryRefs, rootDo
|
|
|
288
266
|
Root: {
|
|
289
267
|
enter(root, ctx) {
|
|
290
268
|
rootLocation = ctx.location;
|
|
291
|
-
if (version ===
|
|
269
|
+
if (version === SpecMajorVersion.OAS3) {
|
|
292
270
|
components = root.components = root.components || {};
|
|
293
271
|
}
|
|
294
|
-
else if (version ===
|
|
272
|
+
else if (version === SpecMajorVersion.OAS2) {
|
|
295
273
|
components = root;
|
|
296
274
|
}
|
|
297
|
-
else if (version ===
|
|
275
|
+
else if (version === SpecMajorVersion.Async2) {
|
|
298
276
|
components = root.components = root.components || {};
|
|
299
277
|
}
|
|
300
|
-
else if (version ===
|
|
278
|
+
else if (version === SpecMajorVersion.Async3) {
|
|
301
279
|
components = root.components = root.components || {};
|
|
302
280
|
}
|
|
303
|
-
else if (version ===
|
|
281
|
+
else if (version === SpecMajorVersion.Arazzo1) {
|
|
304
282
|
components = root.components = root.components || {};
|
|
305
283
|
}
|
|
306
284
|
},
|
|
307
285
|
},
|
|
308
286
|
};
|
|
309
|
-
if (version ===
|
|
287
|
+
if (version === SpecMajorVersion.OAS3) {
|
|
310
288
|
visitor.DiscriminatorMapping = {
|
|
311
289
|
leave(mapping, ctx) {
|
|
312
290
|
for (const name of Object.keys(mapping)) {
|
|
313
291
|
const $ref = mapping[name];
|
|
314
292
|
const resolved = ctx.resolve({ $ref });
|
|
315
293
|
if (!resolved.location || resolved.node === undefined) {
|
|
316
|
-
|
|
294
|
+
reportUnresolvedRef(resolved, ctx.report, ctx.location.child(name));
|
|
317
295
|
return;
|
|
318
296
|
}
|
|
319
297
|
const componentType = mapTypeToComponent('Schema', version);
|
|
@@ -323,7 +301,7 @@ function makeBundleVisitor(version, dereference, skipRedoclyRegistryRefs, rootDo
|
|
|
323
301
|
};
|
|
324
302
|
}
|
|
325
303
|
function resolveBundledComponent(node, resolved, ctx) {
|
|
326
|
-
const newRefId =
|
|
304
|
+
const newRefId = makeRefId(ctx.location.source.absoluteRef, node.$ref);
|
|
327
305
|
resolvedRefMap.set(newRefId, {
|
|
328
306
|
document: rootDocument,
|
|
329
307
|
isRemote: false,
|
|
@@ -336,9 +314,9 @@ function makeBundleVisitor(version, dereference, skipRedoclyRegistryRefs, rootDo
|
|
|
336
314
|
components[componentType] = components[componentType] || {};
|
|
337
315
|
const name = getComponentName(target, componentType, ctx);
|
|
338
316
|
components[componentType][name] = target.node;
|
|
339
|
-
if (version ===
|
|
340
|
-
version ===
|
|
341
|
-
version ===
|
|
317
|
+
if (version === SpecMajorVersion.OAS3 ||
|
|
318
|
+
version === SpecMajorVersion.Async2 ||
|
|
319
|
+
version === SpecMajorVersion.Async3) {
|
|
342
320
|
return `#/components/${componentType}/${name}`;
|
|
343
321
|
}
|
|
344
322
|
else {
|
|
@@ -346,18 +324,18 @@ function makeBundleVisitor(version, dereference, skipRedoclyRegistryRefs, rootDo
|
|
|
346
324
|
}
|
|
347
325
|
}
|
|
348
326
|
function isEqualOrEqualRef(node, target, ctx) {
|
|
349
|
-
if (
|
|
327
|
+
if (isRef(node) &&
|
|
350
328
|
ctx.resolve(node, rootLocation.absolutePointer).location?.absolutePointer ===
|
|
351
329
|
target.location.absolutePointer) {
|
|
352
330
|
return true;
|
|
353
331
|
}
|
|
354
|
-
return
|
|
332
|
+
return dequal(node, target.node);
|
|
355
333
|
}
|
|
356
334
|
function getComponentName(target, componentType, ctx) {
|
|
357
335
|
const [fileRef, pointer] = [target.location.source.absoluteRef, target.location.pointer];
|
|
358
336
|
const componentsGroup = components[componentType];
|
|
359
337
|
let name = '';
|
|
360
|
-
const refParts = pointer.slice(2).split('/').filter(
|
|
338
|
+
const refParts = pointer.slice(2).split('/').filter(isTruthy); // slice(2) removes "#/"
|
|
361
339
|
while (refParts.length > 0) {
|
|
362
340
|
name = refParts.pop() + (name ? `-${name}` : '');
|
|
363
341
|
if (!componentsGroup ||
|
|
@@ -366,7 +344,7 @@ function makeBundleVisitor(version, dereference, skipRedoclyRegistryRefs, rootDo
|
|
|
366
344
|
return name;
|
|
367
345
|
}
|
|
368
346
|
}
|
|
369
|
-
name =
|
|
347
|
+
name = refBaseName(fileRef) + (name ? `_${name}` : '');
|
|
370
348
|
if (!componentsGroup[name] || isEqualOrEqualRef(componentsGroup[name], target, ctx)) {
|
|
371
349
|
return name;
|
|
372
350
|
}
|
|
@@ -387,3 +365,4 @@ function makeBundleVisitor(version, dereference, skipRedoclyRegistryRefs, rootDo
|
|
|
387
365
|
}
|
|
388
366
|
return visitor;
|
|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,QAAQ,IAAI,QAAQ,EAAE,CAAC;YACjC,QAAQ,EAAE,CAAC;QACb,CAAC;QAED,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3B,GAAG,CAAC,MAAM,CAAC;gBACT,OAAO,EAAE,gFAAgF,QAAQ,OAAO,IAAI,GAAG;gBAC/G,QAAQ,EAAE,GAAG,CAAC,QAAQ;gBACtB,aAAa,EAAE,MAAM;aACtB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/lib/config/all.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
declare const all:
|
|
1
|
+
import { type RawGovernanceConfig } from './types.js';
|
|
2
|
+
declare const all: RawGovernanceConfig<'built-in'>;
|
|
3
3
|
export default all;
|
|
4
|
+
//# sourceMappingURL=all.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../src/config/all.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,QAAA,MAAM,GAAG,EAAE,mBAAmB,CAAC,UAAU,CA8OxC,CAAC;AAEF,eAAe,GAAG,CAAC"}
|