@tsed/schema 7.83.3 → 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 +24 -20
- 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
|
@@ -1,822 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JsonSchema = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const enumRegistries_js_1 = require("../registries/enumRegistries.js");
|
|
6
|
-
const JsonSchemaMapperContainer_js_1 = require("../registries/JsonSchemaMapperContainer.js");
|
|
7
|
-
const getComputedType_js_1 = require("../utils/getComputedType.js");
|
|
8
|
-
const getJsonType_js_1 = require("../utils/getJsonType.js");
|
|
9
|
-
const serializeEnumValues_js_1 = require("../utils/serializeEnumValues.js");
|
|
10
|
-
const toJsonRegex_js_1 = require("../utils/toJsonRegex.js");
|
|
11
|
-
const JsonDiscriminator_js_1 = require("./JsonDiscriminator.js");
|
|
12
|
-
const JsonEntityStore_js_1 = require("./JsonEntityStore.js");
|
|
13
|
-
function mapProperties(properties) {
|
|
14
|
-
// istanbul ignore next
|
|
15
|
-
if (properties instanceof JsonSchema) {
|
|
16
|
-
return properties;
|
|
17
|
-
}
|
|
18
|
-
return Object.entries(properties).reduce((properties, [key, schema]) => {
|
|
19
|
-
properties[(0, toJsonRegex_js_1.toJsonRegex)(key)] = mapToJsonSchema(schema);
|
|
20
|
-
return properties;
|
|
21
|
-
}, {});
|
|
22
|
-
}
|
|
23
|
-
function mapToJsonSchema(item) {
|
|
24
|
-
if ((0, core_1.isArray)(item)) {
|
|
25
|
-
return item.map(mapToJsonSchema);
|
|
26
|
-
}
|
|
27
|
-
if (item.isStore || item.$isJsonDocument || item.isLazyRef) {
|
|
28
|
-
return item;
|
|
29
|
-
}
|
|
30
|
-
if ((0, core_1.classOf)(item) !== Object && (0, core_1.isClass)(item)) {
|
|
31
|
-
return JsonEntityStore_js_1.JsonEntityStore.from(item).schema;
|
|
32
|
-
}
|
|
33
|
-
if ((0, core_1.isObject)(item)) {
|
|
34
|
-
return JsonSchema.from(item);
|
|
35
|
-
}
|
|
36
|
-
if ((0, core_1.isPrimitiveClass)(item)) {
|
|
37
|
-
return JsonSchema.from({ type: item });
|
|
38
|
-
}
|
|
39
|
-
return item;
|
|
40
|
-
}
|
|
41
|
-
class JsonSchema extends Map {
|
|
42
|
-
#nullable;
|
|
43
|
-
#discriminator;
|
|
44
|
-
#genericLabels;
|
|
45
|
-
#nestedGenerics;
|
|
46
|
-
#alias;
|
|
47
|
-
#itemSchema;
|
|
48
|
-
#target;
|
|
49
|
-
#isGeneric;
|
|
50
|
-
#isCollection;
|
|
51
|
-
#ref;
|
|
52
|
-
constructor(obj = {}) {
|
|
53
|
-
super();
|
|
54
|
-
this.$kind = "schema";
|
|
55
|
-
this.$isJsonDocument = true;
|
|
56
|
-
this.$hooks = new core_1.Hooks();
|
|
57
|
-
this.$required = new Set();
|
|
58
|
-
this.$allow = [];
|
|
59
|
-
this.$forwardGroups = false;
|
|
60
|
-
this.$ignore = false;
|
|
61
|
-
this.isDiscriminatorKey = false;
|
|
62
|
-
this.isDiscriminator = false;
|
|
63
|
-
this.#nullable = false;
|
|
64
|
-
this.#discriminator = null;
|
|
65
|
-
this.#nestedGenerics = [];
|
|
66
|
-
this.#alias = new Map();
|
|
67
|
-
this.#isGeneric = false;
|
|
68
|
-
this.#isCollection = false;
|
|
69
|
-
this.#ref = false;
|
|
70
|
-
if (obj) {
|
|
71
|
-
this.assign(obj);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
get alias() {
|
|
75
|
-
return this.#alias;
|
|
76
|
-
}
|
|
77
|
-
get nestedGenerics() {
|
|
78
|
-
return this.#nestedGenerics;
|
|
79
|
-
}
|
|
80
|
-
set nestedGenerics(value) {
|
|
81
|
-
this.#nestedGenerics = value;
|
|
82
|
-
}
|
|
83
|
-
get genericLabels() {
|
|
84
|
-
return this.#genericLabels;
|
|
85
|
-
}
|
|
86
|
-
set genericLabels(value) {
|
|
87
|
-
this.#genericLabels = value;
|
|
88
|
-
}
|
|
89
|
-
get isClass() {
|
|
90
|
-
return (0, core_1.isClass)(this.class) && ![Map, Array, Set, Object, Date, Boolean, Number, String].includes(this.#target);
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Current schema is a collection
|
|
94
|
-
*/
|
|
95
|
-
get isCollection() {
|
|
96
|
-
return this.#isCollection;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Current schema is a generic
|
|
100
|
-
*/
|
|
101
|
-
get isGeneric() {
|
|
102
|
-
return this.#isGeneric;
|
|
103
|
-
}
|
|
104
|
-
get discriminatorAncestor() {
|
|
105
|
-
const ancestors = (0, core_1.ancestorsOf)(this.#target);
|
|
106
|
-
const ancestor = ancestors.find((ancestor) => JsonEntityStore_js_1.JsonEntityStore.from(ancestor).schema.isDiscriminator);
|
|
107
|
-
return ancestor && JsonEntityStore_js_1.JsonEntityStore.from(ancestor).schema;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Current schema has generics items
|
|
111
|
-
*/
|
|
112
|
-
get hasGenerics() {
|
|
113
|
-
return !!(this.nestedGenerics && this.nestedGenerics.length);
|
|
114
|
-
}
|
|
115
|
-
get genericType() {
|
|
116
|
-
return this.get("$ref");
|
|
117
|
-
}
|
|
118
|
-
get class() {
|
|
119
|
-
return this.getComputedType();
|
|
120
|
-
}
|
|
121
|
-
get canRef() {
|
|
122
|
-
return this.#ref;
|
|
123
|
-
}
|
|
124
|
-
get isNullable() {
|
|
125
|
-
return this.#nullable;
|
|
126
|
-
}
|
|
127
|
-
get isReadOnly() {
|
|
128
|
-
return this.get("readOnly");
|
|
129
|
-
}
|
|
130
|
-
get isWriteOnly() {
|
|
131
|
-
return this.get("writeOnly");
|
|
132
|
-
}
|
|
133
|
-
get hasDiscriminator() {
|
|
134
|
-
return !!this.#discriminator;
|
|
135
|
-
}
|
|
136
|
-
static from(obj = {}) {
|
|
137
|
-
return new JsonSchema(obj);
|
|
138
|
-
}
|
|
139
|
-
nullable(value) {
|
|
140
|
-
this.#nullable = value;
|
|
141
|
-
}
|
|
142
|
-
itemSchema(obj = {}) {
|
|
143
|
-
this.#itemSchema = this.#itemSchema || mapToJsonSchema(obj);
|
|
144
|
-
this.#itemSchema.assign(obj);
|
|
145
|
-
return this.#itemSchema;
|
|
146
|
-
}
|
|
147
|
-
getAliasOf(property) {
|
|
148
|
-
return this.#alias.get(property);
|
|
149
|
-
}
|
|
150
|
-
addAlias(property, alias) {
|
|
151
|
-
this.#alias.set(property, alias);
|
|
152
|
-
this.#alias.set(alias, property);
|
|
153
|
-
return this;
|
|
154
|
-
}
|
|
155
|
-
removeAlias(property) {
|
|
156
|
-
const alias = this.#alias.get(property);
|
|
157
|
-
alias && this.#alias.delete(alias);
|
|
158
|
-
this.#alias.delete(property);
|
|
159
|
-
return this;
|
|
160
|
-
}
|
|
161
|
-
$id($id) {
|
|
162
|
-
super.set("$id", $id);
|
|
163
|
-
return this;
|
|
164
|
-
}
|
|
165
|
-
$ref($ref) {
|
|
166
|
-
super.set("$ref", $ref);
|
|
167
|
-
return this;
|
|
168
|
-
}
|
|
169
|
-
$schema($schema) {
|
|
170
|
-
super.set("$schema", $schema);
|
|
171
|
-
return this;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Create a ref and use name to sharing schema
|
|
175
|
-
* @param name
|
|
176
|
-
*/
|
|
177
|
-
label(name) {
|
|
178
|
-
this.#ref = true;
|
|
179
|
-
super.set("name", name);
|
|
180
|
-
return this;
|
|
181
|
-
}
|
|
182
|
-
name(name) {
|
|
183
|
-
super.set("name", name);
|
|
184
|
-
return this;
|
|
185
|
-
}
|
|
186
|
-
ignore(cb) {
|
|
187
|
-
if (typeof cb !== "boolean") {
|
|
188
|
-
this.$hooks.on("ignore", cb);
|
|
189
|
-
}
|
|
190
|
-
this.$ignore = cb;
|
|
191
|
-
return this;
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* This keyword can be used to supply a default JSON value associated with a particular schema.
|
|
195
|
-
* It is RECOMMENDED that a default value be valid against the associated schema.
|
|
196
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3
|
|
197
|
-
*/
|
|
198
|
-
default(value) {
|
|
199
|
-
super.set("default", value);
|
|
200
|
-
return this;
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* More readible form of a one-element "enum"
|
|
204
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24
|
|
205
|
-
*/
|
|
206
|
-
const(value) {
|
|
207
|
-
super.set("const", value);
|
|
208
|
-
return this;
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* This attribute is a string that provides a full description of the of purpose the instance property.
|
|
212
|
-
*
|
|
213
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
|
|
214
|
-
*/
|
|
215
|
-
description(description) {
|
|
216
|
-
super.set("description", description);
|
|
217
|
-
return this;
|
|
218
|
-
}
|
|
219
|
-
discriminator() {
|
|
220
|
-
this.isDiscriminator = true;
|
|
221
|
-
return (this.#discriminator =
|
|
222
|
-
this.#discriminator ||
|
|
223
|
-
new JsonDiscriminator_js_1.Discriminator({
|
|
224
|
-
base: this.#target
|
|
225
|
-
}));
|
|
226
|
-
}
|
|
227
|
-
discriminatorKey(propertyName) {
|
|
228
|
-
this.discriminator().propertyName = propertyName;
|
|
229
|
-
this.isDiscriminator = true;
|
|
230
|
-
return this;
|
|
231
|
-
}
|
|
232
|
-
discriminatorValue(...values) {
|
|
233
|
-
const discriminator = this.discriminatorAncestor.discriminator();
|
|
234
|
-
discriminator.add(this.#target, values);
|
|
235
|
-
this.isDiscriminator = true;
|
|
236
|
-
const properties = this.get("properties");
|
|
237
|
-
const schema = properties[discriminator.propertyName] ||
|
|
238
|
-
new JsonSchema({
|
|
239
|
-
type: "string"
|
|
240
|
-
});
|
|
241
|
-
if (values.length === 1) {
|
|
242
|
-
schema.const(values[0]);
|
|
243
|
-
schema.examples([values[0]]);
|
|
244
|
-
}
|
|
245
|
-
else {
|
|
246
|
-
schema.enum(...values);
|
|
247
|
-
schema.examples(values);
|
|
248
|
-
}
|
|
249
|
-
properties[discriminator.propertyName] = schema;
|
|
250
|
-
this.set("properties", properties);
|
|
251
|
-
return this;
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
|
|
255
|
-
* If "items" is an array of schemas, validation succeeds if every instance element
|
|
256
|
-
* at a position greater than the size of "items" validates against "additionalItems".
|
|
257
|
-
* Otherwise, "additionalItems" MUST be ignored, as the "items" schema
|
|
258
|
-
* (possibly the default value of an empty schema) is applied to all elements.
|
|
259
|
-
* Omitting this keyword has the same behavior as an empty schema.
|
|
260
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10
|
|
261
|
-
*/
|
|
262
|
-
additionalItems(additionalItems) {
|
|
263
|
-
super.set("additionalItems", mapToJsonSchema(additionalItems));
|
|
264
|
-
return this;
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* An array instance is valid against "contains" if at least one of its elements is valid against the given schema.
|
|
268
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14
|
|
269
|
-
*/
|
|
270
|
-
contains(contains) {
|
|
271
|
-
super.set("contains", mapToJsonSchema(contains));
|
|
272
|
-
return this;
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword
|
|
276
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4
|
|
277
|
-
*/
|
|
278
|
-
examples(examples) {
|
|
279
|
-
super.set("examples", examples);
|
|
280
|
-
return this;
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword
|
|
284
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4
|
|
285
|
-
*/
|
|
286
|
-
example(...examples) {
|
|
287
|
-
return this.examples(examples);
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
|
|
291
|
-
* Omitting this keyword has the same behavior as an empty schema.
|
|
292
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9
|
|
293
|
-
*/
|
|
294
|
-
items(items) {
|
|
295
|
-
super.set("items", (this.#itemSchema = mapToJsonSchema(items)));
|
|
296
|
-
return this;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Must be a non-negative integer.
|
|
300
|
-
* An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword.
|
|
301
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11
|
|
302
|
-
*/
|
|
303
|
-
maxItems(maxItems) {
|
|
304
|
-
super.set("maxItems", maxItems);
|
|
305
|
-
return this;
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Must be a non-negative integer.
|
|
309
|
-
* An array instance is valid against "maxItems" if its size is greater than, or equal to, the value of this keyword.
|
|
310
|
-
* Omitting this keyword has the same behavior as a value of 0.
|
|
311
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12
|
|
312
|
-
*/
|
|
313
|
-
minItems(minItems) {
|
|
314
|
-
super.set("minItems", minItems);
|
|
315
|
-
return this;
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* If this keyword has boolean value false, the instance validates successfully.
|
|
319
|
-
* If it has boolean value true, the instance validates successfully if all of its elements are unique.
|
|
320
|
-
* Omitting this keyword has the same behavior as a value of false.
|
|
321
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13
|
|
322
|
-
*/
|
|
323
|
-
uniqueItems(uniqueItems) {
|
|
324
|
-
super.set("uniqueItems", uniqueItems);
|
|
325
|
-
return this;
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Must be a non-negative integer.
|
|
329
|
-
* An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword.
|
|
330
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15
|
|
331
|
-
*/
|
|
332
|
-
maxProperties(maxProperties) {
|
|
333
|
-
super.set("maxProperties", maxProperties);
|
|
334
|
-
return this;
|
|
335
|
-
}
|
|
336
|
-
/**
|
|
337
|
-
* Must be a non-negative integer.
|
|
338
|
-
* An object instance is valid against "maxProperties" if its number of properties is greater than,
|
|
339
|
-
* or equal to, the value of this keyword.
|
|
340
|
-
* Omitting this keyword has the same behavior as a value of 0.
|
|
341
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16
|
|
342
|
-
*/
|
|
343
|
-
minProperties(minProperties) {
|
|
344
|
-
super.set("minProperties", minProperties);
|
|
345
|
-
return this;
|
|
346
|
-
}
|
|
347
|
-
allow(...allow) {
|
|
348
|
-
if ([].concat(this.getJsonType()).includes("string") && !this.has("minLength")) {
|
|
349
|
-
this.minLength(1);
|
|
350
|
-
}
|
|
351
|
-
allow.forEach((value) => {
|
|
352
|
-
switch (value) {
|
|
353
|
-
case "":
|
|
354
|
-
this.set("minLength", undefined);
|
|
355
|
-
break;
|
|
356
|
-
case null:
|
|
357
|
-
this.any(...["null"].concat(this.getJsonType(), this.$allow.map((v) => typeof v)));
|
|
358
|
-
break;
|
|
359
|
-
}
|
|
360
|
-
});
|
|
361
|
-
this.$allow.push(...allow);
|
|
362
|
-
return this;
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* Elements of this array must be unique.
|
|
366
|
-
* An object instance is valid against this keyword if every item in the array is the name of a property in the instance.
|
|
367
|
-
* Omitting this keyword has the same behavior as an empty array.
|
|
368
|
-
*
|
|
369
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17
|
|
370
|
-
*/
|
|
371
|
-
required(required = true) {
|
|
372
|
-
if ((0, core_1.isArray)(required)) {
|
|
373
|
-
this.$required.clear();
|
|
374
|
-
required.forEach((value) => this.$required.add(value));
|
|
375
|
-
}
|
|
376
|
-
else {
|
|
377
|
-
const schema = this.clone();
|
|
378
|
-
schema.$selfRequired = required;
|
|
379
|
-
if ([].concat(schema.getJsonType()).includes("string")) {
|
|
380
|
-
schema.minLength(1);
|
|
381
|
-
}
|
|
382
|
-
return schema;
|
|
383
|
-
}
|
|
384
|
-
return this;
|
|
385
|
-
}
|
|
386
|
-
addRequired(property) {
|
|
387
|
-
this.$required.add(property);
|
|
388
|
-
return this;
|
|
389
|
-
}
|
|
390
|
-
removeRequired(property) {
|
|
391
|
-
this.$required.delete(property);
|
|
392
|
-
return this;
|
|
393
|
-
}
|
|
394
|
-
isRequired(property) {
|
|
395
|
-
return this.$required.has(property);
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.
|
|
399
|
-
* Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,
|
|
400
|
-
* the child instance for that name successfully validates against the corresponding schema.
|
|
401
|
-
* Omitting this keyword has the same behavior as an empty object.
|
|
402
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18
|
|
403
|
-
*/
|
|
404
|
-
properties(properties) {
|
|
405
|
-
super.set("properties", mapProperties(properties));
|
|
406
|
-
return this;
|
|
407
|
-
}
|
|
408
|
-
addProperty(key, schema) {
|
|
409
|
-
const properties = this.get("properties") || {};
|
|
410
|
-
properties[key] = schema;
|
|
411
|
-
super.set("properties", mapProperties(properties));
|
|
412
|
-
return this;
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
* This attribute is an object that defines the schema for a set of property names of an object instance.
|
|
416
|
-
* The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema.
|
|
417
|
-
* If the pattern matches the name of a property on the instance object, the value of the instance's property
|
|
418
|
-
* MUST be valid against the pattern name's schema value.
|
|
419
|
-
* Omitting this keyword has the same behavior as an empty object.
|
|
420
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19
|
|
421
|
-
*/
|
|
422
|
-
patternProperties(patternProperties) {
|
|
423
|
-
super.set("patternProperties", mapProperties(patternProperties));
|
|
424
|
-
return this;
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* This attribute defines a schema for all properties that are not explicitly defined in an object type definition.
|
|
428
|
-
* If specified, the value MUST be a schema or a boolean.
|
|
429
|
-
* If false is provided, no additional properties are allowed beyond the properties defined in the schema.
|
|
430
|
-
* The default value is an empty schema which allows any value for additional properties.
|
|
431
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20
|
|
432
|
-
*/
|
|
433
|
-
additionalProperties(additionalProperties) {
|
|
434
|
-
super.set("additionalProperties", mapToJsonSchema(additionalProperties));
|
|
435
|
-
return this;
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* This attribute defines a schema for all properties that are not explicitly defined in an object type definition.
|
|
439
|
-
* If specified, the value MUST be a schema or a boolean.
|
|
440
|
-
* If false is provided, no additional properties are allowed beyond the properties defined in the schema.
|
|
441
|
-
* The default value is an empty schema which allows any value for additional properties.
|
|
442
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20
|
|
443
|
-
* @alias additionalProperties
|
|
444
|
-
* @param unknown
|
|
445
|
-
*/
|
|
446
|
-
unknown(unknown = true) {
|
|
447
|
-
return this.additionalProperties(unknown);
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* This keyword specifies rules that are evaluated if the instance is an object and contains a certain property.
|
|
451
|
-
* Each property specifies a dependency.
|
|
452
|
-
* If the dependency value is an array, each element in the array must be unique.
|
|
453
|
-
* Omitting this keyword has the same behavior as an empty object.
|
|
454
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21
|
|
455
|
-
*/
|
|
456
|
-
dependencies(dependencies) {
|
|
457
|
-
super.set("dependencies", mapProperties(dependencies));
|
|
458
|
-
return this;
|
|
459
|
-
}
|
|
460
|
-
/**
|
|
461
|
-
* Takes a schema which validates the names of all properties rather than their values.
|
|
462
|
-
* Note the property name that the schema is testing will always be a string.
|
|
463
|
-
* Omitting this keyword has the same behavior as an empty schema.
|
|
464
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22
|
|
465
|
-
*/
|
|
466
|
-
propertyNames(propertyNames) {
|
|
467
|
-
super.set("propertyNames", mapToJsonSchema(propertyNames));
|
|
468
|
-
return this;
|
|
469
|
-
}
|
|
470
|
-
enum(enumValue, ...enumValues) {
|
|
471
|
-
if (enumRegistries_js_1.enumsRegistry.has(enumValue)) {
|
|
472
|
-
return this.enum(enumRegistries_js_1.enumsRegistry.get(enumValue));
|
|
473
|
-
}
|
|
474
|
-
if (enumValue instanceof JsonSchema) {
|
|
475
|
-
if (enumValue.getName()) {
|
|
476
|
-
super.set("enum", enumValue);
|
|
477
|
-
}
|
|
478
|
-
else {
|
|
479
|
-
super.set("enum", enumValue.get("enum")).any(...enumValue.get("enum").map((value) => typeof value));
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
else {
|
|
483
|
-
const { values, types } = (0, serializeEnumValues_js_1.serializeEnumValues)([enumValue, enumValues].flat());
|
|
484
|
-
super.set("enum", values).any(...types);
|
|
485
|
-
}
|
|
486
|
-
return this;
|
|
487
|
-
}
|
|
488
|
-
/**
|
|
489
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1
|
|
490
|
-
*/
|
|
491
|
-
definitions(definitions) {
|
|
492
|
-
super.set("definitions", mapProperties(definitions));
|
|
493
|
-
return this;
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
|
|
497
|
-
*/
|
|
498
|
-
allOf(allOf) {
|
|
499
|
-
this.setManyOf("allOf", allOf);
|
|
500
|
-
return this;
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
|
|
504
|
-
*/
|
|
505
|
-
anyOf(anyOf) {
|
|
506
|
-
this.setManyOf("anyOf", anyOf);
|
|
507
|
-
return this;
|
|
508
|
-
}
|
|
509
|
-
/*
|
|
510
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
|
|
511
|
-
*/
|
|
512
|
-
oneOf(oneOf) {
|
|
513
|
-
this.setManyOf("oneOf", oneOf);
|
|
514
|
-
return this;
|
|
515
|
-
}
|
|
516
|
-
/**
|
|
517
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29
|
|
518
|
-
*/
|
|
519
|
-
not(not) {
|
|
520
|
-
super.set("not", mapToJsonSchema(not));
|
|
521
|
-
return this;
|
|
522
|
-
}
|
|
523
|
-
/**
|
|
524
|
-
* Must be strictly greater than 0.
|
|
525
|
-
* A numeric instance is valid only if division by this keyword's value results in an integer.
|
|
526
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1
|
|
527
|
-
*/
|
|
528
|
-
multipleOf(multipleOf) {
|
|
529
|
-
super.set("multipleOf", multipleOf);
|
|
530
|
-
return this;
|
|
531
|
-
}
|
|
532
|
-
/**
|
|
533
|
-
* Representing an inclusive upper limit for a numeric instance.
|
|
534
|
-
* This keyword validates only if the instance is less than or exactly equal to "maximum".
|
|
535
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2
|
|
536
|
-
*/
|
|
537
|
-
maximum(maximum) {
|
|
538
|
-
super.set("maximum", maximum);
|
|
539
|
-
return this;
|
|
540
|
-
}
|
|
541
|
-
/**
|
|
542
|
-
* Representing an exclusive upper limit for a numeric instance.
|
|
543
|
-
* This keyword validates only if the instance is strictly less than (not equal to) to "exclusiveMaximum".
|
|
544
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3
|
|
545
|
-
*/
|
|
546
|
-
exclusiveMaximum(exclusiveMaximum) {
|
|
547
|
-
super.set("exclusiveMaximum", exclusiveMaximum);
|
|
548
|
-
return this;
|
|
549
|
-
}
|
|
550
|
-
/**
|
|
551
|
-
* Representing an inclusive lower limit for a numeric instance.
|
|
552
|
-
* This keyword validates only if the instance is greater than or exactly equal to "minimum".
|
|
553
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4
|
|
554
|
-
*/
|
|
555
|
-
minimum(minimum) {
|
|
556
|
-
super.set("minimum", minimum);
|
|
557
|
-
return this;
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
* Representing an exclusive lower limit for a numeric instance.
|
|
561
|
-
* This keyword validates only if the instance is strictly greater than (not equal to) to "exclusiveMinimum".
|
|
562
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5
|
|
563
|
-
*/
|
|
564
|
-
exclusiveMinimum(exclusiveMinimum) {
|
|
565
|
-
super.set("exclusiveMinimum", exclusiveMinimum);
|
|
566
|
-
return this;
|
|
567
|
-
}
|
|
568
|
-
/**
|
|
569
|
-
* Must be a non-negative integer.
|
|
570
|
-
* A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.
|
|
571
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6
|
|
572
|
-
*/
|
|
573
|
-
maxLength(maxLength) {
|
|
574
|
-
super.set("maxLength", maxLength);
|
|
575
|
-
return this;
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* Must be a non-negative integer.
|
|
579
|
-
* A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.
|
|
580
|
-
* Omitting this keyword has the same behavior as a value of 0.
|
|
581
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7
|
|
582
|
-
*/
|
|
583
|
-
minLength(minLength) {
|
|
584
|
-
super.set("minLength", minLength);
|
|
585
|
-
return this;
|
|
586
|
-
}
|
|
587
|
-
/**
|
|
588
|
-
* Should be a valid regular expression, according to the ECMA 262 regular expression dialect.
|
|
589
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8
|
|
590
|
-
*/
|
|
591
|
-
pattern(pattern) {
|
|
592
|
-
super.set("pattern", (0, toJsonRegex_js_1.toJsonRegex)(pattern));
|
|
593
|
-
return this;
|
|
594
|
-
}
|
|
595
|
-
/**
|
|
596
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8
|
|
597
|
-
*/
|
|
598
|
-
format(format) {
|
|
599
|
-
super.set("format", format);
|
|
600
|
-
return this;
|
|
601
|
-
}
|
|
602
|
-
/**
|
|
603
|
-
* A single type, or a union of simple types
|
|
604
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25
|
|
605
|
-
*/
|
|
606
|
-
type(type) {
|
|
607
|
-
switch (type) {
|
|
608
|
-
case "map":
|
|
609
|
-
case Map:
|
|
610
|
-
super.set("type", (0, getJsonType_js_1.getJsonType)(type));
|
|
611
|
-
this.#target = type;
|
|
612
|
-
this.#isCollection = true;
|
|
613
|
-
if (!this.has("additionalProperties")) {
|
|
614
|
-
super.set("additionalProperties", this.itemSchema({}));
|
|
615
|
-
}
|
|
616
|
-
break;
|
|
617
|
-
case "array":
|
|
618
|
-
case Array:
|
|
619
|
-
super.set("type", (0, getJsonType_js_1.getJsonType)(type));
|
|
620
|
-
this.#target = type;
|
|
621
|
-
this.#isCollection = true;
|
|
622
|
-
if (!this.has("items")) {
|
|
623
|
-
super.set("items", this.itemSchema({}));
|
|
624
|
-
}
|
|
625
|
-
break;
|
|
626
|
-
case "set":
|
|
627
|
-
case Set:
|
|
628
|
-
super.set("type", (0, getJsonType_js_1.getJsonType)(type));
|
|
629
|
-
this.#target = type;
|
|
630
|
-
this.#isCollection = true;
|
|
631
|
-
this.uniqueItems(true);
|
|
632
|
-
if (!this.has("items")) {
|
|
633
|
-
super.set("items", this.itemSchema({}));
|
|
634
|
-
}
|
|
635
|
-
break;
|
|
636
|
-
case "integer":
|
|
637
|
-
this.integer();
|
|
638
|
-
break;
|
|
639
|
-
case "number":
|
|
640
|
-
case "string":
|
|
641
|
-
case "boolean":
|
|
642
|
-
case "object":
|
|
643
|
-
case Object:
|
|
644
|
-
case Date:
|
|
645
|
-
case Boolean:
|
|
646
|
-
case Number:
|
|
647
|
-
case String:
|
|
648
|
-
super.set("type", (0, getJsonType_js_1.getJsonType)(type));
|
|
649
|
-
this.#target = type;
|
|
650
|
-
if (!this.has("properties")) {
|
|
651
|
-
super.set("properties", {});
|
|
652
|
-
}
|
|
653
|
-
break;
|
|
654
|
-
default:
|
|
655
|
-
if ((0, core_1.isClass)(type) || (0, core_1.isFunction)(type)) {
|
|
656
|
-
super.set("type", undefined);
|
|
657
|
-
this.#target = type;
|
|
658
|
-
if (!this.has("properties")) {
|
|
659
|
-
super.set("properties", {});
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
else {
|
|
663
|
-
const jsonType = (0, getJsonType_js_1.getJsonType)(type);
|
|
664
|
-
if (jsonType === "generic") {
|
|
665
|
-
this.#isGeneric = true;
|
|
666
|
-
super.set("$ref", type);
|
|
667
|
-
}
|
|
668
|
-
else {
|
|
669
|
-
super.set("type", jsonType);
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
return this;
|
|
674
|
-
}
|
|
675
|
-
any(...types) {
|
|
676
|
-
types = types.length ? types : ["integer", "number", "string", "boolean", "array", "object", "null"];
|
|
677
|
-
types = (0, core_1.uniq)(types).map((o) => {
|
|
678
|
-
return (0, core_1.isClass)(o) ? o : { type: (0, getJsonType_js_1.getJsonType)(o) };
|
|
679
|
-
});
|
|
680
|
-
if (types.length > 1) {
|
|
681
|
-
this.anyOf(types);
|
|
682
|
-
}
|
|
683
|
-
else {
|
|
684
|
-
this.type(types[0]?.type || types[0]);
|
|
685
|
-
}
|
|
686
|
-
return this;
|
|
687
|
-
}
|
|
688
|
-
integer() {
|
|
689
|
-
super.set("type", "integer");
|
|
690
|
-
super.set("multipleOf", 1.0);
|
|
691
|
-
return this;
|
|
692
|
-
}
|
|
693
|
-
/**
|
|
694
|
-
* This attribute is a string that provides a short description of the instance property.
|
|
695
|
-
*
|
|
696
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2
|
|
697
|
-
*/
|
|
698
|
-
title(title) {
|
|
699
|
-
super.set("title", title);
|
|
700
|
-
return this;
|
|
701
|
-
}
|
|
702
|
-
readOnly(readOnly) {
|
|
703
|
-
super.set("readOnly", readOnly);
|
|
704
|
-
return this;
|
|
705
|
-
}
|
|
706
|
-
writeOnly(readOnly) {
|
|
707
|
-
super.set("writeOnly", readOnly);
|
|
708
|
-
return this;
|
|
709
|
-
}
|
|
710
|
-
customKey(key, value) {
|
|
711
|
-
super.set(`#${key}`, value);
|
|
712
|
-
return this;
|
|
713
|
-
}
|
|
714
|
-
toObject(options) {
|
|
715
|
-
return this.toJSON(options);
|
|
716
|
-
}
|
|
717
|
-
toJSON(options) {
|
|
718
|
-
return (0, JsonSchemaMapperContainer_js_1.execMapper)("schema", [this], options);
|
|
719
|
-
}
|
|
720
|
-
assign(obj = {}) {
|
|
721
|
-
const entries = obj instanceof JsonSchema ? [...obj.entries()] : Object.entries(obj);
|
|
722
|
-
entries.forEach(([key, value]) => {
|
|
723
|
-
this.set(key, value);
|
|
724
|
-
});
|
|
725
|
-
if (obj instanceof JsonSchema) {
|
|
726
|
-
this.$selfRequired = obj.$selfRequired;
|
|
727
|
-
this.$allow.push(...obj.$allow);
|
|
728
|
-
obj.$required.forEach((key) => {
|
|
729
|
-
this.$required.add(key);
|
|
730
|
-
});
|
|
731
|
-
this.#discriminator = this.#discriminator ? new JsonDiscriminator_js_1.Discriminator(this.#discriminator) : null;
|
|
732
|
-
this.isDiscriminator = obj.isDiscriminator;
|
|
733
|
-
this.isDiscriminatorKey = obj.isDiscriminatorKey;
|
|
734
|
-
this.#ref = obj.#ref;
|
|
735
|
-
this.#alias = new Map(this.#alias.entries());
|
|
736
|
-
obj.#genericLabels && (this.#genericLabels = [...obj.#genericLabels]);
|
|
737
|
-
this.#nestedGenerics = obj.#nestedGenerics.map((item) => [...item]);
|
|
738
|
-
this.#target = obj.#target;
|
|
739
|
-
this.#isGeneric = obj.#isGeneric;
|
|
740
|
-
this.#isCollection = obj.#isCollection;
|
|
741
|
-
this.#ref = obj.#ref;
|
|
742
|
-
this.#nullable = obj.#nullable;
|
|
743
|
-
super.set("type", obj.get("type"));
|
|
744
|
-
}
|
|
745
|
-
return this;
|
|
746
|
-
}
|
|
747
|
-
set(key, value) {
|
|
748
|
-
if (key in this) {
|
|
749
|
-
(0, core_1.isFunction)(this[key]) && this[key](value);
|
|
750
|
-
}
|
|
751
|
-
else {
|
|
752
|
-
super.set(key, value);
|
|
753
|
-
}
|
|
754
|
-
return this;
|
|
755
|
-
}
|
|
756
|
-
/**
|
|
757
|
-
* Return the itemSchema computed type.
|
|
758
|
-
* If the type is a function used for recursive model,
|
|
759
|
-
* the function will be called to get the right type.
|
|
760
|
-
*/
|
|
761
|
-
getComputedType() {
|
|
762
|
-
return (0, getComputedType_js_1.getComputedType)(this.#target);
|
|
763
|
-
}
|
|
764
|
-
getComputedItemType() {
|
|
765
|
-
return this.#itemSchema ? this.#itemSchema.getComputedType() : this.getComputedType();
|
|
766
|
-
}
|
|
767
|
-
/**
|
|
768
|
-
* Return the Json type as string
|
|
769
|
-
*/
|
|
770
|
-
getJsonType() {
|
|
771
|
-
if (this.get("anyOf")) {
|
|
772
|
-
return this.get("anyOf").map((o) => {
|
|
773
|
-
return o.getJsonType();
|
|
774
|
-
});
|
|
775
|
-
}
|
|
776
|
-
return this.get("type") || (0, getJsonType_js_1.getJsonType)(this.getComputedType());
|
|
777
|
-
}
|
|
778
|
-
getTarget() {
|
|
779
|
-
return this.#target;
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* Get the symbolic name of the entity
|
|
783
|
-
*/
|
|
784
|
-
getName() {
|
|
785
|
-
return this.get("name") || ((0, core_1.isClass)(this.#target) ? (0, core_1.nameOf)((0, core_1.classOf)(this.getComputedType())) : "");
|
|
786
|
-
}
|
|
787
|
-
clone() {
|
|
788
|
-
return new JsonSchema(this);
|
|
789
|
-
}
|
|
790
|
-
setManyOf(keyword, value) {
|
|
791
|
-
let resolved = value
|
|
792
|
-
.filter((o) => {
|
|
793
|
-
if (o?.type === "null") {
|
|
794
|
-
this.nullable(true);
|
|
795
|
-
return false;
|
|
796
|
-
}
|
|
797
|
-
return true;
|
|
798
|
-
})
|
|
799
|
-
.map(mapToJsonSchema);
|
|
800
|
-
if (resolved.length === 1 && !(value[0] instanceof JsonSchema) && !this.isNullable) {
|
|
801
|
-
if (!resolved[0].hasDiscriminator) {
|
|
802
|
-
return this.type(value[0]);
|
|
803
|
-
}
|
|
804
|
-
const children = resolved[0].discriminator().children();
|
|
805
|
-
if (!children.length) {
|
|
806
|
-
return this.type(value[0]);
|
|
807
|
-
}
|
|
808
|
-
resolved = children.map(mapToJsonSchema);
|
|
809
|
-
}
|
|
810
|
-
super.set(keyword, resolved);
|
|
811
|
-
const jsonSchema = resolved[0];
|
|
812
|
-
if (jsonSchema.isDiscriminator) {
|
|
813
|
-
const discriminator = jsonSchema.discriminatorAncestor.discriminator();
|
|
814
|
-
const { propertyName } = discriminator;
|
|
815
|
-
super.set("discriminator", { propertyName });
|
|
816
|
-
this.isDiscriminator = true;
|
|
817
|
-
this.#discriminator = discriminator;
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
exports.JsonSchema = JsonSchema;
|
|
822
|
-
//# sourceMappingURL=JsonSchema.js.map
|