@redocly/openapi-core 0.0.0-snapshot.1744362365 → 0.0.0-snapshot.1744801622
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/benchmark/benches/lint-with-many-rules.bench.d.ts +1 -2
- package/lib/benchmark/benches/lint-with-many-rules.bench.js +19 -17
- package/lib/benchmark/benches/lint-with-nested-rule.bench.d.ts +1 -2
- package/lib/benchmark/benches/lint-with-nested-rule.bench.js +19 -15
- package/lib/benchmark/benches/lint-with-no-rules.bench.d.ts +1 -2
- package/lib/benchmark/benches/lint-with-no-rules.bench.js +19 -15
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.d.ts +1 -2
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.js +19 -15
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.d.ts +1 -2
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.js +19 -15
- package/lib/benchmark/benches/recommended-oas3.bench.d.ts +1 -2
- package/lib/benchmark/benches/recommended-oas3.bench.js +18 -15
- package/lib/benchmark/benches/resolve-with-no-external.bench.d.ts +1 -2
- package/lib/benchmark/benches/resolve-with-no-external.bench.js +17 -14
- package/lib/benchmark/utils.d.ts +4 -5
- package/lib/benchmark/utils.js +14 -11
- package/lib/bundle.d.ts +9 -8
- package/lib/bundle.js +84 -72
- package/lib/config/all.d.ts +1 -2
- package/lib/config/all.js +3 -2
- package/lib/config/builtIn.d.ts +1 -2
- package/lib/config/builtIn.js +49 -44
- package/lib/config/config-resolvers.d.ts +5 -6
- package/lib/config/config-resolvers.js +94 -85
- package/lib/config/config.d.ts +8 -6
- package/lib/config/config.js +73 -66
- package/lib/config/index.d.ts +7 -8
- package/lib/config/index.js +23 -8
- package/lib/config/load.d.ts +8 -5
- package/lib/config/load.js +73 -28
- package/lib/config/minimal.d.ts +1 -2
- package/lib/config/minimal.js +3 -2
- package/lib/config/recommended-strict.d.ts +1 -2
- package/lib/config/recommended-strict.js +3 -2
- package/lib/config/recommended.d.ts +1 -2
- package/lib/config/recommended.js +3 -2
- package/lib/config/rules.d.ts +3 -4
- package/lib/config/rules.js +6 -4
- package/lib/config/spec.d.ts +1 -2
- package/lib/config/spec.js +3 -2
- package/lib/config/types.d.ts +13 -6
- package/lib/config/types.js +2 -2
- package/lib/config/utils.d.ts +2 -3
- package/lib/config/utils.js +89 -75
- package/lib/decorators/arazzo/index.d.ts +0 -1
- package/lib/decorators/arazzo/index.js +4 -2
- package/lib/decorators/async2/index.d.ts +0 -1
- package/lib/decorators/async2/index.js +4 -2
- package/lib/decorators/async3/index.d.ts +0 -1
- package/lib/decorators/async3/index.js +4 -2
- package/lib/decorators/common/filters/filter-helper.d.ts +1 -2
- package/lib/decorators/common/filters/filter-helper.js +12 -9
- package/lib/decorators/common/filters/filter-in.d.ts +1 -2
- package/lib/decorators/common/filters/filter-in.js +8 -5
- package/lib/decorators/common/filters/filter-out.d.ts +1 -2
- package/lib/decorators/common/filters/filter-out.js +8 -5
- package/lib/decorators/common/info-description-override.d.ts +1 -2
- package/lib/decorators/common/info-description-override.js +7 -4
- package/lib/decorators/common/info-override.d.ts +1 -2
- package/lib/decorators/common/info-override.js +5 -2
- package/lib/decorators/common/media-type-examples-override.d.ts +1 -2
- package/lib/decorators/common/media-type-examples-override.js +10 -7
- package/lib/decorators/common/operation-description-override.d.ts +1 -2
- package/lib/decorators/common/operation-description-override.js +7 -4
- package/lib/decorators/common/registry-dependencies.d.ts +2 -0
- package/lib/decorators/common/registry-dependencies.js +24 -0
- package/lib/decorators/common/remove-x-internal.d.ts +1 -2
- package/lib/decorators/common/remove-x-internal.js +14 -11
- package/lib/decorators/common/tag-description-override.d.ts +1 -2
- package/lib/decorators/common/tag-description-override.js +7 -4
- package/lib/decorators/oas2/index.d.ts +2 -2
- package/lib/decorators/oas2/index.js +20 -16
- package/lib/decorators/oas2/remove-unused-components.d.ts +1 -2
- package/lib/decorators/oas2/remove-unused-components.js +7 -4
- package/lib/decorators/oas3/index.d.ts +2 -2
- package/lib/decorators/oas3/index.js +22 -18
- package/lib/decorators/oas3/remove-unused-components.d.ts +1 -2
- package/lib/decorators/oas3/remove-unused-components.js +8 -5
- package/lib/decorators/overlay1/index.d.ts +0 -1
- package/lib/decorators/overlay1/index.js +4 -2
- package/lib/env.d.ts +0 -1
- package/lib/env.js +5 -3
- package/lib/format/codeframes.d.ts +1 -2
- package/lib/format/codeframes.js +19 -15
- package/lib/format/format.d.ts +1 -2
- package/lib/format/format.js +62 -57
- package/lib/index.d.ts +26 -29
- package/lib/index.js +98 -24
- package/lib/js-yaml/index.d.ts +0 -1
- package/lib/js-yaml/index.js +11 -7
- package/lib/lint.d.ts +10 -11
- package/lib/lint.js +44 -39
- package/lib/logger.d.ts +1 -2
- package/lib/logger.js +17 -15
- package/lib/oas-types.d.ts +3 -4
- package/lib/oas-types.js +32 -27
- package/lib/output.d.ts +3 -0
- package/lib/output.js +9 -0
- package/lib/redocly/domains.d.ts +14 -0
- package/lib/redocly/domains.js +41 -0
- package/lib/redocly/index.d.ts +30 -0
- package/lib/redocly/index.js +131 -0
- package/lib/redocly/redocly-client-types.d.ts +8 -0
- package/lib/redocly/redocly-client-types.js +2 -0
- package/lib/redocly/registry-api-types.d.ts +29 -0
- package/lib/redocly/registry-api-types.js +2 -0
- package/lib/redocly/registry-api.d.ts +17 -0
- package/lib/redocly/registry-api.js +100 -0
- package/lib/ref-utils.d.ts +2 -3
- package/lib/ref-utils.js +33 -18
- package/lib/resolve.d.ts +2 -3
- package/lib/resolve.js +45 -36
- package/lib/rules/ajv.d.ts +3 -4
- package/lib/rules/ajv.js +10 -7
- package/lib/rules/arazzo/criteria-unique.d.ts +1 -2
- package/lib/rules/arazzo/criteria-unique.js +5 -2
- package/lib/rules/arazzo/index.d.ts +1 -2
- package/lib/rules/arazzo/index.js +35 -33
- package/lib/rules/arazzo/parameters-unique.d.ts +1 -2
- package/lib/rules/arazzo/parameters-unique.js +5 -2
- package/lib/rules/arazzo/requestBody-replacements-unique.d.ts +1 -2
- package/lib/rules/arazzo/requestBody-replacements-unique.js +5 -2
- package/lib/rules/arazzo/sourceDescription-type.d.ts +1 -2
- package/lib/rules/arazzo/sourceDescription-type.js +5 -2
- package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts +1 -2
- package/lib/rules/arazzo/sourceDescriptions-name-unique.js +5 -2
- package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts +1 -2
- package/lib/rules/arazzo/sourceDescriptions-not-empty.js +5 -2
- package/lib/rules/arazzo/step-onFailure-unique.d.ts +1 -2
- package/lib/rules/arazzo/step-onFailure-unique.js +5 -2
- package/lib/rules/arazzo/step-onSuccess-unique.d.ts +1 -2
- package/lib/rules/arazzo/step-onSuccess-unique.js +5 -2
- package/lib/rules/arazzo/stepId-unique.d.ts +1 -2
- package/lib/rules/arazzo/stepId-unique.js +5 -2
- package/lib/rules/arazzo/workflow-dependsOn.d.ts +1 -2
- package/lib/rules/arazzo/workflow-dependsOn.js +5 -2
- package/lib/rules/arazzo/workflowId-unique.d.ts +1 -2
- package/lib/rules/arazzo/workflowId-unique.js +5 -2
- package/lib/rules/async2/channels-kebab-case.d.ts +1 -2
- package/lib/rules/async2/channels-kebab-case.js +5 -2
- package/lib/rules/async2/index.d.ts +1 -2
- package/lib/rules/async2/index.js +24 -22
- package/lib/rules/async2/no-channel-trailing-slash.d.ts +1 -2
- package/lib/rules/async2/no-channel-trailing-slash.js +5 -2
- package/lib/rules/async3/channels-kebab-case.d.ts +1 -2
- package/lib/rules/async3/channels-kebab-case.js +5 -2
- package/lib/rules/async3/index.d.ts +1 -2
- package/lib/rules/async3/index.js +24 -22
- package/lib/rules/async3/no-channel-trailing-slash.d.ts +1 -2
- package/lib/rules/async3/no-channel-trailing-slash.js +6 -3
- package/lib/rules/common/assertions/asserts.d.ts +2 -3
- package/lib/rules/common/assertions/asserts.js +38 -35
- package/lib/rules/common/assertions/index.d.ts +3 -4
- package/lib/rules/common/assertions/index.js +10 -7
- package/lib/rules/common/assertions/utils.d.ts +4 -5
- package/lib/rules/common/assertions/utils.js +29 -21
- package/lib/rules/common/info-contact.d.ts +1 -2
- package/lib/rules/common/info-contact.js +7 -4
- package/lib/rules/common/info-license-strict.d.ts +1 -2
- package/lib/rules/common/info-license-strict.js +10 -7
- package/lib/rules/common/info-license-url.d.ts +1 -2
- package/lib/rules/common/info-license-url.js +7 -4
- package/lib/rules/common/info-license.d.ts +1 -2
- package/lib/rules/common/info-license.js +7 -4
- package/lib/rules/common/no-ambiguous-paths.d.ts +1 -2
- package/lib/rules/common/no-ambiguous-paths.js +5 -2
- package/lib/rules/common/no-enum-type-mismatch.d.ts +1 -2
- package/lib/rules/common/no-enum-type-mismatch.js +9 -6
- package/lib/rules/common/no-http-verbs-in-paths.d.ts +1 -2
- package/lib/rules/common/no-http-verbs-in-paths.js +8 -5
- package/lib/rules/common/no-identical-paths.d.ts +1 -2
- package/lib/rules/common/no-identical-paths.js +5 -2
- package/lib/rules/common/no-invalid-parameter-examples.d.ts +0 -1
- package/lib/rules/common/no-invalid-parameter-examples.js +9 -6
- package/lib/rules/common/no-invalid-schema-examples.d.ts +1 -2
- package/lib/rules/common/no-invalid-schema-examples.js +9 -6
- package/lib/rules/common/no-path-trailing-slash.d.ts +1 -2
- package/lib/rules/common/no-path-trailing-slash.js +5 -2
- package/lib/rules/common/no-required-schema-properties-undefined.d.ts +1 -2
- package/lib/rules/common/no-required-schema-properties-undefined.js +7 -4
- package/lib/rules/common/no-schema-type-mismatch.d.ts +1 -2
- package/lib/rules/common/no-schema-type-mismatch.js +5 -2
- package/lib/rules/common/operation-2xx-response.d.ts +1 -2
- package/lib/rules/common/operation-2xx-response.js +8 -5
- package/lib/rules/common/operation-4xx-response.d.ts +1 -2
- package/lib/rules/common/operation-4xx-response.js +8 -5
- package/lib/rules/common/operation-description.d.ts +1 -2
- package/lib/rules/common/operation-description.js +7 -4
- package/lib/rules/common/operation-operationId-unique.d.ts +1 -2
- package/lib/rules/common/operation-operationId-unique.js +5 -2
- package/lib/rules/common/operation-operationId-url-safe.d.ts +1 -2
- package/lib/rules/common/operation-operationId-url-safe.js +5 -2
- package/lib/rules/common/operation-operationId.d.ts +1 -2
- package/lib/rules/common/operation-operationId.js +7 -4
- package/lib/rules/common/operation-parameters-unique.d.ts +1 -2
- package/lib/rules/common/operation-parameters-unique.js +5 -2
- package/lib/rules/common/operation-singular-tag.d.ts +1 -2
- package/lib/rules/common/operation-singular-tag.js +5 -2
- package/lib/rules/common/operation-summary.d.ts +1 -2
- package/lib/rules/common/operation-summary.js +7 -4
- package/lib/rules/common/operation-tag-defined.d.ts +1 -2
- package/lib/rules/common/operation-tag-defined.js +5 -2
- package/lib/rules/common/parameter-description.d.ts +1 -2
- package/lib/rules/common/parameter-description.js +5 -2
- package/lib/rules/common/path-declaration-must-exist.d.ts +1 -2
- package/lib/rules/common/path-declaration-must-exist.js +5 -2
- package/lib/rules/common/path-excludes-patterns.d.ts +1 -2
- package/lib/rules/common/path-excludes-patterns.js +5 -2
- package/lib/rules/common/path-http-verbs-order.d.ts +1 -2
- package/lib/rules/common/path-http-verbs-order.js +5 -2
- package/lib/rules/common/path-not-include-query.d.ts +1 -2
- package/lib/rules/common/path-not-include-query.js +5 -2
- package/lib/rules/common/path-params-defined.d.ts +1 -2
- package/lib/rules/common/path-params-defined.js +5 -2
- package/lib/rules/common/path-segment-plural.d.ts +1 -2
- package/lib/rules/common/path-segment-plural.js +8 -5
- package/lib/rules/common/paths-kebab-case.d.ts +1 -2
- package/lib/rules/common/paths-kebab-case.js +5 -2
- package/lib/rules/common/required-string-property-missing-min-length.d.ts +1 -2
- package/lib/rules/common/required-string-property-missing-min-length.js +5 -2
- package/lib/rules/common/response-contains-header.d.ts +1 -2
- package/lib/rules/common/response-contains-header.js +8 -5
- package/lib/rules/common/scalar-property-missing-example.d.ts +1 -2
- package/lib/rules/common/scalar-property-missing-example.js +7 -4
- package/lib/rules/common/security-defined.d.ts +1 -2
- package/lib/rules/common/security-defined.js +5 -2
- package/lib/rules/common/spec-strict-refs.d.ts +1 -2
- package/lib/rules/common/spec-strict-refs.js +7 -4
- package/lib/rules/common/struct.d.ts +1 -2
- package/lib/rules/common/struct.js +21 -18
- package/lib/rules/common/tag-description.d.ts +1 -2
- package/lib/rules/common/tag-description.js +7 -4
- package/lib/rules/common/tags-alphabetical.d.ts +1 -2
- package/lib/rules/common/tags-alphabetical.js +5 -2
- package/lib/rules/no-unresolved-refs.d.ts +3 -4
- package/lib/rules/no-unresolved-refs.js +9 -5
- package/lib/rules/oas2/boolean-parameter-prefixes.d.ts +1 -2
- package/lib/rules/oas2/boolean-parameter-prefixes.js +5 -2
- package/lib/rules/oas2/index.d.ts +1 -2
- package/lib/rules/oas2/index.js +97 -95
- package/lib/rules/oas2/request-mime-type.d.ts +1 -2
- package/lib/rules/oas2/request-mime-type.js +8 -5
- package/lib/rules/oas2/response-contains-property.d.ts +1 -2
- package/lib/rules/oas2/response-contains-property.js +8 -5
- package/lib/rules/oas2/response-mime-type.d.ts +1 -2
- package/lib/rules/oas2/response-mime-type.js +8 -5
- package/lib/rules/oas3/array-parameter-serialization.d.ts +1 -2
- package/lib/rules/oas3/array-parameter-serialization.js +7 -4
- package/lib/rules/oas3/boolean-parameter-prefixes.d.ts +1 -2
- package/lib/rules/oas3/boolean-parameter-prefixes.js +5 -2
- package/lib/rules/oas3/component-name-unique.d.ts +1 -2
- package/lib/rules/oas3/component-name-unique.js +5 -2
- package/lib/rules/oas3/index.d.ts +1 -2
- package/lib/rules/oas3/index.js +121 -119
- package/lib/rules/oas3/no-empty-servers.d.ts +1 -2
- package/lib/rules/oas3/no-empty-servers.js +5 -2
- package/lib/rules/oas3/no-example-value-and-externalValue.d.ts +1 -2
- package/lib/rules/oas3/no-example-value-and-externalValue.js +5 -2
- package/lib/rules/oas3/no-invalid-media-type-examples.d.ts +1 -2
- package/lib/rules/oas3/no-invalid-media-type-examples.js +10 -7
- package/lib/rules/oas3/no-server-example.com.d.ts +1 -2
- package/lib/rules/oas3/no-server-example.com.js +5 -2
- package/lib/rules/oas3/no-server-trailing-slash.d.ts +1 -2
- package/lib/rules/oas3/no-server-trailing-slash.js +5 -2
- package/lib/rules/oas3/no-server-variables-empty-enum.d.ts +1 -2
- package/lib/rules/oas3/no-server-variables-empty-enum.js +5 -2
- package/lib/rules/oas3/no-undefined-server-variable.d.ts +1 -2
- package/lib/rules/oas3/no-undefined-server-variable.js +5 -2
- package/lib/rules/oas3/no-unused-components.d.ts +1 -2
- package/lib/rules/oas3/no-unused-components.js +5 -2
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts +1 -2
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js +9 -6
- package/lib/rules/oas3/request-mime-type.d.ts +1 -2
- package/lib/rules/oas3/request-mime-type.js +9 -6
- package/lib/rules/oas3/response-contains-property.d.ts +1 -2
- package/lib/rules/oas3/response-contains-property.js +8 -5
- package/lib/rules/oas3/response-mime-type.d.ts +1 -2
- package/lib/rules/oas3/response-mime-type.js +9 -6
- package/lib/rules/oas3/spec-components-invalid-map-name.d.ts +1 -2
- package/lib/rules/oas3/spec-components-invalid-map-name.js +5 -2
- package/lib/rules/other/stats.d.ts +3 -4
- package/lib/rules/other/stats.js +5 -2
- package/lib/rules/overlay1/index.d.ts +1 -2
- package/lib/rules/overlay1/index.js +11 -9
- package/lib/rules/respect/no-criteria-xpath.d.ts +1 -2
- package/lib/rules/respect/no-criteria-xpath.js +5 -2
- package/lib/rules/respect/respect-supported-versions.d.ts +1 -2
- package/lib/rules/respect/respect-supported-versions.js +10 -7
- package/lib/rules/utils.d.ts +3 -4
- package/lib/rules/utils.js +36 -23
- package/lib/types/arazzo.d.ts +1 -2
- package/lib/types/arazzo.js +23 -21
- package/lib/types/asyncapi2.d.ts +1 -2
- package/lib/types/asyncapi2.js +56 -54
- package/lib/types/asyncapi3.d.ts +1 -2
- package/lib/types/asyncapi3.js +43 -41
- package/lib/types/index.d.ts +0 -1
- package/lib/types/index.js +13 -7
- package/lib/types/json-schema-adapter.d.ts +1 -2
- package/lib/types/json-schema-adapter.js +17 -15
- package/lib/types/oas2.d.ts +2 -3
- package/lib/types/oas2.js +19 -17
- package/lib/types/oas3.d.ts +2 -3
- package/lib/types/oas3.js +41 -39
- package/lib/types/oas3_1.d.ts +2 -3
- package/lib/types/oas3_1.js +20 -18
- package/lib/types/overlay.d.ts +1 -2
- package/lib/types/overlay.js +6 -4
- package/lib/types/redocly-yaml.d.ts +3 -4
- package/lib/types/redocly-yaml.js +48 -31
- package/lib/typings/arazzo.d.ts +0 -1
- package/lib/typings/arazzo.js +5 -3
- package/lib/typings/asyncapi.d.ts +0 -1
- package/lib/typings/asyncapi.js +2 -2
- package/lib/typings/asyncapi3.d.ts +0 -1
- package/lib/typings/asyncapi3.js +2 -2
- package/lib/typings/common.d.ts +0 -1
- package/lib/typings/common.js +2 -2
- package/lib/typings/openapi.d.ts +0 -1
- package/lib/typings/openapi.js +2 -2
- package/lib/typings/overlay.d.ts +0 -1
- package/lib/typings/overlay.js +4 -2
- package/lib/typings/swagger.d.ts +1 -2
- package/lib/typings/swagger.js +2 -2
- package/lib/utils.d.ts +5 -4
- package/lib/utils.js +99 -52
- package/lib/visitors.d.ts +10 -11
- package/lib/visitors.js +6 -4
- package/lib/walk.d.ts +8 -9
- package/lib/walk.js +25 -23
- package/package.json +9 -30
- package/lib/benchmark/benches/lint-with-many-rules.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/lint-with-many-rules.bench.js.map +0 -1
- package/lib/benchmark/benches/lint-with-nested-rule.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/lint-with-nested-rule.bench.js.map +0 -1
- package/lib/benchmark/benches/lint-with-no-rules.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/lint-with-no-rules.bench.js.map +0 -1
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.js.map +0 -1
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/lint-with-top-level-rule.bench.js.map +0 -1
- package/lib/benchmark/benches/recommended-oas3.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/recommended-oas3.bench.js.map +0 -1
- package/lib/benchmark/benches/resolve-with-no-external.bench.d.ts.map +0 -1
- package/lib/benchmark/benches/resolve-with-no-external.bench.js.map +0 -1
- package/lib/benchmark/utils.d.ts.map +0 -1
- package/lib/benchmark/utils.js.map +0 -1
- package/lib/bundle.d.ts.map +0 -1
- package/lib/bundle.js.map +0 -1
- package/lib/config/all.d.ts.map +0 -1
- package/lib/config/all.js.map +0 -1
- package/lib/config/builtIn.d.ts.map +0 -1
- package/lib/config/builtIn.js.map +0 -1
- package/lib/config/config-resolvers.d.ts.map +0 -1
- package/lib/config/config-resolvers.js.map +0 -1
- package/lib/config/config.d.ts.map +0 -1
- package/lib/config/config.js.map +0 -1
- package/lib/config/index.d.ts.map +0 -1
- package/lib/config/index.js.map +0 -1
- package/lib/config/load.d.ts.map +0 -1
- package/lib/config/load.js.map +0 -1
- package/lib/config/minimal.d.ts.map +0 -1
- package/lib/config/minimal.js.map +0 -1
- package/lib/config/recommended-strict.d.ts.map +0 -1
- package/lib/config/recommended-strict.js.map +0 -1
- package/lib/config/recommended.d.ts.map +0 -1
- package/lib/config/recommended.js.map +0 -1
- package/lib/config/rules.d.ts.map +0 -1
- package/lib/config/rules.js.map +0 -1
- package/lib/config/spec.d.ts.map +0 -1
- package/lib/config/spec.js.map +0 -1
- package/lib/config/types.d.ts.map +0 -1
- package/lib/config/types.js.map +0 -1
- package/lib/config/utils.d.ts.map +0 -1
- package/lib/config/utils.js.map +0 -1
- package/lib/decorators/arazzo/index.d.ts.map +0 -1
- package/lib/decorators/arazzo/index.js.map +0 -1
- package/lib/decorators/async2/index.d.ts.map +0 -1
- package/lib/decorators/async2/index.js.map +0 -1
- package/lib/decorators/async3/index.d.ts.map +0 -1
- package/lib/decorators/async3/index.js.map +0 -1
- package/lib/decorators/common/filters/filter-helper.d.ts.map +0 -1
- package/lib/decorators/common/filters/filter-helper.js.map +0 -1
- package/lib/decorators/common/filters/filter-in.d.ts.map +0 -1
- package/lib/decorators/common/filters/filter-in.js.map +0 -1
- package/lib/decorators/common/filters/filter-out.d.ts.map +0 -1
- package/lib/decorators/common/filters/filter-out.js.map +0 -1
- package/lib/decorators/common/info-description-override.d.ts.map +0 -1
- package/lib/decorators/common/info-description-override.js.map +0 -1
- package/lib/decorators/common/info-override.d.ts.map +0 -1
- package/lib/decorators/common/info-override.js.map +0 -1
- package/lib/decorators/common/media-type-examples-override.d.ts.map +0 -1
- package/lib/decorators/common/media-type-examples-override.js.map +0 -1
- package/lib/decorators/common/operation-description-override.d.ts.map +0 -1
- package/lib/decorators/common/operation-description-override.js.map +0 -1
- package/lib/decorators/common/remove-x-internal.d.ts.map +0 -1
- package/lib/decorators/common/remove-x-internal.js.map +0 -1
- package/lib/decorators/common/tag-description-override.d.ts.map +0 -1
- package/lib/decorators/common/tag-description-override.js.map +0 -1
- package/lib/decorators/oas2/index.d.ts.map +0 -1
- package/lib/decorators/oas2/index.js.map +0 -1
- package/lib/decorators/oas2/remove-unused-components.d.ts.map +0 -1
- package/lib/decorators/oas2/remove-unused-components.js.map +0 -1
- package/lib/decorators/oas3/index.d.ts.map +0 -1
- package/lib/decorators/oas3/index.js.map +0 -1
- package/lib/decorators/oas3/remove-unused-components.d.ts.map +0 -1
- package/lib/decorators/oas3/remove-unused-components.js.map +0 -1
- package/lib/decorators/overlay1/index.d.ts.map +0 -1
- package/lib/decorators/overlay1/index.js.map +0 -1
- package/lib/env.d.ts.map +0 -1
- package/lib/env.js.map +0 -1
- package/lib/format/codeframes.d.ts.map +0 -1
- package/lib/format/codeframes.js.map +0 -1
- package/lib/format/format.d.ts.map +0 -1
- package/lib/format/format.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/js-yaml/index.d.ts.map +0 -1
- package/lib/js-yaml/index.js.map +0 -1
- package/lib/lint.d.ts.map +0 -1
- package/lib/lint.js.map +0 -1
- package/lib/logger.d.ts.map +0 -1
- package/lib/logger.js.map +0 -1
- package/lib/oas-types.d.ts.map +0 -1
- package/lib/oas-types.js.map +0 -1
- package/lib/ref-utils.d.ts.map +0 -1
- package/lib/ref-utils.js.map +0 -1
- package/lib/resolve.d.ts.map +0 -1
- package/lib/resolve.js.map +0 -1
- package/lib/rules/ajv.d.ts.map +0 -1
- package/lib/rules/ajv.js.map +0 -1
- package/lib/rules/arazzo/criteria-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/criteria-unique.js.map +0 -1
- package/lib/rules/arazzo/index.d.ts.map +0 -1
- package/lib/rules/arazzo/index.js.map +0 -1
- package/lib/rules/arazzo/parameters-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/parameters-unique.js.map +0 -1
- package/lib/rules/arazzo/requestBody-replacements-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/requestBody-replacements-unique.js.map +0 -1
- package/lib/rules/arazzo/sourceDescription-type.d.ts.map +0 -1
- package/lib/rules/arazzo/sourceDescription-type.js.map +0 -1
- package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/sourceDescriptions-name-unique.js.map +0 -1
- package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts.map +0 -1
- package/lib/rules/arazzo/sourceDescriptions-not-empty.js.map +0 -1
- package/lib/rules/arazzo/step-onFailure-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/step-onFailure-unique.js.map +0 -1
- package/lib/rules/arazzo/step-onSuccess-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/step-onSuccess-unique.js.map +0 -1
- package/lib/rules/arazzo/stepId-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/stepId-unique.js.map +0 -1
- package/lib/rules/arazzo/workflow-dependsOn.d.ts.map +0 -1
- package/lib/rules/arazzo/workflow-dependsOn.js.map +0 -1
- package/lib/rules/arazzo/workflowId-unique.d.ts.map +0 -1
- package/lib/rules/arazzo/workflowId-unique.js.map +0 -1
- package/lib/rules/async2/channels-kebab-case.d.ts.map +0 -1
- package/lib/rules/async2/channels-kebab-case.js.map +0 -1
- package/lib/rules/async2/index.d.ts.map +0 -1
- package/lib/rules/async2/index.js.map +0 -1
- package/lib/rules/async2/no-channel-trailing-slash.d.ts.map +0 -1
- package/lib/rules/async2/no-channel-trailing-slash.js.map +0 -1
- package/lib/rules/async3/channels-kebab-case.d.ts.map +0 -1
- package/lib/rules/async3/channels-kebab-case.js.map +0 -1
- package/lib/rules/async3/index.d.ts.map +0 -1
- package/lib/rules/async3/index.js.map +0 -1
- package/lib/rules/async3/no-channel-trailing-slash.d.ts.map +0 -1
- package/lib/rules/async3/no-channel-trailing-slash.js.map +0 -1
- package/lib/rules/common/assertions/asserts.d.ts.map +0 -1
- package/lib/rules/common/assertions/asserts.js.map +0 -1
- package/lib/rules/common/assertions/index.d.ts.map +0 -1
- package/lib/rules/common/assertions/index.js.map +0 -1
- package/lib/rules/common/assertions/utils.d.ts.map +0 -1
- package/lib/rules/common/assertions/utils.js.map +0 -1
- package/lib/rules/common/info-contact.d.ts.map +0 -1
- package/lib/rules/common/info-contact.js.map +0 -1
- package/lib/rules/common/info-license-strict.d.ts.map +0 -1
- package/lib/rules/common/info-license-strict.js.map +0 -1
- package/lib/rules/common/info-license-url.d.ts.map +0 -1
- package/lib/rules/common/info-license-url.js.map +0 -1
- package/lib/rules/common/info-license.d.ts.map +0 -1
- package/lib/rules/common/info-license.js.map +0 -1
- package/lib/rules/common/no-ambiguous-paths.d.ts.map +0 -1
- package/lib/rules/common/no-ambiguous-paths.js.map +0 -1
- package/lib/rules/common/no-enum-type-mismatch.d.ts.map +0 -1
- package/lib/rules/common/no-enum-type-mismatch.js.map +0 -1
- package/lib/rules/common/no-http-verbs-in-paths.d.ts.map +0 -1
- package/lib/rules/common/no-http-verbs-in-paths.js.map +0 -1
- package/lib/rules/common/no-identical-paths.d.ts.map +0 -1
- package/lib/rules/common/no-identical-paths.js.map +0 -1
- package/lib/rules/common/no-invalid-parameter-examples.d.ts.map +0 -1
- package/lib/rules/common/no-invalid-parameter-examples.js.map +0 -1
- package/lib/rules/common/no-invalid-schema-examples.d.ts.map +0 -1
- package/lib/rules/common/no-invalid-schema-examples.js.map +0 -1
- package/lib/rules/common/no-path-trailing-slash.d.ts.map +0 -1
- package/lib/rules/common/no-path-trailing-slash.js.map +0 -1
- package/lib/rules/common/no-required-schema-properties-undefined.d.ts.map +0 -1
- package/lib/rules/common/no-required-schema-properties-undefined.js.map +0 -1
- package/lib/rules/common/no-schema-type-mismatch.d.ts.map +0 -1
- package/lib/rules/common/no-schema-type-mismatch.js.map +0 -1
- package/lib/rules/common/operation-2xx-response.d.ts.map +0 -1
- package/lib/rules/common/operation-2xx-response.js.map +0 -1
- package/lib/rules/common/operation-4xx-response.d.ts.map +0 -1
- package/lib/rules/common/operation-4xx-response.js.map +0 -1
- package/lib/rules/common/operation-description.d.ts.map +0 -1
- package/lib/rules/common/operation-description.js.map +0 -1
- package/lib/rules/common/operation-operationId-unique.d.ts.map +0 -1
- package/lib/rules/common/operation-operationId-unique.js.map +0 -1
- package/lib/rules/common/operation-operationId-url-safe.d.ts.map +0 -1
- package/lib/rules/common/operation-operationId-url-safe.js.map +0 -1
- package/lib/rules/common/operation-operationId.d.ts.map +0 -1
- package/lib/rules/common/operation-operationId.js.map +0 -1
- package/lib/rules/common/operation-parameters-unique.d.ts.map +0 -1
- package/lib/rules/common/operation-parameters-unique.js.map +0 -1
- package/lib/rules/common/operation-singular-tag.d.ts.map +0 -1
- package/lib/rules/common/operation-singular-tag.js.map +0 -1
- package/lib/rules/common/operation-summary.d.ts.map +0 -1
- package/lib/rules/common/operation-summary.js.map +0 -1
- package/lib/rules/common/operation-tag-defined.d.ts.map +0 -1
- package/lib/rules/common/operation-tag-defined.js.map +0 -1
- package/lib/rules/common/parameter-description.d.ts.map +0 -1
- package/lib/rules/common/parameter-description.js.map +0 -1
- package/lib/rules/common/path-declaration-must-exist.d.ts.map +0 -1
- package/lib/rules/common/path-declaration-must-exist.js.map +0 -1
- package/lib/rules/common/path-excludes-patterns.d.ts.map +0 -1
- package/lib/rules/common/path-excludes-patterns.js.map +0 -1
- package/lib/rules/common/path-http-verbs-order.d.ts.map +0 -1
- package/lib/rules/common/path-http-verbs-order.js.map +0 -1
- package/lib/rules/common/path-not-include-query.d.ts.map +0 -1
- package/lib/rules/common/path-not-include-query.js.map +0 -1
- package/lib/rules/common/path-params-defined.d.ts.map +0 -1
- package/lib/rules/common/path-params-defined.js.map +0 -1
- package/lib/rules/common/path-segment-plural.d.ts.map +0 -1
- package/lib/rules/common/path-segment-plural.js.map +0 -1
- package/lib/rules/common/paths-kebab-case.d.ts.map +0 -1
- package/lib/rules/common/paths-kebab-case.js.map +0 -1
- package/lib/rules/common/required-string-property-missing-min-length.d.ts.map +0 -1
- package/lib/rules/common/required-string-property-missing-min-length.js.map +0 -1
- package/lib/rules/common/response-contains-header.d.ts.map +0 -1
- package/lib/rules/common/response-contains-header.js.map +0 -1
- package/lib/rules/common/scalar-property-missing-example.d.ts.map +0 -1
- package/lib/rules/common/scalar-property-missing-example.js.map +0 -1
- package/lib/rules/common/security-defined.d.ts.map +0 -1
- package/lib/rules/common/security-defined.js.map +0 -1
- package/lib/rules/common/spec-strict-refs.d.ts.map +0 -1
- package/lib/rules/common/spec-strict-refs.js.map +0 -1
- package/lib/rules/common/struct.d.ts.map +0 -1
- package/lib/rules/common/struct.js.map +0 -1
- package/lib/rules/common/tag-description.d.ts.map +0 -1
- package/lib/rules/common/tag-description.js.map +0 -1
- package/lib/rules/common/tags-alphabetical.d.ts.map +0 -1
- package/lib/rules/common/tags-alphabetical.js.map +0 -1
- package/lib/rules/no-unresolved-refs.d.ts.map +0 -1
- package/lib/rules/no-unresolved-refs.js.map +0 -1
- package/lib/rules/oas2/boolean-parameter-prefixes.d.ts.map +0 -1
- package/lib/rules/oas2/boolean-parameter-prefixes.js.map +0 -1
- package/lib/rules/oas2/index.d.ts.map +0 -1
- package/lib/rules/oas2/index.js.map +0 -1
- package/lib/rules/oas2/request-mime-type.d.ts.map +0 -1
- package/lib/rules/oas2/request-mime-type.js.map +0 -1
- package/lib/rules/oas2/response-contains-property.d.ts.map +0 -1
- package/lib/rules/oas2/response-contains-property.js.map +0 -1
- package/lib/rules/oas2/response-mime-type.d.ts.map +0 -1
- package/lib/rules/oas2/response-mime-type.js.map +0 -1
- package/lib/rules/oas3/array-parameter-serialization.d.ts.map +0 -1
- package/lib/rules/oas3/array-parameter-serialization.js.map +0 -1
- package/lib/rules/oas3/boolean-parameter-prefixes.d.ts.map +0 -1
- package/lib/rules/oas3/boolean-parameter-prefixes.js.map +0 -1
- package/lib/rules/oas3/component-name-unique.d.ts.map +0 -1
- package/lib/rules/oas3/component-name-unique.js.map +0 -1
- package/lib/rules/oas3/index.d.ts.map +0 -1
- package/lib/rules/oas3/index.js.map +0 -1
- package/lib/rules/oas3/no-empty-servers.d.ts.map +0 -1
- package/lib/rules/oas3/no-empty-servers.js.map +0 -1
- package/lib/rules/oas3/no-example-value-and-externalValue.d.ts.map +0 -1
- package/lib/rules/oas3/no-example-value-and-externalValue.js.map +0 -1
- package/lib/rules/oas3/no-invalid-media-type-examples.d.ts.map +0 -1
- package/lib/rules/oas3/no-invalid-media-type-examples.js.map +0 -1
- package/lib/rules/oas3/no-server-example.com.d.ts.map +0 -1
- package/lib/rules/oas3/no-server-example.com.js.map +0 -1
- package/lib/rules/oas3/no-server-trailing-slash.d.ts.map +0 -1
- package/lib/rules/oas3/no-server-trailing-slash.js.map +0 -1
- package/lib/rules/oas3/no-server-variables-empty-enum.d.ts.map +0 -1
- package/lib/rules/oas3/no-server-variables-empty-enum.js.map +0 -1
- package/lib/rules/oas3/no-undefined-server-variable.d.ts.map +0 -1
- package/lib/rules/oas3/no-undefined-server-variable.js.map +0 -1
- package/lib/rules/oas3/no-unused-components.d.ts.map +0 -1
- package/lib/rules/oas3/no-unused-components.js.map +0 -1
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts.map +0 -1
- package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js.map +0 -1
- package/lib/rules/oas3/request-mime-type.d.ts.map +0 -1
- package/lib/rules/oas3/request-mime-type.js.map +0 -1
- package/lib/rules/oas3/response-contains-property.d.ts.map +0 -1
- package/lib/rules/oas3/response-contains-property.js.map +0 -1
- package/lib/rules/oas3/response-mime-type.d.ts.map +0 -1
- package/lib/rules/oas3/response-mime-type.js.map +0 -1
- package/lib/rules/oas3/spec-components-invalid-map-name.d.ts.map +0 -1
- package/lib/rules/oas3/spec-components-invalid-map-name.js.map +0 -1
- package/lib/rules/other/stats.d.ts.map +0 -1
- package/lib/rules/other/stats.js.map +0 -1
- package/lib/rules/overlay1/index.d.ts.map +0 -1
- package/lib/rules/overlay1/index.js.map +0 -1
- package/lib/rules/respect/no-criteria-xpath.d.ts.map +0 -1
- package/lib/rules/respect/no-criteria-xpath.js.map +0 -1
- package/lib/rules/respect/respect-supported-versions.d.ts.map +0 -1
- package/lib/rules/respect/respect-supported-versions.js.map +0 -1
- package/lib/rules/utils.d.ts.map +0 -1
- package/lib/rules/utils.js.map +0 -1
- package/lib/types/arazzo.d.ts.map +0 -1
- package/lib/types/arazzo.js.map +0 -1
- package/lib/types/asyncapi2.d.ts.map +0 -1
- package/lib/types/asyncapi2.js.map +0 -1
- package/lib/types/asyncapi3.d.ts.map +0 -1
- package/lib/types/asyncapi3.js.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/index.js.map +0 -1
- package/lib/types/json-schema-adapter.d.ts.map +0 -1
- package/lib/types/json-schema-adapter.js.map +0 -1
- package/lib/types/oas2.d.ts.map +0 -1
- package/lib/types/oas2.js.map +0 -1
- package/lib/types/oas3.d.ts.map +0 -1
- package/lib/types/oas3.js.map +0 -1
- package/lib/types/oas3_1.d.ts.map +0 -1
- package/lib/types/oas3_1.js.map +0 -1
- package/lib/types/overlay.d.ts.map +0 -1
- package/lib/types/overlay.js.map +0 -1
- package/lib/types/redocly-yaml.d.ts.map +0 -1
- package/lib/types/redocly-yaml.js.map +0 -1
- package/lib/typings/arazzo.d.ts.map +0 -1
- package/lib/typings/arazzo.js.map +0 -1
- package/lib/typings/asyncapi.d.ts.map +0 -1
- package/lib/typings/asyncapi.js.map +0 -1
- package/lib/typings/asyncapi3.d.ts.map +0 -1
- package/lib/typings/asyncapi3.js.map +0 -1
- package/lib/typings/common.d.ts.map +0 -1
- package/lib/typings/common.js.map +0 -1
- package/lib/typings/openapi.d.ts.map +0 -1
- package/lib/typings/openapi.js.map +0 -1
- package/lib/typings/overlay.d.ts.map +0 -1
- package/lib/typings/overlay.js.map +0 -1
- package/lib/typings/swagger.d.ts.map +0 -1
- package/lib/typings/swagger.js.map +0 -1
- package/lib/utils/error.d.ts +0 -3
- package/lib/utils/error.d.ts.map +0 -1
- package/lib/utils/error.js +0 -3
- package/lib/utils/error.js.map +0 -1
- package/lib/utils.d.ts.map +0 -1
- package/lib/utils.js.map +0 -1
- package/lib/visitors.d.ts.map +0 -1
- package/lib/visitors.js.map +0 -1
- package/lib/walk.d.ts.map +0 -1
- package/lib/walk.js.map +0 -1
package/lib/types/asyncapi2.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AsyncApi2Types = exports.AsyncApi2Bindings = exports.Dependencies = exports.SecuritySchemeFlows = exports.Discriminator = exports.DiscriminatorMapping = exports.SchemaProperties = exports.Schema = exports.MessageExample = exports.CorrelationId = exports.License = exports.Contact = exports.ServerVariable = exports.ServerMap = exports.ExternalDocs = exports.Tag = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const ref_utils_1 = require("../ref-utils");
|
|
3
6
|
const Root = {
|
|
4
7
|
properties: {
|
|
5
8
|
asyncapi: null, // TODO: validate semver format and supported version
|
|
@@ -56,7 +59,7 @@ const ChannelBindings = {
|
|
|
56
59
|
},
|
|
57
60
|
additionalProperties: { type: 'object' },
|
|
58
61
|
};
|
|
59
|
-
|
|
62
|
+
exports.Tag = {
|
|
60
63
|
properties: {
|
|
61
64
|
name: { type: 'string' },
|
|
62
65
|
description: { type: 'string' },
|
|
@@ -64,7 +67,7 @@ export const Tag = {
|
|
|
64
67
|
},
|
|
65
68
|
required: ['name'],
|
|
66
69
|
};
|
|
67
|
-
|
|
70
|
+
exports.ExternalDocs = {
|
|
68
71
|
properties: {
|
|
69
72
|
description: { type: 'string' },
|
|
70
73
|
url: { type: 'string' },
|
|
@@ -116,13 +119,13 @@ const Server = {
|
|
|
116
119
|
},
|
|
117
120
|
required: ['url', 'protocol'],
|
|
118
121
|
};
|
|
119
|
-
|
|
122
|
+
exports.ServerMap = {
|
|
120
123
|
properties: {},
|
|
121
124
|
additionalProperties: (_value, key) =>
|
|
122
125
|
// eslint-disable-next-line no-useless-escape
|
|
123
126
|
key.match(/^[A-Za-z0-9_\-]+$/) ? 'Server' : undefined,
|
|
124
127
|
};
|
|
125
|
-
|
|
128
|
+
exports.ServerVariable = {
|
|
126
129
|
properties: {
|
|
127
130
|
enum: {
|
|
128
131
|
type: 'array',
|
|
@@ -148,14 +151,14 @@ const Info = {
|
|
|
148
151
|
},
|
|
149
152
|
required: ['title', 'version'],
|
|
150
153
|
};
|
|
151
|
-
|
|
154
|
+
exports.Contact = {
|
|
152
155
|
properties: {
|
|
153
156
|
name: { type: 'string' },
|
|
154
157
|
url: { type: 'string' },
|
|
155
158
|
email: { type: 'string' },
|
|
156
159
|
},
|
|
157
160
|
};
|
|
158
|
-
|
|
161
|
+
exports.License = {
|
|
159
162
|
properties: {
|
|
160
163
|
name: { type: 'string' },
|
|
161
164
|
url: { type: 'string' },
|
|
@@ -169,7 +172,7 @@ const Parameter = {
|
|
|
169
172
|
location: { type: 'string' },
|
|
170
173
|
},
|
|
171
174
|
};
|
|
172
|
-
|
|
175
|
+
exports.CorrelationId = {
|
|
173
176
|
properties: {
|
|
174
177
|
description: { type: 'string' },
|
|
175
178
|
location: { type: 'string' },
|
|
@@ -296,7 +299,7 @@ const Operation = {
|
|
|
296
299
|
},
|
|
297
300
|
required: [],
|
|
298
301
|
};
|
|
299
|
-
|
|
302
|
+
exports.MessageExample = {
|
|
300
303
|
properties: {
|
|
301
304
|
payload: { isExample: true },
|
|
302
305
|
summary: { type: 'string' },
|
|
@@ -304,7 +307,7 @@ export const MessageExample = {
|
|
|
304
307
|
headers: { type: 'object' },
|
|
305
308
|
},
|
|
306
309
|
};
|
|
307
|
-
|
|
310
|
+
exports.Schema = {
|
|
308
311
|
properties: {
|
|
309
312
|
$id: { type: 'string' },
|
|
310
313
|
$schema: { type: 'string' },
|
|
@@ -338,9 +341,9 @@ export const Schema = {
|
|
|
338
341
|
enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'],
|
|
339
342
|
};
|
|
340
343
|
},
|
|
341
|
-
allOf: listOf('Schema'),
|
|
342
|
-
anyOf: listOf('Schema'),
|
|
343
|
-
oneOf: listOf('Schema'),
|
|
344
|
+
allOf: (0, _1.listOf)('Schema'),
|
|
345
|
+
anyOf: (0, _1.listOf)('Schema'),
|
|
346
|
+
oneOf: (0, _1.listOf)('Schema'),
|
|
344
347
|
not: 'Schema',
|
|
345
348
|
if: 'Schema',
|
|
346
349
|
then: 'Schema',
|
|
@@ -350,7 +353,7 @@ export const Schema = {
|
|
|
350
353
|
propertyNames: 'Schema',
|
|
351
354
|
properties: 'SchemaProperties',
|
|
352
355
|
items: (value) => {
|
|
353
|
-
return Array.isArray(value) ? listOf('Schema') : 'Schema';
|
|
356
|
+
return Array.isArray(value) ? (0, _1.listOf)('Schema') : 'Schema';
|
|
354
357
|
},
|
|
355
358
|
additionalProperties: (value) => {
|
|
356
359
|
return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema';
|
|
@@ -373,16 +376,16 @@ export const Schema = {
|
|
|
373
376
|
dependencies: 'Dependencies',
|
|
374
377
|
},
|
|
375
378
|
};
|
|
376
|
-
|
|
379
|
+
exports.SchemaProperties = {
|
|
377
380
|
properties: {},
|
|
378
381
|
additionalProperties: (value) => {
|
|
379
382
|
return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema';
|
|
380
383
|
},
|
|
381
384
|
};
|
|
382
|
-
|
|
385
|
+
exports.DiscriminatorMapping = {
|
|
383
386
|
properties: {},
|
|
384
387
|
additionalProperties: (value) => {
|
|
385
|
-
if (isMappingRef(value)) {
|
|
388
|
+
if ((0, ref_utils_1.isMappingRef)(value)) {
|
|
386
389
|
return { type: 'string', directResolveAs: 'Schema' };
|
|
387
390
|
}
|
|
388
391
|
else {
|
|
@@ -390,7 +393,7 @@ export const DiscriminatorMapping = {
|
|
|
390
393
|
}
|
|
391
394
|
},
|
|
392
395
|
};
|
|
393
|
-
|
|
396
|
+
exports.Discriminator = {
|
|
394
397
|
properties: {
|
|
395
398
|
propertyName: { type: 'string' },
|
|
396
399
|
mapping: 'DiscriminatorMapping',
|
|
@@ -448,7 +451,7 @@ const AuthorizationCode = {
|
|
|
448
451
|
},
|
|
449
452
|
required: ['authorizationUrl', 'tokenUrl', 'scopes'],
|
|
450
453
|
};
|
|
451
|
-
|
|
454
|
+
exports.SecuritySchemeFlows = {
|
|
452
455
|
properties: {
|
|
453
456
|
implicit: 'ImplicitFlow',
|
|
454
457
|
password: 'PasswordFlow',
|
|
@@ -517,7 +520,7 @@ const SecurityScheme = {
|
|
|
517
520
|
},
|
|
518
521
|
extensionsPrefix: 'x-',
|
|
519
522
|
};
|
|
520
|
-
|
|
523
|
+
exports.Dependencies = {
|
|
521
524
|
properties: {},
|
|
522
525
|
additionalProperties: (value) => {
|
|
523
526
|
return Array.isArray(value) ? { type: 'array', items: { type: 'string' } } : 'Schema';
|
|
@@ -828,7 +831,7 @@ const SolaceDestination = {
|
|
|
828
831
|
const SolaceOperationBinding = {
|
|
829
832
|
properties: {
|
|
830
833
|
bindingVersion: { type: 'string' },
|
|
831
|
-
destinations: listOf('SolaceDestination'),
|
|
834
|
+
destinations: (0, _1.listOf)('SolaceDestination'),
|
|
832
835
|
},
|
|
833
836
|
};
|
|
834
837
|
OperationBindings.properties.solace = SolaceOperationBinding;
|
|
@@ -888,7 +891,7 @@ OperationBindings.properties.mercure = MercureOperationBinding;
|
|
|
888
891
|
// googlepubsub
|
|
889
892
|
// pulsar
|
|
890
893
|
// --- End per-protocol node types
|
|
891
|
-
|
|
894
|
+
exports.AsyncApi2Bindings = {
|
|
892
895
|
HttpServerBinding,
|
|
893
896
|
HttpChannelBinding,
|
|
894
897
|
HttpMessageBinding,
|
|
@@ -953,54 +956,53 @@ export const AsyncApi2Bindings = {
|
|
|
953
956
|
MessageBindings,
|
|
954
957
|
OperationBindings,
|
|
955
958
|
};
|
|
956
|
-
|
|
957
|
-
...AsyncApi2Bindings,
|
|
959
|
+
exports.AsyncApi2Types = {
|
|
960
|
+
...exports.AsyncApi2Bindings,
|
|
958
961
|
Root,
|
|
959
|
-
Tag,
|
|
960
|
-
TagList: listOf('Tag'),
|
|
961
|
-
ServerMap,
|
|
962
|
-
ExternalDocs,
|
|
962
|
+
Tag: exports.Tag,
|
|
963
|
+
TagList: (0, _1.listOf)('Tag'),
|
|
964
|
+
ServerMap: exports.ServerMap,
|
|
965
|
+
ExternalDocs: exports.ExternalDocs,
|
|
963
966
|
Server,
|
|
964
|
-
ServerVariable,
|
|
965
|
-
ServerVariablesMap: mapOf('ServerVariable'),
|
|
967
|
+
ServerVariable: exports.ServerVariable,
|
|
968
|
+
ServerVariablesMap: (0, _1.mapOf)('ServerVariable'),
|
|
966
969
|
SecurityRequirement,
|
|
967
|
-
SecurityRequirementList: listOf('SecurityRequirement'),
|
|
970
|
+
SecurityRequirementList: (0, _1.listOf)('SecurityRequirement'),
|
|
968
971
|
Info,
|
|
969
|
-
Contact,
|
|
970
|
-
License,
|
|
972
|
+
Contact: exports.Contact,
|
|
973
|
+
License: exports.License,
|
|
971
974
|
ChannelMap,
|
|
972
975
|
Channel,
|
|
973
976
|
Parameter,
|
|
974
|
-
ParametersMap: mapOf('Parameter'),
|
|
977
|
+
ParametersMap: (0, _1.mapOf)('Parameter'),
|
|
975
978
|
Operation,
|
|
976
|
-
Schema,
|
|
977
|
-
MessageExample,
|
|
978
|
-
SchemaProperties,
|
|
979
|
-
DiscriminatorMapping,
|
|
980
|
-
Discriminator,
|
|
979
|
+
Schema: exports.Schema,
|
|
980
|
+
MessageExample: exports.MessageExample,
|
|
981
|
+
SchemaProperties: exports.SchemaProperties,
|
|
982
|
+
DiscriminatorMapping: exports.DiscriminatorMapping,
|
|
983
|
+
Discriminator: exports.Discriminator,
|
|
981
984
|
Components,
|
|
982
|
-
NamedSchemas: mapOf('Schema'),
|
|
983
|
-
NamedMessages: mapOf('Message'),
|
|
984
|
-
NamedMessageTraits: mapOf('MessageTrait'),
|
|
985
|
-
NamedOperationTraits: mapOf('OperationTrait'),
|
|
986
|
-
NamedParameters: mapOf('Parameter'),
|
|
987
|
-
NamedSecuritySchemes: mapOf('SecurityScheme'),
|
|
988
|
-
NamedCorrelationIds: mapOf('CorrelationId'),
|
|
985
|
+
NamedSchemas: (0, _1.mapOf)('Schema'),
|
|
986
|
+
NamedMessages: (0, _1.mapOf)('Message'),
|
|
987
|
+
NamedMessageTraits: (0, _1.mapOf)('MessageTrait'),
|
|
988
|
+
NamedOperationTraits: (0, _1.mapOf)('OperationTrait'),
|
|
989
|
+
NamedParameters: (0, _1.mapOf)('Parameter'),
|
|
990
|
+
NamedSecuritySchemes: (0, _1.mapOf)('SecurityScheme'),
|
|
991
|
+
NamedCorrelationIds: (0, _1.mapOf)('CorrelationId'),
|
|
989
992
|
ImplicitFlow,
|
|
990
993
|
PasswordFlow,
|
|
991
994
|
ClientCredentials,
|
|
992
995
|
AuthorizationCode,
|
|
993
|
-
SecuritySchemeFlows,
|
|
996
|
+
SecuritySchemeFlows: exports.SecuritySchemeFlows,
|
|
994
997
|
SecurityScheme,
|
|
995
998
|
Message,
|
|
996
999
|
MessageBindings,
|
|
997
1000
|
OperationBindings,
|
|
998
1001
|
OperationTrait,
|
|
999
|
-
OperationTraitList: listOf('OperationTrait'),
|
|
1002
|
+
OperationTraitList: (0, _1.listOf)('OperationTrait'),
|
|
1000
1003
|
MessageTrait,
|
|
1001
|
-
MessageTraitList: listOf('MessageTrait'),
|
|
1002
|
-
MessageExampleList: listOf('MessageExample'),
|
|
1003
|
-
CorrelationId,
|
|
1004
|
-
Dependencies,
|
|
1004
|
+
MessageTraitList: (0, _1.listOf)('MessageTrait'),
|
|
1005
|
+
MessageExampleList: (0, _1.listOf)('MessageExample'),
|
|
1006
|
+
CorrelationId: exports.CorrelationId,
|
|
1007
|
+
Dependencies: exports.Dependencies,
|
|
1005
1008
|
};
|
|
1006
|
-
//# sourceMappingURL=asyncapi2.js.map
|
package/lib/types/asyncapi3.d.ts
CHANGED
package/lib/types/asyncapi3.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AsyncApi3Types = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const asyncapi2_1 = require("./asyncapi2");
|
|
3
6
|
const Root = {
|
|
4
7
|
properties: {
|
|
5
8
|
asyncapi: { type: 'string', enum: ['3.0.0'] },
|
|
@@ -285,23 +288,23 @@ const SecurityScheme = {
|
|
|
285
288
|
},
|
|
286
289
|
extensionsPrefix: 'x-',
|
|
287
290
|
};
|
|
288
|
-
|
|
291
|
+
exports.AsyncApi3Types = {
|
|
289
292
|
// from asyncapi2
|
|
290
|
-
...AsyncApi2Bindings,
|
|
291
|
-
CorrelationId,
|
|
292
|
-
SecuritySchemeFlows,
|
|
293
|
-
ServerVariable,
|
|
294
|
-
Contact,
|
|
295
|
-
License,
|
|
296
|
-
MessageExample,
|
|
297
|
-
Tag,
|
|
298
|
-
Dependencies,
|
|
299
|
-
Schema,
|
|
300
|
-
Discriminator,
|
|
301
|
-
DiscriminatorMapping,
|
|
302
|
-
SchemaProperties,
|
|
303
|
-
ServerMap,
|
|
304
|
-
ExternalDocs,
|
|
293
|
+
...asyncapi2_1.AsyncApi2Bindings,
|
|
294
|
+
CorrelationId: asyncapi2_1.CorrelationId,
|
|
295
|
+
SecuritySchemeFlows: asyncapi2_1.SecuritySchemeFlows,
|
|
296
|
+
ServerVariable: asyncapi2_1.ServerVariable,
|
|
297
|
+
Contact: asyncapi2_1.Contact,
|
|
298
|
+
License: asyncapi2_1.License,
|
|
299
|
+
MessageExample: asyncapi2_1.MessageExample,
|
|
300
|
+
Tag: asyncapi2_1.Tag,
|
|
301
|
+
Dependencies: asyncapi2_1.Dependencies,
|
|
302
|
+
Schema: asyncapi2_1.Schema,
|
|
303
|
+
Discriminator: asyncapi2_1.Discriminator,
|
|
304
|
+
DiscriminatorMapping: asyncapi2_1.DiscriminatorMapping,
|
|
305
|
+
SchemaProperties: asyncapi2_1.SchemaProperties,
|
|
306
|
+
ServerMap: asyncapi2_1.ServerMap,
|
|
307
|
+
ExternalDocs: asyncapi2_1.ExternalDocs,
|
|
305
308
|
Root,
|
|
306
309
|
Channel,
|
|
307
310
|
Parameter,
|
|
@@ -319,27 +322,26 @@ export const AsyncApi3Types = {
|
|
|
319
322
|
SecurityScheme,
|
|
320
323
|
Message,
|
|
321
324
|
OperationTrait,
|
|
322
|
-
ServerVariablesMap: mapOf('ServerVariable'),
|
|
323
|
-
NamedTags: mapOf('Tag'),
|
|
324
|
-
NamedExternalDocs: mapOf('ExternalDocs'),
|
|
325
|
-
NamedChannels: mapOf('Channel'),
|
|
326
|
-
ParametersMap: mapOf('Parameter'),
|
|
327
|
-
NamedOperations: mapOf('Operation'),
|
|
328
|
-
NamedOperationReplies: mapOf('OperationReply'),
|
|
329
|
-
NamedOperationRelyAddresses: mapOf('OperationReplyAddress'),
|
|
330
|
-
NamedSchemas: mapOf('Schema'),
|
|
331
|
-
NamedMessages: mapOf('Message'),
|
|
332
|
-
NamedMessageTraits: mapOf('MessageTrait'),
|
|
333
|
-
NamedOperationTraits: mapOf('OperationTrait'),
|
|
334
|
-
NamedParameters: mapOf('Parameter'),
|
|
335
|
-
NamedSecuritySchemes: mapOf('SecurityScheme'),
|
|
336
|
-
NamedCorrelationIds: mapOf('CorrelationId'),
|
|
337
|
-
ServerList: listOf('Server'),
|
|
338
|
-
SecuritySchemeList: listOf('SecurityScheme'),
|
|
339
|
-
MessageList: listOf('Message'),
|
|
340
|
-
OperationTraitList: listOf('OperationTrait'),
|
|
341
|
-
MessageTraitList: listOf('MessageTrait'),
|
|
342
|
-
MessageExampleList: listOf('MessageExample'),
|
|
343
|
-
TagList: listOf('Tag'),
|
|
325
|
+
ServerVariablesMap: (0, _1.mapOf)('ServerVariable'),
|
|
326
|
+
NamedTags: (0, _1.mapOf)('Tag'),
|
|
327
|
+
NamedExternalDocs: (0, _1.mapOf)('ExternalDocs'),
|
|
328
|
+
NamedChannels: (0, _1.mapOf)('Channel'),
|
|
329
|
+
ParametersMap: (0, _1.mapOf)('Parameter'),
|
|
330
|
+
NamedOperations: (0, _1.mapOf)('Operation'),
|
|
331
|
+
NamedOperationReplies: (0, _1.mapOf)('OperationReply'),
|
|
332
|
+
NamedOperationRelyAddresses: (0, _1.mapOf)('OperationReplyAddress'),
|
|
333
|
+
NamedSchemas: (0, _1.mapOf)('Schema'),
|
|
334
|
+
NamedMessages: (0, _1.mapOf)('Message'),
|
|
335
|
+
NamedMessageTraits: (0, _1.mapOf)('MessageTrait'),
|
|
336
|
+
NamedOperationTraits: (0, _1.mapOf)('OperationTrait'),
|
|
337
|
+
NamedParameters: (0, _1.mapOf)('Parameter'),
|
|
338
|
+
NamedSecuritySchemes: (0, _1.mapOf)('SecurityScheme'),
|
|
339
|
+
NamedCorrelationIds: (0, _1.mapOf)('CorrelationId'),
|
|
340
|
+
ServerList: (0, _1.listOf)('Server'),
|
|
341
|
+
SecuritySchemeList: (0, _1.listOf)('SecurityScheme'),
|
|
342
|
+
MessageList: (0, _1.listOf)('Message'),
|
|
343
|
+
OperationTraitList: (0, _1.listOf)('OperationTrait'),
|
|
344
|
+
MessageTraitList: (0, _1.listOf)('MessageTrait'),
|
|
345
|
+
MessageExampleList: (0, _1.listOf)('MessageExample'),
|
|
346
|
+
TagList: (0, _1.listOf)('Tag'),
|
|
344
347
|
};
|
|
345
|
-
//# sourceMappingURL=asyncapi3.js.map
|
package/lib/types/index.d.ts
CHANGED
package/lib/types/index.js
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpecExtension = void 0;
|
|
4
|
+
exports.listOf = listOf;
|
|
5
|
+
exports.mapOf = mapOf;
|
|
6
|
+
exports.normalizeTypes = normalizeTypes;
|
|
7
|
+
exports.isNamedType = isNamedType;
|
|
8
|
+
function listOf(typeName) {
|
|
2
9
|
return {
|
|
3
10
|
name: `${typeName}List`,
|
|
4
11
|
properties: {},
|
|
5
12
|
items: typeName,
|
|
6
13
|
};
|
|
7
14
|
}
|
|
8
|
-
|
|
15
|
+
function mapOf(typeName) {
|
|
9
16
|
return {
|
|
10
17
|
name: `${typeName}Map`,
|
|
11
18
|
properties: {},
|
|
12
19
|
additionalProperties: () => typeName,
|
|
13
20
|
};
|
|
14
21
|
}
|
|
15
|
-
|
|
22
|
+
exports.SpecExtension = {
|
|
16
23
|
name: 'SpecExtension',
|
|
17
24
|
properties: {},
|
|
18
25
|
// skip validation of additional properties for unknown extensions
|
|
19
26
|
additionalProperties: { resolvable: true },
|
|
20
27
|
};
|
|
21
|
-
|
|
28
|
+
function normalizeTypes(types, options = {}) {
|
|
22
29
|
const normalizedTypes = {};
|
|
23
30
|
for (const typeName of Object.keys(types)) {
|
|
24
31
|
normalizedTypes[typeName] = {
|
|
@@ -30,7 +37,7 @@ export function normalizeTypes(types, options = {}) {
|
|
|
30
37
|
normalizeType(type);
|
|
31
38
|
}
|
|
32
39
|
// all type trees have a SpecExtension type by default
|
|
33
|
-
normalizedTypes['SpecExtension'] = SpecExtension;
|
|
40
|
+
normalizedTypes['SpecExtension'] = exports.SpecExtension;
|
|
34
41
|
return normalizedTypes;
|
|
35
42
|
function normalizeType(type) {
|
|
36
43
|
if (type.additionalProperties) {
|
|
@@ -82,7 +89,6 @@ export function normalizeTypes(types, options = {}) {
|
|
|
82
89
|
}
|
|
83
90
|
}
|
|
84
91
|
}
|
|
85
|
-
|
|
92
|
+
function isNamedType(t) {
|
|
86
93
|
return typeof t?.name === 'string';
|
|
87
94
|
}
|
|
88
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { JSONSchema } from 'json-schema-to-ts';
|
|
2
|
-
import type { NodeType } from '
|
|
2
|
+
import type { NodeType } from '.';
|
|
3
3
|
export declare function getNodeTypesFromJSONSchema(schemaName: string, entrySchema: JSONSchema): Record<string, NodeType>;
|
|
4
|
-
//# sourceMappingURL=json-schema-adapter.d.ts.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// For internal usage only
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getNodeTypesFromJSONSchema = getNodeTypesFromJSONSchema;
|
|
5
|
+
const _2020_1 = require("@redocly/ajv/dist/2020");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
const ajv = new _2020_1.default({
|
|
5
8
|
strictSchema: false,
|
|
6
9
|
allowUnionTypes: true,
|
|
7
10
|
useDefaults: true,
|
|
@@ -56,11 +59,11 @@ function transformJSONSchemaToNodeType(propertyName, schema, ctx) {
|
|
|
56
59
|
if (schema.anyOf) {
|
|
57
60
|
throw new Error(`Unexpected anyOf in ${propertyName}.`);
|
|
58
61
|
}
|
|
59
|
-
if (isPlainObject(schema.properties) ||
|
|
60
|
-
isPlainObject(schema.additionalProperties) ||
|
|
61
|
-
(isPlainObject(schema.items) &&
|
|
62
|
-
(isPlainObject(schema.items.properties) ||
|
|
63
|
-
isPlainObject(schema.items.additionalProperties) ||
|
|
62
|
+
if ((0, utils_1.isPlainObject)(schema.properties) ||
|
|
63
|
+
(0, utils_1.isPlainObject)(schema.additionalProperties) ||
|
|
64
|
+
((0, utils_1.isPlainObject)(schema.items) &&
|
|
65
|
+
((0, utils_1.isPlainObject)(schema.items.properties) ||
|
|
66
|
+
(0, utils_1.isPlainObject)(schema.items.additionalProperties) ||
|
|
64
67
|
schema.items.oneOf)) // exclude scalar array types
|
|
65
68
|
) {
|
|
66
69
|
return extractNodeToContext(propertyName, schema, ctx);
|
|
@@ -83,7 +86,7 @@ function transformJSONSchemaToNodeType(propertyName, schema, ctx) {
|
|
|
83
86
|
return transformJSONSchemaToNodeType(name, option, ctx);
|
|
84
87
|
});
|
|
85
88
|
return (value, key) => {
|
|
86
|
-
if (isPlainObject(value)) {
|
|
89
|
+
if ((0, utils_1.isPlainObject)(value)) {
|
|
87
90
|
const discriminatedTypeName = value[discriminatedPropertyName];
|
|
88
91
|
if (typeof discriminatedTypeName === 'string' && ctx[discriminatedTypeName]) {
|
|
89
92
|
return discriminatedTypeName;
|
|
@@ -117,16 +120,16 @@ function extractNodeToContext(propertyName, schema, ctx) {
|
|
|
117
120
|
properties[name] = transformJSONSchemaToNodeType(propertyName + '.' + name, property, ctx);
|
|
118
121
|
}
|
|
119
122
|
let additionalProperties;
|
|
120
|
-
if (isPlainObject(schema.additionalProperties)) {
|
|
123
|
+
if ((0, utils_1.isPlainObject)(schema.additionalProperties)) {
|
|
121
124
|
additionalProperties = transformJSONSchemaToNodeType(propertyName + '_additionalProperties', schema.additionalProperties, ctx);
|
|
122
125
|
}
|
|
123
126
|
if (schema.additionalProperties === true) {
|
|
124
127
|
additionalProperties = {};
|
|
125
128
|
}
|
|
126
129
|
let items;
|
|
127
|
-
if (isPlainObject(schema.items) &&
|
|
128
|
-
(isPlainObject(schema.items.properties) ||
|
|
129
|
-
isPlainObject(schema.items.additionalProperties) ||
|
|
130
|
+
if ((0, utils_1.isPlainObject)(schema.items) &&
|
|
131
|
+
((0, utils_1.isPlainObject)(schema.items.properties) ||
|
|
132
|
+
(0, utils_1.isPlainObject)(schema.items.additionalProperties) ||
|
|
130
133
|
schema.items.oneOf) // exclude scalar array types
|
|
131
134
|
) {
|
|
132
135
|
items = transformJSONSchemaToNodeType(propertyName + '_items', schema.items, ctx);
|
|
@@ -149,9 +152,8 @@ function extractNodeToContext(propertyName, schema, ctx) {
|
|
|
149
152
|
ctx[propertyName] = { properties, additionalProperties, items, required };
|
|
150
153
|
return propertyName;
|
|
151
154
|
}
|
|
152
|
-
|
|
155
|
+
function getNodeTypesFromJSONSchema(schemaName, entrySchema) {
|
|
153
156
|
const ctx = {};
|
|
154
157
|
transformJSONSchemaToNodeType(schemaName, entrySchema, ctx);
|
|
155
158
|
return ctx;
|
|
156
159
|
}
|
|
157
|
-
//# sourceMappingURL=json-schema-adapter.js.map
|
package/lib/types/oas2.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { NodeType } from '
|
|
2
|
-
import type { Oas2NodeType } from './redocly-yaml
|
|
1
|
+
import type { NodeType } from '.';
|
|
2
|
+
import type { Oas2NodeType } from './redocly-yaml';
|
|
3
3
|
export declare const Oas2Types: Record<Oas2NodeType, NodeType>;
|
|
4
|
-
//# sourceMappingURL=oas2.d.ts.map
|
package/lib/types/oas2.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Oas2Types = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
2
5
|
const responseCodeRegexp = /^[0-9][0-9Xx]{2}$/;
|
|
3
6
|
const Root = {
|
|
4
7
|
properties: {
|
|
@@ -209,7 +212,7 @@ const Response = {
|
|
|
209
212
|
properties: {
|
|
210
213
|
description: { type: 'string' },
|
|
211
214
|
schema: 'Schema',
|
|
212
|
-
headers: mapOf('Header'),
|
|
215
|
+
headers: (0, _1.mapOf)('Header'),
|
|
213
216
|
examples: 'Examples',
|
|
214
217
|
'x-summary': { type: 'string' },
|
|
215
218
|
},
|
|
@@ -295,13 +298,13 @@ const Schema = {
|
|
|
295
298
|
},
|
|
296
299
|
items: (value) => {
|
|
297
300
|
if (Array.isArray(value)) {
|
|
298
|
-
return listOf('Schema');
|
|
301
|
+
return (0, _1.listOf)('Schema');
|
|
299
302
|
}
|
|
300
303
|
else {
|
|
301
304
|
return 'Schema';
|
|
302
305
|
}
|
|
303
306
|
},
|
|
304
|
-
allOf: listOf('Schema'),
|
|
307
|
+
allOf: (0, _1.listOf)('Schema'),
|
|
305
308
|
properties: 'SchemaProperties',
|
|
306
309
|
additionalProperties: (value) => {
|
|
307
310
|
if (typeof value === 'boolean') {
|
|
@@ -412,18 +415,18 @@ const Example = {
|
|
|
412
415
|
},
|
|
413
416
|
extensionsPrefix: 'x-',
|
|
414
417
|
};
|
|
415
|
-
|
|
418
|
+
exports.Oas2Types = {
|
|
416
419
|
Root,
|
|
417
420
|
Tag,
|
|
418
|
-
TagList: listOf('Tag'),
|
|
419
|
-
TagGroups: listOf('TagGroup'),
|
|
421
|
+
TagList: (0, _1.listOf)('Tag'),
|
|
422
|
+
TagGroups: (0, _1.listOf)('TagGroup'),
|
|
420
423
|
TagGroup,
|
|
421
424
|
ExternalDocs,
|
|
422
425
|
Example,
|
|
423
|
-
ExamplesMap: mapOf('Example'),
|
|
426
|
+
ExamplesMap: (0, _1.mapOf)('Example'),
|
|
424
427
|
EnumDescriptions,
|
|
425
428
|
SecurityRequirement,
|
|
426
|
-
SecurityRequirementList: listOf('SecurityRequirement'),
|
|
429
|
+
SecurityRequirementList: (0, _1.listOf)('SecurityRequirement'),
|
|
427
430
|
Info,
|
|
428
431
|
Contact,
|
|
429
432
|
License,
|
|
@@ -432,7 +435,7 @@ export const Oas2Types = {
|
|
|
432
435
|
PathItem,
|
|
433
436
|
Parameter,
|
|
434
437
|
ParameterItems,
|
|
435
|
-
ParameterList: listOf('Parameter'),
|
|
438
|
+
ParameterList: (0, _1.listOf)('Parameter'),
|
|
436
439
|
Operation,
|
|
437
440
|
Examples,
|
|
438
441
|
Header,
|
|
@@ -441,14 +444,13 @@ export const Oas2Types = {
|
|
|
441
444
|
Schema,
|
|
442
445
|
Xml,
|
|
443
446
|
SchemaProperties,
|
|
444
|
-
NamedSchemas: mapOf('Schema'),
|
|
445
|
-
NamedResponses: mapOf('Response'),
|
|
446
|
-
NamedParameters: mapOf('Parameter'),
|
|
447
|
-
NamedSecuritySchemes: mapOf('SecurityScheme'),
|
|
447
|
+
NamedSchemas: (0, _1.mapOf)('Schema'),
|
|
448
|
+
NamedResponses: (0, _1.mapOf)('Response'),
|
|
449
|
+
NamedParameters: (0, _1.mapOf)('Parameter'),
|
|
450
|
+
NamedSecuritySchemes: (0, _1.mapOf)('SecurityScheme'),
|
|
448
451
|
SecurityScheme,
|
|
449
452
|
XCodeSample,
|
|
450
|
-
XCodeSampleList: listOf('XCodeSample'),
|
|
451
|
-
XServerList: listOf('XServer'),
|
|
453
|
+
XCodeSampleList: (0, _1.listOf)('XCodeSample'),
|
|
454
|
+
XServerList: (0, _1.listOf)('XServer'),
|
|
452
455
|
XServer,
|
|
453
456
|
};
|
|
454
|
-
//# sourceMappingURL=oas2.js.map
|
package/lib/types/oas3.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { NodeType } from '
|
|
2
|
-
import type { Oas3NodeType } from './redocly-yaml
|
|
1
|
+
import type { NodeType } from '.';
|
|
2
|
+
import type { Oas3NodeType } from './redocly-yaml';
|
|
3
3
|
export declare const ExternalDocs: NodeType;
|
|
4
4
|
export declare const Xml: NodeType;
|
|
5
5
|
export declare const DiscriminatorMapping: NodeType;
|
|
6
6
|
export declare const Discriminator: NodeType;
|
|
7
7
|
export declare const Oas3Types: Record<Oas3NodeType, NodeType>;
|
|
8
|
-
//# sourceMappingURL=oas3.d.ts.map
|