@tsed/schema 8.0.0-alpha.1 → 8.0.0-alpha.10
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/browser/schema.umd.min.js +1 -1
- package/lib/browser/schema.umd.min.js.map +1 -1
- package/lib/esm/components/async-api/channelsMapper.js.map +1 -1
- package/lib/esm/components/async-api/generate.js.map +1 -1
- package/lib/esm/components/async-api/messageMapper.js.map +1 -1
- package/lib/esm/components/async-api/payloadMapper.js.map +1 -1
- package/lib/esm/components/async-api/responseMapper.js.map +1 -1
- package/lib/esm/components/default/anyMapper.js.map +1 -1
- package/lib/esm/components/default/classMapper.js.map +1 -1
- package/lib/esm/components/default/genericsMapper.js.map +1 -1
- package/lib/esm/components/default/inheritedClassMapper.js.map +1 -1
- package/lib/esm/components/default/inlineEnumsMapper.js.map +1 -1
- package/lib/esm/components/default/lazyRefMapper.js.map +1 -1
- package/lib/esm/components/default/mapMapper.js +1 -1
- package/lib/esm/components/default/mapMapper.js.map +1 -1
- package/lib/esm/components/default/nullableMapper.js.map +1 -1
- package/lib/esm/components/default/objectMapper.js.map +1 -1
- package/lib/esm/components/default/ofMapper.js.map +1 -1
- package/lib/esm/components/default/propertiesMapper.js.map +1 -1
- package/lib/esm/components/default/requiredMapper.js.map +1 -1
- package/lib/esm/components/default/schemaMapper.js.map +1 -1
- package/lib/esm/components/open-spec/generate.js.map +1 -1
- package/lib/esm/components/open-spec/nullableMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationInFilesMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationInParameterMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationInQueryMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationRequestBodyMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationResponseMapper.js.map +1 -1
- package/lib/esm/components/open-spec/pathsMapper.js.map +1 -1
- package/lib/esm/constants/OperationVerbs.js +0 -4
- package/lib/esm/constants/OperationVerbs.js.map +1 -1
- package/lib/esm/constants/httpStatusMessages.js +1 -1
- package/lib/esm/constants/httpStatusMessages.js.map +1 -1
- package/lib/esm/decorators/class/children.js.map +1 -1
- package/lib/esm/decorators/class/discriminatorValue.js.map +1 -1
- package/lib/esm/decorators/collections/collectionOf.js.map +1 -1
- package/lib/esm/decorators/collections/maxItems.js.map +1 -1
- package/lib/esm/decorators/collections/maxProperties.js.map +1 -1
- package/lib/esm/decorators/collections/minItems.js.map +1 -1
- package/lib/esm/decorators/collections/minProperties.js.map +1 -1
- package/lib/esm/decorators/common/allow.js.map +1 -1
- package/lib/esm/decorators/common/any.js.map +1 -1
- package/lib/esm/decorators/common/const.js.map +1 -1
- package/lib/esm/decorators/common/defaultMsg.js.map +1 -1
- package/lib/esm/decorators/common/description.js.map +1 -1
- package/lib/esm/decorators/common/discriminatorKey.js.map +1 -1
- package/lib/esm/decorators/common/enum.js.map +1 -1
- package/lib/esm/decorators/common/examples.js.map +1 -1
- package/lib/esm/decorators/common/format.js.map +1 -1
- package/lib/esm/decorators/common/groups.js.map +1 -1
- package/lib/esm/decorators/common/ignore.js +2 -1
- package/lib/esm/decorators/common/ignore.js.map +1 -1
- package/lib/esm/decorators/common/integer.js.map +1 -1
- package/lib/esm/decorators/common/jsonEntityFn.js.map +1 -1
- package/lib/esm/decorators/common/maxLength.js.map +1 -1
- package/lib/esm/decorators/common/minLength.js.map +1 -1
- package/lib/esm/decorators/common/multipleOf.js.map +1 -1
- package/lib/esm/decorators/common/name.js.map +1 -1
- package/lib/esm/decorators/common/nullable.js.map +1 -1
- package/lib/esm/decorators/common/optional.js.map +1 -1
- package/lib/esm/decorators/common/property.js.map +1 -1
- package/lib/esm/decorators/common/requiredGroups.js.map +1 -1
- package/lib/esm/decorators/common/typeError.js.map +1 -1
- package/lib/esm/decorators/config/jsonEntityComponent.js.map +1 -1
- package/lib/esm/decorators/generics/genericOf.js.map +1 -1
- package/lib/esm/decorators/operations/acceptMime.js.map +1 -1
- package/lib/esm/decorators/operations/consumes.js.map +1 -1
- package/lib/esm/decorators/operations/deprecated.js.map +1 -1
- package/lib/esm/decorators/operations/header.js.map +1 -1
- package/lib/esm/decorators/operations/in.js.map +1 -1
- package/lib/esm/decorators/operations/inFile.js +2 -2
- package/lib/esm/decorators/operations/inFile.js.map +1 -1
- package/lib/esm/decorators/operations/operation.js.map +1 -1
- package/lib/esm/decorators/operations/operationId.js.map +1 -1
- package/lib/esm/decorators/operations/operationPath.js.map +1 -1
- package/lib/esm/decorators/operations/path.js.map +1 -1
- package/lib/esm/decorators/operations/produces.js.map +1 -1
- package/lib/esm/decorators/operations/redirect.js.map +1 -1
- package/lib/esm/decorators/operations/returns.js.map +1 -1
- package/lib/esm/decorators/operations/route.js +0 -4
- package/lib/esm/decorators/operations/route.js.map +1 -1
- package/lib/esm/decorators/operations/security.js.map +1 -1
- package/lib/esm/decorators/operations/status.js +1 -2
- package/lib/esm/decorators/operations/status.js.map +1 -1
- package/lib/esm/decorators/operations/summary.js.map +1 -1
- package/lib/esm/decorators/operations/tags.js.map +1 -1
- package/lib/esm/domain/DecoratorContext.js.map +1 -1
- package/lib/esm/domain/JsonClassStore.js +1 -1
- package/lib/esm/domain/JsonClassStore.js.map +1 -1
- package/lib/esm/domain/JsonEntityStore.js.map +1 -1
- package/lib/esm/domain/JsonLazyRef.js.map +1 -1
- package/lib/esm/domain/JsonMap.js.map +1 -1
- package/lib/esm/domain/JsonMedia.js.map +1 -1
- package/lib/esm/domain/JsonMethodStore.js.map +1 -1
- package/lib/esm/domain/JsonOperation.js.map +1 -1
- package/lib/esm/domain/JsonOperationRoute.js.map +1 -1
- package/lib/esm/domain/JsonParameter.js.map +1 -1
- package/lib/esm/domain/JsonParameterStore.js +1 -1
- package/lib/esm/domain/JsonParameterStore.js.map +1 -1
- package/lib/esm/domain/JsonPropertyStore.js +1 -1
- package/lib/esm/domain/JsonPropertyStore.js.map +1 -1
- package/lib/esm/domain/JsonRequestBody.js.map +1 -1
- package/lib/esm/domain/JsonResponse.js.map +1 -1
- package/lib/esm/domain/JsonSchema.js.map +1 -1
- package/lib/esm/hooks/alterIgnore.js.map +1 -1
- package/lib/esm/hooks/alterOneOf.js.map +1 -1
- package/lib/esm/hooks/alterRequiredGroups.js.map +1 -1
- package/lib/esm/registries/JsonSchemaMapperContainer.js.map +1 -1
- package/lib/esm/utils/concatPath.js.map +1 -1
- package/lib/esm/utils/from.js.map +1 -1
- package/lib/esm/utils/generateSpec.js.map +1 -1
- package/lib/esm/utils/generics.js.map +1 -1
- package/lib/esm/utils/getComputedType.js.map +1 -1
- package/lib/esm/utils/getInheritedStores.js.map +1 -1
- package/lib/esm/utils/getJsonEntityStore.js +3 -3
- package/lib/esm/utils/getJsonEntityStore.js.map +1 -1
- package/lib/esm/utils/getJsonPathParameters.js.map +1 -1
- package/lib/esm/utils/getJsonSchema.js +1 -1
- package/lib/esm/utils/getJsonSchema.js.map +1 -1
- package/lib/esm/utils/getJsonType.js.map +1 -1
- package/lib/esm/utils/getOperationsRoutes.js.map +1 -1
- package/lib/esm/utils/getOperationsStores.js.map +1 -1
- package/lib/esm/utils/getPropertiesStores.js.map +1 -1
- package/lib/esm/utils/getSpec.js.map +1 -1
- package/lib/esm/utils/getSpecType.js.map +1 -1
- package/lib/esm/utils/mapHeaders.js.map +1 -1
- package/lib/esm/utils/mapOpenSpec.js +1 -1
- package/lib/esm/utils/mapOpenSpec.js.map +1 -1
- package/lib/esm/utils/mapOpenSpec2.js.map +1 -1
- package/lib/esm/utils/mapOpenSpec3.js.map +1 -1
- package/lib/esm/utils/mapOperationOptions.js.map +1 -1
- package/lib/esm/utils/matchGroups.js.map +1 -1
- package/lib/esm/utils/mergeSpec.js +1 -1
- package/lib/esm/utils/mergeSpec.js.map +1 -1
- package/lib/esm/utils/operationIdFormatter.js.map +1 -1
- package/lib/esm/utils/ref.js.map +1 -1
- package/lib/esm/utils/serializeEnumValues.js.map +1 -1
- package/lib/esm/utils/somethingOf.js.map +1 -1
- package/lib/esm/utils/transformToOS2.js.map +1 -1
- package/lib/esm/utils/withErrorMsg.js.map +1 -1
- package/lib/types/constants/OperationVerbs.d.ts +1 -5
- package/lib/types/decorators/common/ignore.d.ts +2 -1
- package/lib/types/decorators/operations/returns.d.ts +1 -2
- package/lib/types/decorators/operations/route.d.ts +0 -5
- package/lib/types/decorators/operations/status.d.ts +1 -2
- package/lib/types/domain/JsonClassStore.d.ts +1 -1
- package/lib/types/domain/JsonPropertyStore.d.ts +1 -1
- package/lib/types/utils/getJsonEntityStore.d.ts +3 -3
- package/lib/types/utils/getJsonSchema.d.ts +1 -1
- package/package.json +20 -19
- package/lib/cjs/components/async-api/channelsMapper.js +0 -62
- package/lib/cjs/components/async-api/channelsMapper.js.map +0 -1
- package/lib/cjs/components/async-api/generate.js +0 -20
- package/lib/cjs/components/async-api/generate.js.map +0 -1
- package/lib/cjs/components/async-api/messageMapper.js +0 -44
- package/lib/cjs/components/async-api/messageMapper.js.map +0 -1
- package/lib/cjs/components/async-api/payloadMapper.js +0 -52
- package/lib/cjs/components/async-api/payloadMapper.js.map +0 -1
- package/lib/cjs/components/async-api/responseMapper.js +0 -58
- package/lib/cjs/components/async-api/responseMapper.js.map +0 -1
- package/lib/cjs/components/default/anyMapper.js +0 -29
- package/lib/cjs/components/default/anyMapper.js.map +0 -1
- package/lib/cjs/components/default/classMapper.js +0 -43
- package/lib/cjs/components/default/classMapper.js.map +0 -1
- package/lib/cjs/components/default/genericsMapper.js +0 -62
- package/lib/cjs/components/default/genericsMapper.js.map +0 -1
- package/lib/cjs/components/default/inheritedClassMapper.js +0 -22
- package/lib/cjs/components/default/inheritedClassMapper.js.map +0 -1
- package/lib/cjs/components/default/inlineEnumsMapper.js +0 -16
- package/lib/cjs/components/default/inlineEnumsMapper.js.map +0 -1
- package/lib/cjs/components/default/itemMapper.js +0 -10
- package/lib/cjs/components/default/itemMapper.js.map +0 -1
- package/lib/cjs/components/default/lazyRefMapper.js +0 -18
- package/lib/cjs/components/default/lazyRefMapper.js.map +0 -1
- package/lib/cjs/components/default/mapMapper.js +0 -25
- package/lib/cjs/components/default/mapMapper.js.map +0 -1
- package/lib/cjs/components/default/nullableMapper.js +0 -54
- package/lib/cjs/components/default/nullableMapper.js.map +0 -1
- package/lib/cjs/components/default/objectMapper.js +0 -30
- package/lib/cjs/components/default/objectMapper.js.map +0 -1
- package/lib/cjs/components/default/ofMapper.js +0 -17
- package/lib/cjs/components/default/ofMapper.js.map +0 -1
- package/lib/cjs/components/default/propertiesMapper.js +0 -25
- package/lib/cjs/components/default/propertiesMapper.js.map +0 -1
- package/lib/cjs/components/default/requiredMapper.js +0 -56
- package/lib/cjs/components/default/requiredMapper.js.map +0 -1
- package/lib/cjs/components/default/schemaMapper.js +0 -124
- package/lib/cjs/components/default/schemaMapper.js.map +0 -1
- package/lib/cjs/components/index.js +0 -37
- package/lib/cjs/components/index.js.map +0 -1
- package/lib/cjs/components/open-spec/generate.js +0 -24
- package/lib/cjs/components/open-spec/generate.js.map +0 -1
- package/lib/cjs/components/open-spec/nullableMapper.js +0 -49
- package/lib/cjs/components/open-spec/nullableMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationInFilesMapper.js +0 -28
- package/lib/cjs/components/open-spec/operationInFilesMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationInParameterMapper.js +0 -39
- package/lib/cjs/components/open-spec/operationInParameterMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationInParametersMapper.js +0 -10
- package/lib/cjs/components/open-spec/operationInParametersMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationInQueryMapper.js +0 -61
- package/lib/cjs/components/open-spec/operationInQueryMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationMapper.js +0 -49
- package/lib/cjs/components/open-spec/operationMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationMediaMapper.js +0 -11
- package/lib/cjs/components/open-spec/operationMediaMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationRequestBodyMapper.js +0 -67
- package/lib/cjs/components/open-spec/operationRequestBodyMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationResponseMapper.js +0 -24
- package/lib/cjs/components/open-spec/operationResponseMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/pathsMapper.js +0 -95
- package/lib/cjs/components/open-spec/pathsMapper.js.map +0 -1
- package/lib/cjs/constants/OperationVerbs.js +0 -36
- package/lib/cjs/constants/OperationVerbs.js.map +0 -1
- package/lib/cjs/constants/httpStatusMessages.js +0 -24
- package/lib/cjs/constants/httpStatusMessages.js.map +0 -1
- package/lib/cjs/constants/jsonSchemaProperties.js +0 -21
- package/lib/cjs/constants/jsonSchemaProperties.js.map +0 -1
- package/lib/cjs/decorators/class/children.js +0 -24
- package/lib/cjs/decorators/class/children.js.map +0 -1
- package/lib/cjs/decorators/class/discriminatorValue.js +0 -56
- package/lib/cjs/decorators/class/discriminatorValue.js.map +0 -1
- package/lib/cjs/decorators/collections/collectionContains.js +0 -29
- package/lib/cjs/decorators/collections/collectionContains.js.map +0 -1
- package/lib/cjs/decorators/collections/collectionOf.js +0 -102
- package/lib/cjs/decorators/collections/collectionOf.js.map +0 -1
- package/lib/cjs/decorators/collections/maxItems.js +0 -61
- package/lib/cjs/decorators/collections/maxItems.js.map +0 -1
- package/lib/cjs/decorators/collections/maxProperties.js +0 -84
- package/lib/cjs/decorators/collections/maxProperties.js.map +0 -1
- package/lib/cjs/decorators/collections/minItems.js +0 -65
- package/lib/cjs/decorators/collections/minItems.js.map +0 -1
- package/lib/cjs/decorators/collections/minProperties.js +0 -83
- package/lib/cjs/decorators/collections/minProperties.js.map +0 -1
- package/lib/cjs/decorators/collections/uniqueItems.js +0 -61
- package/lib/cjs/decorators/collections/uniqueItems.js.map +0 -1
- package/lib/cjs/decorators/common/additionalProperties.js +0 -20
- package/lib/cjs/decorators/common/additionalProperties.js.map +0 -1
- package/lib/cjs/decorators/common/allOf.js +0 -22
- package/lib/cjs/decorators/common/allOf.js.map +0 -1
- package/lib/cjs/decorators/common/allow.js +0 -47
- package/lib/cjs/decorators/common/allow.js.map +0 -1
- package/lib/cjs/decorators/common/any.js +0 -46
- package/lib/cjs/decorators/common/any.js.map +0 -1
- package/lib/cjs/decorators/common/anyOf.js +0 -26
- package/lib/cjs/decorators/common/anyOf.js.map +0 -1
- package/lib/cjs/decorators/common/const.js +0 -70
- package/lib/cjs/decorators/common/const.js.map +0 -1
- package/lib/cjs/decorators/common/customKey.js +0 -43
- package/lib/cjs/decorators/common/customKey.js.map +0 -1
- package/lib/cjs/decorators/common/default.js +0 -51
- package/lib/cjs/decorators/common/default.js.map +0 -1
- package/lib/cjs/decorators/common/defaultMsg.js +0 -41
- package/lib/cjs/decorators/common/defaultMsg.js.map +0 -1
- package/lib/cjs/decorators/common/description.js +0 -75
- package/lib/cjs/decorators/common/description.js.map +0 -1
- package/lib/cjs/decorators/common/discriminatorKey.js +0 -13
- package/lib/cjs/decorators/common/discriminatorKey.js.map +0 -1
- package/lib/cjs/decorators/common/enum.js +0 -109
- package/lib/cjs/decorators/common/enum.js.map +0 -1
- package/lib/cjs/decorators/common/errorMsg.js +0 -18
- package/lib/cjs/decorators/common/errorMsg.js.map +0 -1
- package/lib/cjs/decorators/common/example.js +0 -21
- package/lib/cjs/decorators/common/example.js.map +0 -1
- package/lib/cjs/decorators/common/examples.js +0 -21
- package/lib/cjs/decorators/common/examples.js.map +0 -1
- package/lib/cjs/decorators/common/exclusiveMaximum.js +0 -78
- package/lib/cjs/decorators/common/exclusiveMaximum.js.map +0 -1
- package/lib/cjs/decorators/common/exclusiveMinimum.js +0 -78
- package/lib/cjs/decorators/common/exclusiveMinimum.js.map +0 -1
- package/lib/cjs/decorators/common/format.js +0 -487
- package/lib/cjs/decorators/common/format.js.map +0 -1
- package/lib/cjs/decorators/common/forwardGroups.js +0 -20
- package/lib/cjs/decorators/common/forwardGroups.js.map +0 -1
- package/lib/cjs/decorators/common/groups.js +0 -49
- package/lib/cjs/decorators/common/groups.js.map +0 -1
- package/lib/cjs/decorators/common/hidden.js +0 -40
- package/lib/cjs/decorators/common/hidden.js.map +0 -1
- package/lib/cjs/decorators/common/ignore.js +0 -68
- package/lib/cjs/decorators/common/ignore.js.map +0 -1
- package/lib/cjs/decorators/common/integer.js +0 -71
- package/lib/cjs/decorators/common/integer.js.map +0 -1
- package/lib/cjs/decorators/common/jsonEntityFn.js +0 -32
- package/lib/cjs/decorators/common/jsonEntityFn.js.map +0 -1
- package/lib/cjs/decorators/common/maxLength.js +0 -90
- package/lib/cjs/decorators/common/maxLength.js.map +0 -1
- package/lib/cjs/decorators/common/maximum.js +0 -149
- package/lib/cjs/decorators/common/maximum.js.map +0 -1
- package/lib/cjs/decorators/common/minLength.js +0 -91
- package/lib/cjs/decorators/common/minLength.js.map +0 -1
- package/lib/cjs/decorators/common/minimum.js +0 -147
- package/lib/cjs/decorators/common/minimum.js.map +0 -1
- package/lib/cjs/decorators/common/multipleOf.js +0 -82
- package/lib/cjs/decorators/common/multipleOf.js.map +0 -1
- package/lib/cjs/decorators/common/name.js +0 -52
- package/lib/cjs/decorators/common/name.js.map +0 -1
- package/lib/cjs/decorators/common/nullable.js +0 -34
- package/lib/cjs/decorators/common/nullable.js.map +0 -1
- package/lib/cjs/decorators/common/oneOf.js +0 -27
- package/lib/cjs/decorators/common/oneOf.js.map +0 -1
- package/lib/cjs/decorators/common/optional.js +0 -28
- package/lib/cjs/decorators/common/optional.js.map +0 -1
- package/lib/cjs/decorators/common/pattern.js +0 -104
- package/lib/cjs/decorators/common/pattern.js.map +0 -1
- package/lib/cjs/decorators/common/property.js +0 -27
- package/lib/cjs/decorators/common/property.js.map +0 -1
- package/lib/cjs/decorators/common/readOnly.js +0 -21
- package/lib/cjs/decorators/common/readOnly.js.map +0 -1
- package/lib/cjs/decorators/common/recordOf.js +0 -63
- package/lib/cjs/decorators/common/recordOf.js.map +0 -1
- package/lib/cjs/decorators/common/required.js +0 -53
- package/lib/cjs/decorators/common/required.js.map +0 -1
- package/lib/cjs/decorators/common/requiredGroups.js +0 -26
- package/lib/cjs/decorators/common/requiredGroups.js.map +0 -1
- package/lib/cjs/decorators/common/schema.js +0 -66
- package/lib/cjs/decorators/common/schema.js.map +0 -1
- package/lib/cjs/decorators/common/title.js +0 -49
- package/lib/cjs/decorators/common/title.js.map +0 -1
- package/lib/cjs/decorators/common/typeError.js +0 -18
- package/lib/cjs/decorators/common/typeError.js.map +0 -1
- package/lib/cjs/decorators/common/writeOnly.js +0 -21
- package/lib/cjs/decorators/common/writeOnly.js.map +0 -1
- package/lib/cjs/decorators/config/jsonEntityComponent.js +0 -18
- package/lib/cjs/decorators/config/jsonEntityComponent.js.map +0 -1
- package/lib/cjs/decorators/generics/genericOf.js +0 -99
- package/lib/cjs/decorators/generics/genericOf.js.map +0 -1
- package/lib/cjs/decorators/generics/generics.js +0 -25
- package/lib/cjs/decorators/generics/generics.js.map +0 -1
- package/lib/cjs/decorators/operations/acceptMime.js +0 -28
- package/lib/cjs/decorators/operations/acceptMime.js.map +0 -1
- package/lib/cjs/decorators/operations/consumes.js +0 -39
- package/lib/cjs/decorators/operations/consumes.js.map +0 -1
- package/lib/cjs/decorators/operations/contentType.js +0 -28
- package/lib/cjs/decorators/operations/contentType.js.map +0 -1
- package/lib/cjs/decorators/operations/deprecated.js +0 -49
- package/lib/cjs/decorators/operations/deprecated.js.map +0 -1
- package/lib/cjs/decorators/operations/header.js +0 -63
- package/lib/cjs/decorators/operations/header.js.map +0 -1
- package/lib/cjs/decorators/operations/in.js +0 -80
- package/lib/cjs/decorators/operations/in.js.map +0 -1
- package/lib/cjs/decorators/operations/inFile.js +0 -45
- package/lib/cjs/decorators/operations/inFile.js.map +0 -1
- package/lib/cjs/decorators/operations/location.js +0 -29
- package/lib/cjs/decorators/operations/location.js.map +0 -1
- package/lib/cjs/decorators/operations/operation.js +0 -48
- package/lib/cjs/decorators/operations/operation.js.map +0 -1
- package/lib/cjs/decorators/operations/operationId.js +0 -24
- package/lib/cjs/decorators/operations/operationId.js.map +0 -1
- package/lib/cjs/decorators/operations/operationPath.js +0 -34
- package/lib/cjs/decorators/operations/operationPath.js.map +0 -1
- package/lib/cjs/decorators/operations/partial.js +0 -18
- package/lib/cjs/decorators/operations/partial.js.map +0 -1
- package/lib/cjs/decorators/operations/path.js +0 -29
- package/lib/cjs/decorators/operations/path.js.map +0 -1
- package/lib/cjs/decorators/operations/produces.js +0 -46
- package/lib/cjs/decorators/operations/produces.js.map +0 -1
- package/lib/cjs/decorators/operations/publish.js +0 -10
- package/lib/cjs/decorators/operations/publish.js.map +0 -1
- package/lib/cjs/decorators/operations/redirect.js +0 -25
- package/lib/cjs/decorators/operations/redirect.js.map +0 -1
- package/lib/cjs/decorators/operations/returns.js +0 -293
- package/lib/cjs/decorators/operations/returns.js.map +0 -1
- package/lib/cjs/decorators/operations/route.js +0 -162
- package/lib/cjs/decorators/operations/route.js.map +0 -1
- package/lib/cjs/decorators/operations/security.js +0 -31
- package/lib/cjs/decorators/operations/security.js.map +0 -1
- package/lib/cjs/decorators/operations/status.js +0 -133
- package/lib/cjs/decorators/operations/status.js.map +0 -1
- package/lib/cjs/decorators/operations/subscribe.js +0 -10
- package/lib/cjs/decorators/operations/subscribe.js.map +0 -1
- package/lib/cjs/decorators/operations/summary.js +0 -34
- package/lib/cjs/decorators/operations/summary.js.map +0 -1
- package/lib/cjs/decorators/operations/tags.js +0 -52
- package/lib/cjs/decorators/operations/tags.js.map +0 -1
- package/lib/cjs/decorators/operations/view.js +0 -31
- package/lib/cjs/decorators/operations/view.js.map +0 -1
- package/lib/cjs/domain/DecoratorContext.js +0 -88
- package/lib/cjs/domain/DecoratorContext.js.map +0 -1
- package/lib/cjs/domain/JsonAliasMap.js +0 -15
- package/lib/cjs/domain/JsonAliasMap.js.map +0 -1
- package/lib/cjs/domain/JsonClassStore.js +0 -37
- package/lib/cjs/domain/JsonClassStore.js.map +0 -1
- package/lib/cjs/domain/JsonDiscriminator.js +0 -38
- package/lib/cjs/domain/JsonDiscriminator.js.map +0 -1
- package/lib/cjs/domain/JsonEntityStore.js +0 -158
- package/lib/cjs/domain/JsonEntityStore.js.map +0 -1
- package/lib/cjs/domain/JsonFormatTypes.js +0 -22
- package/lib/cjs/domain/JsonFormatTypes.js.map +0 -1
- package/lib/cjs/domain/JsonLazyRef.js +0 -22
- package/lib/cjs/domain/JsonLazyRef.js.map +0 -1
- package/lib/cjs/domain/JsonMap.js +0 -29
- package/lib/cjs/domain/JsonMap.js.map +0 -1
- package/lib/cjs/domain/JsonMedia.js +0 -21
- package/lib/cjs/domain/JsonMedia.js.map +0 -1
- package/lib/cjs/domain/JsonMethodStore.js +0 -147
- package/lib/cjs/domain/JsonMethodStore.js.map +0 -1
- package/lib/cjs/domain/JsonOperation.js +0 -156
- package/lib/cjs/domain/JsonOperation.js.map +0 -1
- package/lib/cjs/domain/JsonOperationPathsMap.js +0 -19
- package/lib/cjs/domain/JsonOperationPathsMap.js.map +0 -1
- package/lib/cjs/domain/JsonOperationRoute.js +0 -54
- package/lib/cjs/domain/JsonOperationRoute.js.map +0 -1
- package/lib/cjs/domain/JsonParameter.js +0 -50
- package/lib/cjs/domain/JsonParameter.js.map +0 -1
- package/lib/cjs/domain/JsonParameterStore.js +0 -99
- package/lib/cjs/domain/JsonParameterStore.js.map +0 -1
- package/lib/cjs/domain/JsonParameterTypes.js +0 -27
- package/lib/cjs/domain/JsonParameterTypes.js.map +0 -1
- package/lib/cjs/domain/JsonPropertyStore.js +0 -80
- package/lib/cjs/domain/JsonPropertyStore.js.map +0 -1
- package/lib/cjs/domain/JsonRequestBody.js +0 -34
- package/lib/cjs/domain/JsonRequestBody.js.map +0 -1
- package/lib/cjs/domain/JsonResponse.js +0 -45
- package/lib/cjs/domain/JsonResponse.js.map +0 -1
- package/lib/cjs/domain/JsonSchema.js +0 -822
- package/lib/cjs/domain/JsonSchema.js.map +0 -1
- package/lib/cjs/domain/SpecTypes.js +0 -11
- package/lib/cjs/domain/SpecTypes.js.map +0 -1
- package/lib/cjs/hooks/alterIgnore.js +0 -24
- package/lib/cjs/hooks/alterIgnore.js.map +0 -1
- package/lib/cjs/hooks/alterOneOf.js +0 -50
- package/lib/cjs/hooks/alterOneOf.js.map +0 -1
- package/lib/cjs/hooks/alterRequiredGroups.js +0 -14
- package/lib/cjs/hooks/alterRequiredGroups.js.map +0 -1
- package/lib/cjs/index.js +0 -186
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/interfaces/IgnoreCallback.js +0 -3
- package/lib/cjs/interfaces/IgnoreCallback.js.map +0 -1
- package/lib/cjs/interfaces/JsonHookContext.js +0 -3
- package/lib/cjs/interfaces/JsonHookContext.js.map +0 -1
- package/lib/cjs/interfaces/JsonOpenSpec.js +0 -3
- package/lib/cjs/interfaces/JsonOpenSpec.js.map +0 -1
- package/lib/cjs/interfaces/JsonSchemaOptions.js +0 -3
- package/lib/cjs/interfaces/JsonSchemaOptions.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/registries/JsonSchemaMapperContainer.js +0 -43
- package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +0 -1
- package/lib/cjs/registries/enumRegistries.js +0 -5
- package/lib/cjs/registries/enumRegistries.js.map +0 -1
- package/lib/cjs/utils/buildPath.js +0 -13
- package/lib/cjs/utils/buildPath.js.map +0 -1
- package/lib/cjs/utils/concatParameters.js +0 -16
- package/lib/cjs/utils/concatParameters.js.map +0 -1
- package/lib/cjs/utils/concatPath.js +0 -23
- package/lib/cjs/utils/concatPath.js.map +0 -1
- package/lib/cjs/utils/defineStatusModel.js +0 -13
- package/lib/cjs/utils/defineStatusModel.js.map +0 -1
- package/lib/cjs/utils/from.js +0 -280
- package/lib/cjs/utils/from.js.map +0 -1
- package/lib/cjs/utils/generateSpec.js +0 -47
- package/lib/cjs/utils/generateSpec.js.map +0 -1
- package/lib/cjs/utils/generics.js +0 -40
- package/lib/cjs/utils/generics.js.map +0 -1
- package/lib/cjs/utils/getComputedType.js +0 -26
- package/lib/cjs/utils/getComputedType.js.map +0 -1
- package/lib/cjs/utils/getInheritedStores.js +0 -23
- package/lib/cjs/utils/getInheritedStores.js.map +0 -1
- package/lib/cjs/utils/getJsonEntityStore.js +0 -18
- package/lib/cjs/utils/getJsonEntityStore.js.map +0 -1
- package/lib/cjs/utils/getJsonPathParameters.js +0 -87
- package/lib/cjs/utils/getJsonPathParameters.js.map +0 -1
- package/lib/cjs/utils/getJsonSchema.js +0 -59
- package/lib/cjs/utils/getJsonSchema.js.map +0 -1
- package/lib/cjs/utils/getJsonType.js +0 -40
- package/lib/cjs/utils/getJsonType.js.map +0 -1
- package/lib/cjs/utils/getOperationsRoutes.js +0 -37
- package/lib/cjs/utils/getOperationsRoutes.js.map +0 -1
- package/lib/cjs/utils/getOperationsStores.js +0 -33
- package/lib/cjs/utils/getOperationsStores.js.map +0 -1
- package/lib/cjs/utils/getPropertiesStores.js +0 -45
- package/lib/cjs/utils/getPropertiesStores.js.map +0 -1
- package/lib/cjs/utils/getSpec.js +0 -79
- package/lib/cjs/utils/getSpec.js.map +0 -1
- package/lib/cjs/utils/getSpecType.js +0 -21
- package/lib/cjs/utils/getSpecType.js.map +0 -1
- package/lib/cjs/utils/isSuccessStatus.js +0 -8
- package/lib/cjs/utils/isSuccessStatus.js.map +0 -1
- package/lib/cjs/utils/mapHeaders.js +0 -29
- package/lib/cjs/utils/mapHeaders.js.map +0 -1
- package/lib/cjs/utils/mapOpenSpec.js +0 -41
- package/lib/cjs/utils/mapOpenSpec.js.map +0 -1
- package/lib/cjs/utils/mapOpenSpec2.js +0 -34
- package/lib/cjs/utils/mapOpenSpec2.js.map +0 -1
- package/lib/cjs/utils/mapOpenSpec3.js +0 -26
- package/lib/cjs/utils/mapOpenSpec3.js.map +0 -1
- package/lib/cjs/utils/mapOpenSpecInfo.js +0 -21
- package/lib/cjs/utils/mapOpenSpecInfo.js.map +0 -1
- package/lib/cjs/utils/mapOperationOptions.js +0 -31
- package/lib/cjs/utils/mapOperationOptions.js.map +0 -1
- package/lib/cjs/utils/matchGroups.js +0 -56
- package/lib/cjs/utils/matchGroups.js.map +0 -1
- package/lib/cjs/utils/mergeSpec.js +0 -51
- package/lib/cjs/utils/mergeSpec.js.map +0 -1
- package/lib/cjs/utils/operationIdFormatter.js +0 -41
- package/lib/cjs/utils/operationIdFormatter.js.map +0 -1
- package/lib/cjs/utils/ref.js +0 -55
- package/lib/cjs/utils/ref.js.map +0 -1
- package/lib/cjs/utils/removeHiddenOperation.js +0 -8
- package/lib/cjs/utils/removeHiddenOperation.js.map +0 -1
- package/lib/cjs/utils/serializeEnumValues.js +0 -26
- package/lib/cjs/utils/serializeEnumValues.js.map +0 -1
- package/lib/cjs/utils/somethingOf.js +0 -16
- package/lib/cjs/utils/somethingOf.js.map +0 -1
- package/lib/cjs/utils/toJsonMapCollection.js +0 -15
- package/lib/cjs/utils/toJsonMapCollection.js.map +0 -1
- package/lib/cjs/utils/toJsonRegex.js +0 -12
- package/lib/cjs/utils/toJsonRegex.js.map +0 -1
- package/lib/cjs/utils/transformToOS2.js +0 -509
- package/lib/cjs/utils/transformToOS2.js.map +0 -1
- package/lib/cjs/utils/withErrorMsg.js +0 -34
- package/lib/cjs/utils/withErrorMsg.js.map +0 -1
- package/lib/esm/package.json +0 -3
- package/lib/types-esm/components/async-api/channelsMapper.d.ts +0 -2
- package/lib/types-esm/components/async-api/generate.d.ts +0 -1
- package/lib/types-esm/components/async-api/messageMapper.d.ts +0 -6
- package/lib/types-esm/components/async-api/payloadMapper.d.ts +0 -4
- package/lib/types-esm/components/async-api/responseMapper.d.ts +0 -6
- package/lib/types-esm/components/default/anyMapper.d.ts +0 -2
- package/lib/types-esm/components/default/classMapper.d.ts +0 -3
- package/lib/types-esm/components/default/genericsMapper.d.ts +0 -5
- package/lib/types-esm/components/default/inheritedClassMapper.d.ts +0 -5
- package/lib/types-esm/components/default/inlineEnumsMapper.d.ts +0 -3
- package/lib/types-esm/components/default/itemMapper.d.ts +0 -2
- package/lib/types-esm/components/default/lazyRefMapper.d.ts +0 -3
- package/lib/types-esm/components/default/mapMapper.d.ts +0 -9
- package/lib/types-esm/components/default/nullableMapper.d.ts +0 -2
- package/lib/types-esm/components/default/objectMapper.d.ts +0 -8
- package/lib/types-esm/components/default/ofMapper.d.ts +0 -3
- package/lib/types-esm/components/default/propertiesMapper.d.ts +0 -3
- package/lib/types-esm/components/default/requiredMapper.d.ts +0 -3
- package/lib/types-esm/components/default/schemaMapper.d.ts +0 -3
- package/lib/types-esm/components/index.d.ts +0 -33
- package/lib/types-esm/components/open-spec/generate.d.ts +0 -1
- package/lib/types-esm/components/open-spec/nullableMapper.d.ts +0 -2
- package/lib/types-esm/components/open-spec/operationInFilesMapper.d.ts +0 -2
- package/lib/types-esm/components/open-spec/operationInParameterMapper.d.ts +0 -10
- package/lib/types-esm/components/open-spec/operationInParametersMapper.d.ts +0 -3
- package/lib/types-esm/components/open-spec/operationInQueryMapper.d.ts +0 -2
- package/lib/types-esm/components/open-spec/operationMapper.d.ts +0 -3
- package/lib/types-esm/components/open-spec/operationMediaMapper.d.ts +0 -3
- package/lib/types-esm/components/open-spec/operationRequestBodyMapper.d.ts +0 -3
- package/lib/types-esm/components/open-spec/operationResponseMapper.d.ts +0 -3
- package/lib/types-esm/components/open-spec/pathsMapper.d.ts +0 -2
- package/lib/types-esm/constants/OperationVerbs.d.ts +0 -20
- package/lib/types-esm/constants/httpStatusMessages.d.ts +0 -11
- package/lib/types-esm/constants/jsonSchemaProperties.d.ts +0 -7
- package/lib/types-esm/decorators/class/children.d.ts +0 -11
- package/lib/types-esm/decorators/class/discriminatorValue.d.ts +0 -42
- package/lib/types-esm/decorators/collections/collectionContains.d.ts +0 -21
- package/lib/types-esm/decorators/collections/collectionOf.d.ts +0 -101
- package/lib/types-esm/decorators/collections/maxItems.d.ts +0 -48
- package/lib/types-esm/decorators/collections/maxProperties.d.ts +0 -71
- package/lib/types-esm/decorators/collections/minItems.d.ts +0 -52
- package/lib/types-esm/decorators/collections/minProperties.d.ts +0 -70
- package/lib/types-esm/decorators/collections/uniqueItems.d.ts +0 -51
- package/lib/types-esm/decorators/common/additionalProperties.d.ts +0 -11
- package/lib/types-esm/decorators/common/allOf.d.ts +0 -13
- package/lib/types-esm/decorators/common/allow.d.ts +0 -28
- package/lib/types-esm/decorators/common/any.d.ts +0 -38
- package/lib/types-esm/decorators/common/anyOf.d.ts +0 -17
- package/lib/types-esm/decorators/common/const.d.ts +0 -61
- package/lib/types-esm/decorators/common/customKey.d.ts +0 -26
- package/lib/types-esm/decorators/common/default.d.ts +0 -41
- package/lib/types-esm/decorators/common/defaultMsg.d.ts +0 -32
- package/lib/types-esm/decorators/common/description.d.ts +0 -53
- package/lib/types-esm/decorators/common/discriminatorKey.d.ts +0 -1
- package/lib/types-esm/decorators/common/enum.d.ts +0 -101
- package/lib/types-esm/decorators/common/errorMsg.d.ts +0 -6
- package/lib/types-esm/decorators/common/example.d.ts +0 -11
- package/lib/types-esm/decorators/common/examples.d.ts +0 -12
- package/lib/types-esm/decorators/common/exclusiveMaximum.d.ts +0 -70
- package/lib/types-esm/decorators/common/exclusiveMinimum.d.ts +0 -70
- package/lib/types-esm/decorators/common/format.d.ts +0 -466
- package/lib/types-esm/decorators/common/forwardGroups.d.ts +0 -10
- package/lib/types-esm/decorators/common/groups.d.ts +0 -12
- package/lib/types-esm/decorators/common/hidden.d.ts +0 -32
- package/lib/types-esm/decorators/common/ignore.d.ts +0 -59
- package/lib/types-esm/decorators/common/integer.d.ts +0 -61
- package/lib/types-esm/decorators/common/jsonEntityFn.d.ts +0 -21
- package/lib/types-esm/decorators/common/maxLength.d.ts +0 -77
- package/lib/types-esm/decorators/common/maximum.d.ts +0 -139
- package/lib/types-esm/decorators/common/minLength.d.ts +0 -78
- package/lib/types-esm/decorators/common/minimum.d.ts +0 -137
- package/lib/types-esm/decorators/common/multipleOf.d.ts +0 -69
- package/lib/types-esm/decorators/common/name.d.ts +0 -32
- package/lib/types-esm/decorators/common/nullable.d.ts +0 -25
- package/lib/types-esm/decorators/common/oneOf.d.ts +0 -17
- package/lib/types-esm/decorators/common/optional.d.ts +0 -10
- package/lib/types-esm/decorators/common/pattern.d.ts +0 -94
- package/lib/types-esm/decorators/common/property.d.ts +0 -11
- package/lib/types-esm/decorators/common/readOnly.d.ts +0 -11
- package/lib/types-esm/decorators/common/recordOf.d.ts +0 -46
- package/lib/types-esm/decorators/common/required.d.ts +0 -44
- package/lib/types-esm/decorators/common/requiredGroups.d.ts +0 -10
- package/lib/types-esm/decorators/common/schema.d.ts +0 -53
- package/lib/types-esm/decorators/common/title.d.ts +0 -39
- package/lib/types-esm/decorators/common/typeError.d.ts +0 -8
- package/lib/types-esm/decorators/common/writeOnly.d.ts +0 -11
- package/lib/types-esm/decorators/config/jsonEntityComponent.d.ts +0 -10
- package/lib/types-esm/decorators/generics/genericOf.d.ts +0 -76
- package/lib/types-esm/decorators/generics/generics.d.ts +0 -14
- package/lib/types-esm/decorators/operations/acceptMime.d.ts +0 -19
- package/lib/types-esm/decorators/operations/consumes.d.ts +0 -19
- package/lib/types-esm/decorators/operations/contentType.d.ts +0 -20
- package/lib/types-esm/decorators/operations/deprecated.d.ts +0 -23
- package/lib/types-esm/decorators/operations/header.d.ts +0 -49
- package/lib/types-esm/decorators/operations/in.d.ts +0 -64
- package/lib/types-esm/decorators/operations/inFile.d.ts +0 -25
- package/lib/types-esm/decorators/operations/location.d.ts +0 -22
- package/lib/types-esm/decorators/operations/operation.d.ts +0 -60
- package/lib/types-esm/decorators/operations/operationId.d.ts +0 -10
- package/lib/types-esm/decorators/operations/operationPath.d.ts +0 -21
- package/lib/types-esm/decorators/operations/partial.d.ts +0 -10
- package/lib/types-esm/decorators/operations/path.d.ts +0 -15
- package/lib/types-esm/decorators/operations/produces.d.ts +0 -26
- package/lib/types-esm/decorators/operations/publish.d.ts +0 -1
- package/lib/types-esm/decorators/operations/redirect.d.ts +0 -52
- package/lib/types-esm/decorators/operations/returns.d.ts +0 -267
- package/lib/types-esm/decorators/operations/route.d.ts +0 -133
- package/lib/types-esm/decorators/operations/security.d.ts +0 -56
- package/lib/types-esm/decorators/operations/status.d.ts +0 -127
- package/lib/types-esm/decorators/operations/subscribe.d.ts +0 -1
- package/lib/types-esm/decorators/operations/summary.d.ts +0 -20
- package/lib/types-esm/decorators/operations/tags.d.ts +0 -23
- package/lib/types-esm/decorators/operations/view.d.ts +0 -23
- package/lib/types-esm/domain/DecoratorContext.d.ts +0 -28
- package/lib/types-esm/domain/JsonAliasMap.d.ts +0 -12
- package/lib/types-esm/domain/JsonClassStore.d.ts +0 -12
- package/lib/types-esm/domain/JsonDiscriminator.d.ts +0 -18
- package/lib/types-esm/domain/JsonEntityStore.d.ts +0 -110
- package/lib/types-esm/domain/JsonFormatTypes.d.ts +0 -17
- package/lib/types-esm/domain/JsonLazyRef.d.ts +0 -9
- package/lib/types-esm/domain/JsonMap.d.ts +0 -9
- package/lib/types-esm/domain/JsonMedia.d.ts +0 -11
- package/lib/types-esm/domain/JsonMethodStore.d.ts +0 -92
- package/lib/types-esm/domain/JsonOperation.d.ts +0 -51
- package/lib/types-esm/domain/JsonOperationPathsMap.d.ts +0 -7
- package/lib/types-esm/domain/JsonOperationRoute.d.ts +0 -25
- package/lib/types-esm/domain/JsonParameter.d.ts +0 -22
- package/lib/types-esm/domain/JsonParameterStore.d.ts +0 -52
- package/lib/types-esm/domain/JsonParameterTypes.d.ts +0 -16
- package/lib/types-esm/domain/JsonPropertyStore.d.ts +0 -32
- package/lib/types-esm/domain/JsonRequestBody.d.ts +0 -12
- package/lib/types-esm/domain/JsonResponse.d.ts +0 -18
- package/lib/types-esm/domain/JsonSchema.d.ts +0 -340
- package/lib/types-esm/domain/SpecTypes.d.ts +0 -6
- package/lib/types-esm/hooks/alterIgnore.d.ts +0 -10
- package/lib/types-esm/hooks/alterOneOf.d.ts +0 -3
- package/lib/types-esm/hooks/alterRequiredGroups.d.ts +0 -6
- package/lib/types-esm/index.d.ts +0 -182
- package/lib/types-esm/interfaces/IgnoreCallback.d.ts +0 -4
- package/lib/types-esm/interfaces/JsonHookContext.d.ts +0 -17
- package/lib/types-esm/interfaces/JsonOpenSpec.d.ts +0 -9
- package/lib/types-esm/interfaces/JsonSchemaOptions.d.ts +0 -30
- package/lib/types-esm/registries/JsonSchemaMapperContainer.d.ts +0 -21
- package/lib/types-esm/registries/enumRegistries.d.ts +0 -2
- package/lib/types-esm/utils/buildPath.d.ts +0 -6
- package/lib/types-esm/utils/concatParameters.d.ts +0 -4
- package/lib/types-esm/utils/concatPath.d.ts +0 -1
- package/lib/types-esm/utils/defineStatusModel.d.ts +0 -3
- package/lib/types-esm/utils/from.d.ts +0 -190
- package/lib/types-esm/utils/generateSpec.d.ts +0 -16
- package/lib/types-esm/utils/generics.d.ts +0 -50
- package/lib/types-esm/utils/getComputedType.d.ts +0 -5
- package/lib/types-esm/utils/getInheritedStores.d.ts +0 -8
- package/lib/types-esm/utils/getJsonEntityStore.d.ts +0 -15
- package/lib/types-esm/utils/getJsonPathParameters.d.ts +0 -7
- package/lib/types-esm/utils/getJsonSchema.d.ts +0 -4
- package/lib/types-esm/utils/getJsonType.d.ts +0 -5
- package/lib/types-esm/utils/getOperationsRoutes.d.ts +0 -10
- package/lib/types-esm/utils/getOperationsStores.d.ts +0 -6
- package/lib/types-esm/utils/getPropertiesStores.d.ts +0 -20
- package/lib/types-esm/utils/getSpec.d.ts +0 -34
- package/lib/types-esm/utils/getSpecType.d.ts +0 -12
- package/lib/types-esm/utils/isSuccessStatus.d.ts +0 -2
- package/lib/types-esm/utils/mapHeaders.d.ts +0 -9
- package/lib/types-esm/utils/mapOpenSpec.d.ts +0 -10
- package/lib/types-esm/utils/mapOpenSpec2.d.ts +0 -9
- package/lib/types-esm/utils/mapOpenSpec3.d.ts +0 -8
- package/lib/types-esm/utils/mapOpenSpecInfo.d.ts +0 -6
- package/lib/types-esm/utils/mapOperationOptions.d.ts +0 -5
- package/lib/types-esm/utils/matchGroups.d.ts +0 -4
- package/lib/types-esm/utils/mergeSpec.d.ts +0 -23
- package/lib/types-esm/utils/operationIdFormatter.d.ts +0 -6
- package/lib/types-esm/utils/ref.d.ts +0 -14
- package/lib/types-esm/utils/removeHiddenOperation.d.ts +0 -2
- package/lib/types-esm/utils/serializeEnumValues.d.ts +0 -5
- package/lib/types-esm/utils/somethingOf.d.ts +0 -1
- package/lib/types-esm/utils/toJsonMapCollection.d.ts +0 -7
- package/lib/types-esm/utils/toJsonRegex.d.ts +0 -5
- package/lib/types-esm/utils/transformToOS2.d.ts +0 -25
- package/lib/types-esm/utils/withErrorMsg.d.ts +0 -6
- /package/{webpack.config.js → webpack.config.cjs} +0 -0
package/lib/cjs/utils/ref.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toRef = exports.createRef = exports.createRefName = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const change_case_1 = require("change-case");
|
|
6
|
-
const SpecTypes_js_1 = require("../domain/SpecTypes.js");
|
|
7
|
-
/**
|
|
8
|
-
* ignore
|
|
9
|
-
* @param options
|
|
10
|
-
*/
|
|
11
|
-
function getHost(options) {
|
|
12
|
-
const { host = `#/${[SpecTypes_js_1.SpecTypes.OPENAPI, SpecTypes_js_1.SpecTypes.ASYNCAPI].includes(options.specType) ? "components/schemas" : "definitions"}` } = options;
|
|
13
|
-
return host;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @ignore
|
|
17
|
-
*/
|
|
18
|
-
function createRefName(name, options) {
|
|
19
|
-
if (options.groups && options.groups.length) {
|
|
20
|
-
return (0, change_case_1.pascalCase)(`${name} ${options.groupsName || options.groups.join(" ")}`);
|
|
21
|
-
}
|
|
22
|
-
return name;
|
|
23
|
-
}
|
|
24
|
-
exports.createRefName = createRefName;
|
|
25
|
-
/**
|
|
26
|
-
* @ignore
|
|
27
|
-
*/
|
|
28
|
-
function createRef(name, schema, options) {
|
|
29
|
-
const host = getHost(options);
|
|
30
|
-
const ref = {
|
|
31
|
-
$ref: `${host}/${name}`
|
|
32
|
-
};
|
|
33
|
-
const readOnly = schema.isReadOnly;
|
|
34
|
-
const writeOnly = schema.isWriteOnly;
|
|
35
|
-
return (0, core_1.cleanObject)({
|
|
36
|
-
readOnly: readOnly ? true : undefined,
|
|
37
|
-
writeOnly: writeOnly ? true : undefined,
|
|
38
|
-
...(readOnly || writeOnly
|
|
39
|
-
? {
|
|
40
|
-
anyOf: [ref]
|
|
41
|
-
}
|
|
42
|
-
: ref)
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
exports.createRef = createRef;
|
|
46
|
-
/**
|
|
47
|
-
* @ignore
|
|
48
|
-
*/
|
|
49
|
-
function toRef(value, schema, options) {
|
|
50
|
-
const name = createRefName(value.getName(), options);
|
|
51
|
-
(0, core_1.setValue)(options, `components.schemas.${name}`, schema);
|
|
52
|
-
return createRef(name, value, options);
|
|
53
|
-
}
|
|
54
|
-
exports.toRef = toRef;
|
|
55
|
-
//# sourceMappingURL=ref.js.map
|
package/lib/cjs/utils/ref.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ref.js","sourceRoot":"","sources":["../../../src/utils/ref.ts"],"names":[],"mappings":";;;AAAA,qCAAiD;AACjD,6CAAuC;AAEvC,yDAAiD;AAIjD;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA0B;IACzC,MAAM,EAAC,IAAI,GAAG,KAAK,CAAC,wBAAS,CAAC,OAAO,EAAE,wBAAS,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAS,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,aAAa,EAAE,EAAC,GAC9H,OAAO,CAAC;IAEV,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,IAAY,EAAE,OAA0B;IACpE,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE;QAC3C,OAAO,IAAA,wBAAU,EAAC,GAAG,IAAI,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;KAChF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAND,sCAMC;AAED;;GAEG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,MAAkB,EAAE,OAA0B;IACpF,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,MAAM,GAAG,GAAG;QACV,IAAI,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE;KACxB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;IACnC,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC;IAErC,OAAO,IAAA,kBAAW,EAAC;QACjB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QACrC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QACvC,GAAG,CAAC,QAAQ,IAAI,SAAS;YACvB,CAAC,CAAC;gBACE,KAAK,EAAE,CAAC,GAAG,CAAC;aACb;YACH,CAAC,CAAC,GAAG,CAAC;KACT,CAAC,CAAC;AACL,CAAC;AAlBD,8BAkBC;AAED;;GAEG;AACH,SAAgB,KAAK,CAAC,KAAiB,EAAE,MAAW,EAAE,OAA0B;IAC9E,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAErD,IAAA,eAAQ,EAAC,OAAO,EAAE,sBAAsB,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;IAExD,OAAO,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AAND,sBAMC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeHiddenOperation = void 0;
|
|
4
|
-
function removeHiddenOperation(operationStore) {
|
|
5
|
-
return !operationStore.store.get("hidden");
|
|
6
|
-
}
|
|
7
|
-
exports.removeHiddenOperation = removeHiddenOperation;
|
|
8
|
-
//# sourceMappingURL=removeHiddenOperation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"removeHiddenOperation.js","sourceRoot":"","sources":["../../../src/utils/removeHiddenOperation.ts"],"names":[],"mappings":";;;AAEA,SAAgB,qBAAqB,CAAC,cAA+B;IACnE,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC;AAFD,sDAEC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.serializeEnumValues = exports.serializeEnum = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const serializeEnum = (enumValue) => {
|
|
6
|
-
if ((0, core_1.isObject)(enumValue) && enumValue !== null) {
|
|
7
|
-
return Object.entries(enumValue).reduce((acc, [key, value]) => {
|
|
8
|
-
if (isNaN(+key)) {
|
|
9
|
-
return acc.concat(value);
|
|
10
|
-
}
|
|
11
|
-
return acc;
|
|
12
|
-
}, []);
|
|
13
|
-
}
|
|
14
|
-
return enumValue;
|
|
15
|
-
};
|
|
16
|
-
exports.serializeEnum = serializeEnum;
|
|
17
|
-
function serializeEnumValues(enumValues) {
|
|
18
|
-
const values = enumValues.reduce((acc, value) => acc.concat((0, exports.serializeEnum)(value)), []);
|
|
19
|
-
const getValue = (value) => {
|
|
20
|
-
return value === null ? "null" : typeof value;
|
|
21
|
-
};
|
|
22
|
-
const types = values.reduce((set, value) => set.add(getValue(value)), new Set());
|
|
23
|
-
return { values: (0, core_1.uniq)(values), types };
|
|
24
|
-
}
|
|
25
|
-
exports.serializeEnumValues = serializeEnumValues;
|
|
26
|
-
//# sourceMappingURL=serializeEnumValues.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serializeEnumValues.js","sourceRoot":"","sources":["../../../src/utils/serializeEnumValues.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAEnC,MAAM,aAAa,GAAG,CAAC,SAAc,EAAE,EAAE;IAC9C,IAAI,IAAA,eAAQ,EAAC,SAAS,CAAC,IAAI,SAAS,KAAK,IAAI,EAAE;QAC7C,OAAO,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,GAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,CAAM,EAAE,EAAE;YACtE,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,EAAE;gBACf,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aAC1B;YAED,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,EAAE,CAAC,CAAC;KACR;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAZW,QAAA,aAAa,iBAYxB;AAEF,SAAgB,mBAAmB,CAAC,UAAiB;IACnD,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEvF,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,EAAE;QAC9B,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC;IAChD,CAAC,CAAC;IAEF,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAa,EAAE,KAAU,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;IAEhG,OAAO,EAAC,MAAM,EAAE,IAAA,WAAI,EAAC,MAAM,CAAC,EAAE,KAAK,EAAC,CAAC;AACvC,CAAC;AAVD,kDAUC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeOf = void 0;
|
|
4
|
-
function makeOf(key, schemes) {
|
|
5
|
-
if (schemes.length) {
|
|
6
|
-
if (schemes.length === 1) {
|
|
7
|
-
return schemes[0];
|
|
8
|
-
}
|
|
9
|
-
else {
|
|
10
|
-
return { [key]: schemes };
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
exports.makeOf = makeOf;
|
|
16
|
-
//# sourceMappingURL=somethingOf.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"somethingOf.js","sourceRoot":"","sources":["../../../src/utils/somethingOf.ts"],"names":[],"mappings":";;;AAAA,SAAgB,MAAM,CAAC,GAAW,EAAE,OAAkB;IACpD,IAAI,OAAO,CAAC,MAAM,EAAE;QAClB,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YACxB,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;SACnB;aAAM;YACL,OAAO,EAAC,CAAC,GAAG,CAAC,EAAE,OAAO,EAAC,CAAC;SACzB;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAVD,wBAUC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toJsonMapCollection = void 0;
|
|
4
|
-
const JsonMap_js_1 = require("../domain/JsonMap.js");
|
|
5
|
-
/**
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
function toJsonMapCollection(content, klass = JsonMap_js_1.JsonMap) {
|
|
9
|
-
return Object.entries(content).reduce((content, [key, value]) => {
|
|
10
|
-
content.set(key, new klass(value));
|
|
11
|
-
return content;
|
|
12
|
-
}, new JsonMap_js_1.JsonMap());
|
|
13
|
-
}
|
|
14
|
-
exports.toJsonMapCollection = toJsonMapCollection;
|
|
15
|
-
//# sourceMappingURL=toJsonMapCollection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toJsonMapCollection.js","sourceRoot":"","sources":["../../../src/utils/toJsonMapCollection.ts"],"names":[],"mappings":";;;AAAA,qDAA6C;AAE7C;;GAEG;AACH,SAAgB,mBAAmB,CAAC,OAA6B,EAAE,KAAK,GAAG,oBAAO;IAChF,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9D,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QAEnC,OAAO,OAAO,CAAC;IACjB,CAAC,EAAE,IAAI,oBAAO,EAAO,CAAC,CAAC;AACzB,CAAC;AAND,kDAMC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toJsonRegex = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @ignore
|
|
6
|
-
* @param pattern
|
|
7
|
-
*/
|
|
8
|
-
function toJsonRegex(pattern) {
|
|
9
|
-
return String(pattern).replace(/^(\/)(.*)(\/)$/, "$2");
|
|
10
|
-
}
|
|
11
|
-
exports.toJsonRegex = toJsonRegex;
|
|
12
|
-
//# sourceMappingURL=toJsonRegex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toJsonRegex.js","sourceRoot":"","sources":["../../../src/utils/toJsonRegex.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,SAAgB,WAAW,CAAC,OAAwB;IAClD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;AACzD,CAAC;AAFD,kCAEC"}
|
|
@@ -1,509 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformToOS2 = exports.Converter = exports.transformInformation = exports.transformSecurity = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const HTTP_METHODS = ["get", "put", "post", "delete", "options", "head", "patch", "trace"];
|
|
6
|
-
const SCHEMA_PROPERTIES = [
|
|
7
|
-
"format",
|
|
8
|
-
"minimum",
|
|
9
|
-
"maximum",
|
|
10
|
-
"exclusiveMinimum",
|
|
11
|
-
"exclusiveMaximum",
|
|
12
|
-
"minLength",
|
|
13
|
-
"maxLength",
|
|
14
|
-
"multipleOf",
|
|
15
|
-
"minItems",
|
|
16
|
-
"maxItems",
|
|
17
|
-
"uniqueItems",
|
|
18
|
-
"minProperties",
|
|
19
|
-
"maxProperties",
|
|
20
|
-
"additionalProperties",
|
|
21
|
-
"pattern",
|
|
22
|
-
"enum",
|
|
23
|
-
"default"
|
|
24
|
-
];
|
|
25
|
-
const ARRAY_PROPERTIES = ["type", "items"];
|
|
26
|
-
const APPLICATION_JSON_REGEX = /^(application\/json|[^;\/ \t]+\/[^;\/ \t]+[+]json)[ \t]*(;.*)?$/;
|
|
27
|
-
const SUPPORTED_MIME_TYPES = {
|
|
28
|
-
APPLICATION_X_WWW_URLENCODED: "application/x-www-form-urlencoded",
|
|
29
|
-
MULTIPART_FORM_DATA: "multipart/form-data"
|
|
30
|
-
};
|
|
31
|
-
function fixRef(ref) {
|
|
32
|
-
return ref.replace("#/components/schemas/", "#/definitions/").replace("#/components/", "#/x-components/");
|
|
33
|
-
}
|
|
34
|
-
function fixRefs(obj) {
|
|
35
|
-
if (Array.isArray(obj)) {
|
|
36
|
-
obj.forEach(fixRefs);
|
|
37
|
-
}
|
|
38
|
-
else if (typeof obj === "object") {
|
|
39
|
-
for (let key in obj) {
|
|
40
|
-
if (key === "$ref") {
|
|
41
|
-
obj.$ref = fixRef(obj.$ref);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
fixRefs(obj[key]);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function isJsonMimeType(type) {
|
|
50
|
-
return new RegExp(APPLICATION_JSON_REGEX, "i").test(type);
|
|
51
|
-
}
|
|
52
|
-
function getSupportedMimeTypes(content) {
|
|
53
|
-
const MIME_VALUES = Object.keys(SUPPORTED_MIME_TYPES).map((key) => {
|
|
54
|
-
return SUPPORTED_MIME_TYPES[key];
|
|
55
|
-
});
|
|
56
|
-
return Object.keys(content).filter((key) => {
|
|
57
|
-
return MIME_VALUES.indexOf(key) > -1 || isJsonMimeType(key);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function transformSecurity(securitySchemes) {
|
|
61
|
-
function map(security) {
|
|
62
|
-
const { scheme, type, name, bearerFormat, flows, ...props } = security;
|
|
63
|
-
switch (type) {
|
|
64
|
-
case "http":
|
|
65
|
-
if (scheme === "basic") {
|
|
66
|
-
return {
|
|
67
|
-
...props,
|
|
68
|
-
type: scheme
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
if (scheme === "bearer") {
|
|
72
|
-
return {
|
|
73
|
-
...props,
|
|
74
|
-
type: "apiKey",
|
|
75
|
-
name: "Authorization",
|
|
76
|
-
in: "header"
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
break;
|
|
80
|
-
case "oauth2":
|
|
81
|
-
const flowName = Object.keys(flows)[0];
|
|
82
|
-
const flow = flows[flowName];
|
|
83
|
-
let flowType = flowName;
|
|
84
|
-
if (flowType === "clientCredentials") {
|
|
85
|
-
flowType = "application";
|
|
86
|
-
}
|
|
87
|
-
else if (flowType === "authorizationCode") {
|
|
88
|
-
flowType = "accessCode";
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
type,
|
|
92
|
-
flow: flowType,
|
|
93
|
-
authorizationUrl: flow.authorizationUrl,
|
|
94
|
-
tokenUrl: flow.tokenUrl,
|
|
95
|
-
scopes: flow.scopes
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return Object.entries(securitySchemes).reduce((securityDefinitions, [key, security]) => {
|
|
100
|
-
return {
|
|
101
|
-
...securityDefinitions,
|
|
102
|
-
[key]: map(security)
|
|
103
|
-
};
|
|
104
|
-
}, {});
|
|
105
|
-
}
|
|
106
|
-
exports.transformSecurity = transformSecurity;
|
|
107
|
-
function transformInformation(server) {
|
|
108
|
-
let serverUrl = server.url;
|
|
109
|
-
const variables = server["variables"] || {};
|
|
110
|
-
for (const variable in variables) {
|
|
111
|
-
const variableObject = variables[variable] || {};
|
|
112
|
-
if (variableObject["default"]) {
|
|
113
|
-
const re = RegExp(`{${variable}}`, "g");
|
|
114
|
-
serverUrl = serverUrl.replace(re, variableObject["default"]);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
const url = new URL(serverUrl);
|
|
118
|
-
return {
|
|
119
|
-
host: url.host ? url.host : undefined,
|
|
120
|
-
basePath: url.pathname,
|
|
121
|
-
schemes: url.protocol !== null ? [url.protocol.substring(0, url.protocol.length - 1)] : undefined
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
exports.transformInformation = transformInformation;
|
|
125
|
-
class Converter {
|
|
126
|
-
constructor(spec) {
|
|
127
|
-
this.spec = JSON.parse(JSON.stringify(spec));
|
|
128
|
-
}
|
|
129
|
-
convertInfos() {
|
|
130
|
-
const server = this.spec.servers && this.spec.servers[0];
|
|
131
|
-
if (server) {
|
|
132
|
-
return transformInformation(server);
|
|
133
|
-
}
|
|
134
|
-
return {};
|
|
135
|
-
}
|
|
136
|
-
resolveReference(base, obj, shouldClone) {
|
|
137
|
-
if (!obj || !obj.$ref) {
|
|
138
|
-
return obj;
|
|
139
|
-
}
|
|
140
|
-
const ref = obj.$ref;
|
|
141
|
-
if (ref.startsWith("#")) {
|
|
142
|
-
const keys = ref.split("/").map((k) => k.replace(/~1/g, "/").replace(/~0/g, "~"));
|
|
143
|
-
keys.shift();
|
|
144
|
-
let cur = base;
|
|
145
|
-
keys.forEach((k) => {
|
|
146
|
-
cur = cur[k];
|
|
147
|
-
});
|
|
148
|
-
return shouldClone ? JSON.parse(JSON.stringify(cur)) : cur;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
convert() {
|
|
152
|
-
const spec = {
|
|
153
|
-
swagger: "2.0",
|
|
154
|
-
...this.convertInfos(),
|
|
155
|
-
paths: this.spec.paths ? this.convertOperations(this.spec.paths, this.spec) : undefined
|
|
156
|
-
};
|
|
157
|
-
if (this.spec.components) {
|
|
158
|
-
this.convertSchemas();
|
|
159
|
-
this.convertSecurityDefinitions();
|
|
160
|
-
this.spec["x-components"] = this.spec.components;
|
|
161
|
-
delete this.spec.components;
|
|
162
|
-
fixRefs(this.spec);
|
|
163
|
-
}
|
|
164
|
-
delete this.spec.servers;
|
|
165
|
-
delete this.spec.openapi;
|
|
166
|
-
delete this.spec["x-components"];
|
|
167
|
-
return (0, core_1.cleanObject)({
|
|
168
|
-
...spec,
|
|
169
|
-
...this.spec
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
convertOperations(paths, spec) {
|
|
173
|
-
return Object.entries(paths).reduce((paths, [path, operation]) => {
|
|
174
|
-
const pathObject = (paths[path] = this.resolveReference({ ...spec, paths }, operation, true));
|
|
175
|
-
this.convertParameters(pathObject); // converts common parameters
|
|
176
|
-
Object.keys(pathObject).forEach((method) => {
|
|
177
|
-
if (HTTP_METHODS.indexOf(method) >= 0) {
|
|
178
|
-
const operation = (pathObject[method] = this.resolveReference({ ...spec, paths }, pathObject[method], true));
|
|
179
|
-
this.convertOperationParameters(operation);
|
|
180
|
-
this.convertResponses(operation);
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
return paths;
|
|
184
|
-
}, paths);
|
|
185
|
-
}
|
|
186
|
-
convertOperationParameters(operation) {
|
|
187
|
-
let content, contentKey, mediaRanges, mediaTypes;
|
|
188
|
-
operation.parameters = operation.parameters || [];
|
|
189
|
-
if (operation.requestBody) {
|
|
190
|
-
let param = this.resolveReference(this.spec, operation.requestBody, true);
|
|
191
|
-
// fixing external $ref in body
|
|
192
|
-
if (operation.requestBody.content) {
|
|
193
|
-
const type = getSupportedMimeTypes(operation.requestBody.content)[0];
|
|
194
|
-
const structuredObj = { content: {} };
|
|
195
|
-
const data = operation.requestBody.content[type];
|
|
196
|
-
if (data && data.schema && data.schema.$ref && !data.schema.$ref.startsWith("#")) {
|
|
197
|
-
param = this.resolveReference(this.spec, data.schema, true);
|
|
198
|
-
structuredObj["content"][`${type}`] = { schema: param };
|
|
199
|
-
param = structuredObj;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
param.name = "body";
|
|
203
|
-
content = param.content;
|
|
204
|
-
if (content && Object.keys(content).length) {
|
|
205
|
-
mediaRanges = Object.keys(content).filter((mediaRange) => mediaRange.indexOf("/") > 0);
|
|
206
|
-
mediaTypes = mediaRanges.filter((range) => range.indexOf("*") < 0);
|
|
207
|
-
contentKey = getSupportedMimeTypes(content)[0];
|
|
208
|
-
delete param.content;
|
|
209
|
-
if ([SUPPORTED_MIME_TYPES.APPLICATION_X_WWW_URLENCODED, SUPPORTED_MIME_TYPES.MULTIPART_FORM_DATA].includes(contentKey)) {
|
|
210
|
-
operation.consumes = mediaTypes;
|
|
211
|
-
param.in = "formData";
|
|
212
|
-
param.schema = content[contentKey].schema;
|
|
213
|
-
param.schema = this.resolveReference(this.spec, param.schema, true);
|
|
214
|
-
if (param.schema.type === "object" && param.schema.properties) {
|
|
215
|
-
const required = param.schema.required || [];
|
|
216
|
-
Object.keys(param.schema.properties).forEach((name) => {
|
|
217
|
-
const schema = param.schema.properties[name];
|
|
218
|
-
// readOnly properties should not be sent in requests
|
|
219
|
-
if (!schema.readOnly) {
|
|
220
|
-
const formDataParam = {
|
|
221
|
-
name,
|
|
222
|
-
in: "formData",
|
|
223
|
-
schema
|
|
224
|
-
};
|
|
225
|
-
if (required.indexOf(name) >= 0) {
|
|
226
|
-
formDataParam.required = true;
|
|
227
|
-
}
|
|
228
|
-
operation.parameters?.push(formDataParam);
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
operation.parameters.push(param);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
else if (contentKey) {
|
|
237
|
-
operation.consumes = mediaTypes;
|
|
238
|
-
param.in = "body";
|
|
239
|
-
param.schema = content[contentKey].schema;
|
|
240
|
-
operation.parameters.push(param);
|
|
241
|
-
}
|
|
242
|
-
else if (mediaRanges) {
|
|
243
|
-
operation.consumes = mediaTypes || ["application/octet-stream"];
|
|
244
|
-
param.in = "body";
|
|
245
|
-
param.name = param.name || "file";
|
|
246
|
-
delete param.type;
|
|
247
|
-
param.schema = content[mediaRanges[0]].schema || {
|
|
248
|
-
type: "string",
|
|
249
|
-
format: "binary"
|
|
250
|
-
};
|
|
251
|
-
operation.parameters.push(param);
|
|
252
|
-
}
|
|
253
|
-
if (param.schema) {
|
|
254
|
-
this.convertSchema(param.schema, "request");
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
delete operation.requestBody;
|
|
258
|
-
}
|
|
259
|
-
this.convertParameters(operation);
|
|
260
|
-
}
|
|
261
|
-
convertParameters(obj) {
|
|
262
|
-
if (obj.parameters === undefined) {
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
obj.parameters = obj.parameters || [];
|
|
266
|
-
(obj.parameters || []).forEach((param, i) => {
|
|
267
|
-
param = obj.parameters[i] = this.resolveReference(this.spec, param, false);
|
|
268
|
-
if (param.in !== "body") {
|
|
269
|
-
this.copySchemaProperties(param, SCHEMA_PROPERTIES);
|
|
270
|
-
this.copySchemaProperties(param, ARRAY_PROPERTIES);
|
|
271
|
-
this.copySchemaXProperties(param);
|
|
272
|
-
if (!param.description) {
|
|
273
|
-
const schema = this.resolveReference(this.spec, param.schema, false);
|
|
274
|
-
if (!!schema && schema.description) {
|
|
275
|
-
param.description = schema.description;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
if (param.example !== undefined) {
|
|
279
|
-
param["x-example"] = param.example;
|
|
280
|
-
}
|
|
281
|
-
delete param.schema;
|
|
282
|
-
delete param.allowReserved;
|
|
283
|
-
delete param.example;
|
|
284
|
-
}
|
|
285
|
-
if (param.type === "array") {
|
|
286
|
-
let style = param.style || (param.in === "query" || param.in === "cookie" ? "form" : "simple");
|
|
287
|
-
switch (style) {
|
|
288
|
-
case "matrix":
|
|
289
|
-
param.collectionFormat = param.explode ? undefined : "csv";
|
|
290
|
-
break;
|
|
291
|
-
case "label":
|
|
292
|
-
param.collectionFormat = undefined;
|
|
293
|
-
break;
|
|
294
|
-
case "simple":
|
|
295
|
-
param.collectionFormat = "csv";
|
|
296
|
-
break;
|
|
297
|
-
case "spaceDelimited":
|
|
298
|
-
param.collectionFormat = "ssv";
|
|
299
|
-
break;
|
|
300
|
-
case "pipeDelimited":
|
|
301
|
-
param.collectionFormat = "pipes";
|
|
302
|
-
break;
|
|
303
|
-
case "deepOpbject":
|
|
304
|
-
param.collectionFormat = "multi";
|
|
305
|
-
break;
|
|
306
|
-
case "form":
|
|
307
|
-
param.collectionFormat = param.explode === false ? "csv" : "multi";
|
|
308
|
-
break;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
delete param.style;
|
|
312
|
-
delete param.explode;
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
copySchemaProperties(obj, props) {
|
|
316
|
-
let schema = this.resolveReference(this.spec, obj.schema, true);
|
|
317
|
-
if (!schema) {
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
props.forEach((prop) => {
|
|
321
|
-
const value = schema[prop];
|
|
322
|
-
if (prop === "additionalProperties" && typeof value === "boolean") {
|
|
323
|
-
return;
|
|
324
|
-
}
|
|
325
|
-
if (value !== undefined) {
|
|
326
|
-
obj[prop] = value;
|
|
327
|
-
}
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
copySchemaXProperties(obj) {
|
|
331
|
-
let schema = this.resolveReference(this.spec, obj.schema, true);
|
|
332
|
-
if (!schema) {
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
Object.keys(schema).forEach((propName) => {
|
|
336
|
-
if (Reflect.hasOwnProperty.call(schema, propName) && !Reflect.hasOwnProperty.call(obj, propName) && propName.startsWith("x-")) {
|
|
337
|
-
obj[propName] = schema[propName];
|
|
338
|
-
}
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
convertResponses(operation) {
|
|
342
|
-
// var anySchema, code, content, jsonSchema, mediaRange, mediaType, response, resolved, headers
|
|
343
|
-
Object.keys(operation.responses || {}).forEach((code) => {
|
|
344
|
-
const response = (operation.responses[code] = this.resolveReference(this.spec, operation.responses[code], true));
|
|
345
|
-
if (response.content) {
|
|
346
|
-
let anySchema = null;
|
|
347
|
-
let jsonSchema = null;
|
|
348
|
-
Object.keys(response.content).forEach((mediaRange) => {
|
|
349
|
-
// produces and examples only allow media types, not ranges
|
|
350
|
-
// use application/octet-stream as a catch-all type
|
|
351
|
-
const mediaType = mediaRange.indexOf("*") < 0 ? mediaRange : "application/octet-stream";
|
|
352
|
-
if (!operation.produces) {
|
|
353
|
-
operation.produces = [mediaType];
|
|
354
|
-
}
|
|
355
|
-
else if (operation.produces.indexOf(mediaType) < 0) {
|
|
356
|
-
operation.produces.push(mediaType);
|
|
357
|
-
}
|
|
358
|
-
const content = response.content[mediaRange];
|
|
359
|
-
anySchema = anySchema || content.schema;
|
|
360
|
-
if (!jsonSchema && isJsonMimeType(mediaType)) {
|
|
361
|
-
jsonSchema = content.schema;
|
|
362
|
-
}
|
|
363
|
-
if (content.example) {
|
|
364
|
-
response.examples = response.examples || {};
|
|
365
|
-
response.examples[mediaType] = content.example;
|
|
366
|
-
}
|
|
367
|
-
});
|
|
368
|
-
if (anySchema) {
|
|
369
|
-
response.schema = jsonSchema || anySchema;
|
|
370
|
-
const resolved = this.resolveReference(this.spec, response.schema, true);
|
|
371
|
-
if (resolved && response.schema.$ref && !response.schema.$ref.startsWith("#")) {
|
|
372
|
-
response.schema = resolved;
|
|
373
|
-
}
|
|
374
|
-
this.convertSchema(response.schema, "response");
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
Object.keys(response.headers || {}).forEach((header) => {
|
|
378
|
-
// Always resolve headers when converting to v2.
|
|
379
|
-
const resolved = this.resolveReference(this.spec, response.headers[header], true);
|
|
380
|
-
// Headers should be converted like parameters.
|
|
381
|
-
if (resolved.schema) {
|
|
382
|
-
resolved.type = resolved.schema.type;
|
|
383
|
-
resolved.format = resolved.schema.format;
|
|
384
|
-
delete resolved.schema;
|
|
385
|
-
}
|
|
386
|
-
response.headers[header] = resolved;
|
|
387
|
-
});
|
|
388
|
-
delete response.content;
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
convertSchema(def, operationDirection) {
|
|
392
|
-
if (def.oneOf) {
|
|
393
|
-
delete def.oneOf;
|
|
394
|
-
if (def.discriminator) {
|
|
395
|
-
delete def.discriminator;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
if (def.anyOf) {
|
|
399
|
-
delete def.anyOf;
|
|
400
|
-
if (def.discriminator) {
|
|
401
|
-
delete def.discriminator;
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
if (def.allOf) {
|
|
405
|
-
for (const i in def.allOf) {
|
|
406
|
-
this.convertSchema(def.allOf[i], operationDirection);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
if (def.discriminator) {
|
|
410
|
-
if (def.discriminator.mapping) {
|
|
411
|
-
this.convertDiscriminatorMapping(def.discriminator.mapping);
|
|
412
|
-
}
|
|
413
|
-
def.discriminator = def.discriminator.propertyName;
|
|
414
|
-
}
|
|
415
|
-
switch (def.type) {
|
|
416
|
-
case "object":
|
|
417
|
-
if (def.properties) {
|
|
418
|
-
Object.keys(def.properties).forEach((propName) => {
|
|
419
|
-
if (def.properties[propName].writeOnly === true && operationDirection === "response") {
|
|
420
|
-
delete def.properties[propName];
|
|
421
|
-
}
|
|
422
|
-
else {
|
|
423
|
-
this.convertSchema(def.properties[propName], operationDirection);
|
|
424
|
-
delete def.properties[propName].writeOnly;
|
|
425
|
-
}
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
break;
|
|
429
|
-
case "array":
|
|
430
|
-
if (def.items) {
|
|
431
|
-
this.convertSchema(def.items, operationDirection);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
if (def.nullable) {
|
|
435
|
-
def["x-nullable"] = true;
|
|
436
|
-
delete def.nullable;
|
|
437
|
-
}
|
|
438
|
-
// OpenAPI 3 has boolean "deprecated" on Schema, OpenAPI 2 does not
|
|
439
|
-
// Convert to x-deprecated for Autorest (and perhaps others)
|
|
440
|
-
if (def["deprecated"] !== undefined) {
|
|
441
|
-
// Move to x-deprecated, unless it is already defined
|
|
442
|
-
if (def["x-deprecated"] === undefined) {
|
|
443
|
-
def["x-deprecated"] = def.deprecated;
|
|
444
|
-
}
|
|
445
|
-
delete def.deprecated;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
convertSchemas() {
|
|
449
|
-
this.spec.definitions = this.spec.components.schemas;
|
|
450
|
-
Object.keys(this.spec.definitions || {}).forEach((defName) => {
|
|
451
|
-
this.convertSchema(this.spec.definitions[defName]);
|
|
452
|
-
});
|
|
453
|
-
delete this.spec.components.schemas;
|
|
454
|
-
}
|
|
455
|
-
convertDiscriminatorMapping(mapping) {
|
|
456
|
-
Object.keys(mapping).forEach((payload) => {
|
|
457
|
-
const schemaNameOrRef = mapping[payload];
|
|
458
|
-
if (typeof schemaNameOrRef !== "string") {
|
|
459
|
-
console.warn(`Ignoring ${schemaNameOrRef} for ${payload} in discriminator.mapping.`);
|
|
460
|
-
return;
|
|
461
|
-
}
|
|
462
|
-
// payload may be a schema name or JSON Reference string.
|
|
463
|
-
// OAS3 spec limits schema names to ^[a-zA-Z0-9._-]+$
|
|
464
|
-
// Note: Valid schema name could be JSON file name without extension.
|
|
465
|
-
// Prefer schema name, with file name as fallback.
|
|
466
|
-
let schema;
|
|
467
|
-
if (/^[a-zA-Z0-9._-]+$/.test(schemaNameOrRef)) {
|
|
468
|
-
try {
|
|
469
|
-
schema = this.resolveReference(this.spec, { $ref: `#/components/schemas/${schemaNameOrRef}` }, false);
|
|
470
|
-
}
|
|
471
|
-
catch (err) {
|
|
472
|
-
console.debug(`Error resolving ${schemaNameOrRef} for ${payload} as schema name in discriminator.mapping: ${err}`);
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
// schemaNameRef is not a schema name. Try to resolve as JSON Ref.
|
|
476
|
-
if (!schema) {
|
|
477
|
-
try {
|
|
478
|
-
schema = this.resolveReference(this.spec, { $ref: schemaNameOrRef }, false);
|
|
479
|
-
}
|
|
480
|
-
catch (err) {
|
|
481
|
-
console.debug(`Error resolving ${schemaNameOrRef} for ${payload} in discriminator.mapping: ${err}`);
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
if (schema) {
|
|
485
|
-
// Swagger Codegen + OpenAPI Generator extension
|
|
486
|
-
// https://github.com/swagger-api/swagger-codegen/pull/4252
|
|
487
|
-
schema["x-discriminator-value"] = payload;
|
|
488
|
-
// AutoRest extension
|
|
489
|
-
// https://github.com/Azure/autorest/pull/474
|
|
490
|
-
schema["x-ms-discriminator-value"] = payload;
|
|
491
|
-
}
|
|
492
|
-
else {
|
|
493
|
-
console.warn(`Unable to resolve ${schemaNameOrRef} for ${payload} in discriminator.mapping.`);
|
|
494
|
-
}
|
|
495
|
-
});
|
|
496
|
-
}
|
|
497
|
-
convertSecurityDefinitions() {
|
|
498
|
-
if (this.spec.components.securitySchemes) {
|
|
499
|
-
this.spec.securityDefinitions = transformSecurity(this.spec.components.securitySchemes);
|
|
500
|
-
delete this.spec.components.securitySchemes;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
exports.Converter = Converter;
|
|
505
|
-
function transformToOS2(spec) {
|
|
506
|
-
return new Converter(spec).convert();
|
|
507
|
-
}
|
|
508
|
-
exports.transformToOS2 = transformToOS2;
|
|
509
|
-
//# sourceMappingURL=transformToOS2.js.map
|