@tsed/schema 8.0.0-alpha.5 → 8.0.0-alpha.6
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.map +1 -1
- package/lib/esm/utils/getJsonSchema.js.map +1 -1
- package/lib/types/utils/getJsonSchema.d.ts +1 -1
- package/package.json +12 -12
- 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 -32
- 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 -158
- 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 -16
- 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 -128
- 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,487 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Url = exports.Uri = exports.TimeFormat = exports.DateFormat = exports.DateTime = exports.Email = exports.Format = void 0;
|
|
4
|
-
const JsonFormatTypes_js_1 = require("../../domain/JsonFormatTypes.js");
|
|
5
|
-
const withErrorMsg_js_1 = require("../../utils/withErrorMsg.js");
|
|
6
|
-
const jsonEntityFn_js_1 = require("./jsonEntityFn.js");
|
|
7
|
-
/**
|
|
8
|
-
* The following formats are supported for string validation with `format` keyword:
|
|
9
|
-
*
|
|
10
|
-
* - **date**: full-date according to [RFC3339](https://json-schema.org/latest/json-schema-validation.html#RFC3339).
|
|
11
|
-
* - **time**: time with optional time-zone.
|
|
12
|
-
* - **date-time**: date-time from the same source (time-zone is mandatory).
|
|
13
|
-
* - **uri**: full uri with optional protocol.
|
|
14
|
-
* - **email**: email address.
|
|
15
|
-
* - **hostname**: host name according to [RFC1034](https://tools.ietf.org/html/rfc1034#section-3.1).
|
|
16
|
-
* - **ipv4**: IP address v4.
|
|
17
|
-
* - **ipv6**: IP address v6.
|
|
18
|
-
* - **regex**: tests whether a string is a valid regular expression by passing it to RegExp constructor.
|
|
19
|
-
*
|
|
20
|
-
* ::: warning
|
|
21
|
-
* For v6 user, use @@Format@@ from @tsed/schema instead of @tsed/common.
|
|
22
|
-
* :::
|
|
23
|
-
*
|
|
24
|
-
* ## Example
|
|
25
|
-
* ### With primitive type
|
|
26
|
-
*
|
|
27
|
-
* ```typescript
|
|
28
|
-
* class Model {
|
|
29
|
-
* @Format("email")
|
|
30
|
-
* property: string;
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* ```json
|
|
35
|
-
* {
|
|
36
|
-
* "type": "object",
|
|
37
|
-
* "properties": {
|
|
38
|
-
* "property": {
|
|
39
|
-
* "type": "string",
|
|
40
|
-
* "format": "email"
|
|
41
|
-
* }
|
|
42
|
-
* }
|
|
43
|
-
* }
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* ### With array type
|
|
47
|
-
*
|
|
48
|
-
* ```typescript
|
|
49
|
-
* class Model {
|
|
50
|
-
* @Format("email")
|
|
51
|
-
* @CollectionOf(String)
|
|
52
|
-
* property: string[];
|
|
53
|
-
* }
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* Will produce:
|
|
57
|
-
*
|
|
58
|
-
* ```json
|
|
59
|
-
* {
|
|
60
|
-
* "type": "object",
|
|
61
|
-
* "properties": {
|
|
62
|
-
* "property": {
|
|
63
|
-
* "type": "array",
|
|
64
|
-
* "items": {
|
|
65
|
-
* "type": "string",
|
|
66
|
-
* "format": "email"
|
|
67
|
-
* }
|
|
68
|
-
* }
|
|
69
|
-
* }
|
|
70
|
-
* }
|
|
71
|
-
* ```
|
|
72
|
-
*
|
|
73
|
-
* @param {string} format
|
|
74
|
-
* @decorator
|
|
75
|
-
* @validation
|
|
76
|
-
* @swagger
|
|
77
|
-
* @schema
|
|
78
|
-
* @input
|
|
79
|
-
* @ajv-errors
|
|
80
|
-
*/
|
|
81
|
-
exports.Format = (0, withErrorMsg_js_1.withErrorMsg)("format", (format) => {
|
|
82
|
-
return (0, jsonEntityFn_js_1.JsonEntityFn)((store) => {
|
|
83
|
-
store.itemSchema.format(format);
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
/**
|
|
87
|
-
* Apply an email validation on property.
|
|
88
|
-
*
|
|
89
|
-
* ::: warning
|
|
90
|
-
* For v6 user, use @@Email@@ from @tsed/schema instead of @tsed/common.
|
|
91
|
-
* :::
|
|
92
|
-
*
|
|
93
|
-
* ## Example
|
|
94
|
-
* ### With primitive type
|
|
95
|
-
*
|
|
96
|
-
* ```typescript
|
|
97
|
-
* class Model {
|
|
98
|
-
* @Email()
|
|
99
|
-
* property: string;
|
|
100
|
-
* }
|
|
101
|
-
* ```
|
|
102
|
-
*
|
|
103
|
-
* Will produce:
|
|
104
|
-
*
|
|
105
|
-
* ```json
|
|
106
|
-
* {
|
|
107
|
-
* "type": "object",
|
|
108
|
-
* "properties": {
|
|
109
|
-
* "property": {
|
|
110
|
-
* "type": "string",
|
|
111
|
-
* "format": "email"
|
|
112
|
-
* }
|
|
113
|
-
* }
|
|
114
|
-
* }
|
|
115
|
-
* ```
|
|
116
|
-
*
|
|
117
|
-
* ### With array type
|
|
118
|
-
*
|
|
119
|
-
* ```typescript
|
|
120
|
-
* class Model {
|
|
121
|
-
* @Email()
|
|
122
|
-
* @CollectionOf(String)
|
|
123
|
-
* property: string[];
|
|
124
|
-
* }
|
|
125
|
-
* ```
|
|
126
|
-
*
|
|
127
|
-
* Will produce:
|
|
128
|
-
*
|
|
129
|
-
* ```json
|
|
130
|
-
* {
|
|
131
|
-
* "type": "object",
|
|
132
|
-
* "properties": {
|
|
133
|
-
* "property": {
|
|
134
|
-
* "type": "array",
|
|
135
|
-
* "items": {
|
|
136
|
-
* "type": "string",
|
|
137
|
-
* "format": "email"
|
|
138
|
-
* }
|
|
139
|
-
* }
|
|
140
|
-
* }
|
|
141
|
-
* }
|
|
142
|
-
* ```
|
|
143
|
-
*
|
|
144
|
-
* > See [Format](api/common/jsonschema/schema) decorator.
|
|
145
|
-
* @returns {Function}
|
|
146
|
-
* @decorator
|
|
147
|
-
* @validation
|
|
148
|
-
* @schema
|
|
149
|
-
* @swagger
|
|
150
|
-
* @input
|
|
151
|
-
* @ajv-errors
|
|
152
|
-
*/
|
|
153
|
-
exports.Email = (0, withErrorMsg_js_1.withErrorMsg)("format", () => {
|
|
154
|
-
return (0, exports.Format)(JsonFormatTypes_js_1.JsonFormatTypes.EMAIL);
|
|
155
|
-
});
|
|
156
|
-
/**
|
|
157
|
-
* Apply a date-time validation on property.
|
|
158
|
-
*
|
|
159
|
-
* ## Example
|
|
160
|
-
* ### With primitive type
|
|
161
|
-
*
|
|
162
|
-
* ```typescript
|
|
163
|
-
* class Model {
|
|
164
|
-
* @DateTime()
|
|
165
|
-
* property: string;
|
|
166
|
-
* }
|
|
167
|
-
* ```
|
|
168
|
-
*
|
|
169
|
-
* Will produce:
|
|
170
|
-
*
|
|
171
|
-
* ```json
|
|
172
|
-
* {
|
|
173
|
-
* "type": "object",
|
|
174
|
-
* "properties": {
|
|
175
|
-
* "property": {
|
|
176
|
-
* "type": "string",
|
|
177
|
-
* "format": "date-time"
|
|
178
|
-
* }
|
|
179
|
-
* }
|
|
180
|
-
* }
|
|
181
|
-
* ```
|
|
182
|
-
*
|
|
183
|
-
* ### With array type
|
|
184
|
-
*
|
|
185
|
-
* ```typescript
|
|
186
|
-
* class Model {
|
|
187
|
-
* @DateTime()
|
|
188
|
-
* @CollectionOf(String)
|
|
189
|
-
* property: string[];
|
|
190
|
-
* }
|
|
191
|
-
* ```
|
|
192
|
-
*
|
|
193
|
-
* Will produce:
|
|
194
|
-
*
|
|
195
|
-
* ```json
|
|
196
|
-
* {
|
|
197
|
-
* "type": "object",
|
|
198
|
-
* "properties": {
|
|
199
|
-
* "property": {
|
|
200
|
-
* "type": "array",
|
|
201
|
-
* "items": {
|
|
202
|
-
* "type": "string",
|
|
203
|
-
* "format": "date-time"
|
|
204
|
-
* }
|
|
205
|
-
* }
|
|
206
|
-
* }
|
|
207
|
-
* }
|
|
208
|
-
* ```
|
|
209
|
-
*
|
|
210
|
-
* > See [Format](api/common/jsonschema/schema) decorator.
|
|
211
|
-
* @returns {Function}
|
|
212
|
-
* @decorator
|
|
213
|
-
* @validation
|
|
214
|
-
* @property
|
|
215
|
-
* @parameter
|
|
216
|
-
* @schema
|
|
217
|
-
* @auto-map The data will be stored on the right place according to the type and collectionType (primitive or collection).
|
|
218
|
-
* @ajv-errors
|
|
219
|
-
*/
|
|
220
|
-
exports.DateTime = (0, withErrorMsg_js_1.withErrorMsg)("format", () => {
|
|
221
|
-
return (0, exports.Format)(JsonFormatTypes_js_1.JsonFormatTypes.DATE_TIME);
|
|
222
|
-
});
|
|
223
|
-
/**
|
|
224
|
-
* Apply a time validation on property.
|
|
225
|
-
*
|
|
226
|
-
* ## Example
|
|
227
|
-
* ### With primitive type
|
|
228
|
-
*
|
|
229
|
-
* ```typescript
|
|
230
|
-
* class Model {
|
|
231
|
-
* @Time()
|
|
232
|
-
* property: string;
|
|
233
|
-
* }
|
|
234
|
-
* ```
|
|
235
|
-
*
|
|
236
|
-
* Will produce:
|
|
237
|
-
*
|
|
238
|
-
* ```json
|
|
239
|
-
* {
|
|
240
|
-
* "type": "object",
|
|
241
|
-
* "properties": {
|
|
242
|
-
* "property": {
|
|
243
|
-
* "type": "string",
|
|
244
|
-
* "format": "time"
|
|
245
|
-
* }
|
|
246
|
-
* }
|
|
247
|
-
* }
|
|
248
|
-
* ```
|
|
249
|
-
*
|
|
250
|
-
* ### With array type
|
|
251
|
-
*
|
|
252
|
-
* ```typescript
|
|
253
|
-
* class Model {
|
|
254
|
-
* @Time()
|
|
255
|
-
* @CollectionOf(String)
|
|
256
|
-
* property: string[];
|
|
257
|
-
* }
|
|
258
|
-
* ```
|
|
259
|
-
*
|
|
260
|
-
* Will produce:
|
|
261
|
-
*
|
|
262
|
-
* ```json
|
|
263
|
-
* {
|
|
264
|
-
* "type": "object",
|
|
265
|
-
* "properties": {
|
|
266
|
-
* "property": {
|
|
267
|
-
* "type": "array",
|
|
268
|
-
* "items": {
|
|
269
|
-
* "type": "string",
|
|
270
|
-
* "format": "time"
|
|
271
|
-
* }
|
|
272
|
-
* }
|
|
273
|
-
* }
|
|
274
|
-
* }
|
|
275
|
-
* ```
|
|
276
|
-
*
|
|
277
|
-
* > See [Format](api/common/jsonschema/schema) decorator.
|
|
278
|
-
* @returns {Function}
|
|
279
|
-
* @decorator
|
|
280
|
-
* @validation
|
|
281
|
-
* @property
|
|
282
|
-
* @parameter
|
|
283
|
-
* @schema
|
|
284
|
-
* @ajv-errors
|
|
285
|
-
*/
|
|
286
|
-
exports.DateFormat = (0, withErrorMsg_js_1.withErrorMsg)("format", () => {
|
|
287
|
-
return (0, exports.Format)(JsonFormatTypes_js_1.JsonFormatTypes.DATE);
|
|
288
|
-
});
|
|
289
|
-
/**
|
|
290
|
-
* Apply a time validation on property.
|
|
291
|
-
*
|
|
292
|
-
* ## Example
|
|
293
|
-
* ### With primitive type
|
|
294
|
-
*
|
|
295
|
-
* ```typescript
|
|
296
|
-
* class Model {
|
|
297
|
-
* @TimeFormat()
|
|
298
|
-
* property: string;
|
|
299
|
-
* }
|
|
300
|
-
* ```
|
|
301
|
-
*
|
|
302
|
-
* Will produce:
|
|
303
|
-
*
|
|
304
|
-
* ```json
|
|
305
|
-
* {
|
|
306
|
-
* "type": "object",
|
|
307
|
-
* "properties": {
|
|
308
|
-
* "property": {
|
|
309
|
-
* "type": "string",
|
|
310
|
-
* "format": "time"
|
|
311
|
-
* }
|
|
312
|
-
* }
|
|
313
|
-
* }
|
|
314
|
-
* ```
|
|
315
|
-
*
|
|
316
|
-
* ### With array type
|
|
317
|
-
*
|
|
318
|
-
* ```typescript
|
|
319
|
-
* class Model {
|
|
320
|
-
* @TimeFormat()
|
|
321
|
-
* @CollectionOf(String)
|
|
322
|
-
* property: string[];
|
|
323
|
-
* }
|
|
324
|
-
* ```
|
|
325
|
-
*
|
|
326
|
-
* Will produce:
|
|
327
|
-
*
|
|
328
|
-
* ```json
|
|
329
|
-
* {
|
|
330
|
-
* "type": "object",
|
|
331
|
-
* "properties": {
|
|
332
|
-
* "property": {
|
|
333
|
-
* "type": "array",
|
|
334
|
-
* "items": {
|
|
335
|
-
* "type": "string",
|
|
336
|
-
* "format": "time"
|
|
337
|
-
* }
|
|
338
|
-
* }
|
|
339
|
-
* }
|
|
340
|
-
* }
|
|
341
|
-
* ```
|
|
342
|
-
*
|
|
343
|
-
* > See [Format](api/common/jsonschema/schema) decorator.
|
|
344
|
-
* @returns {Function}
|
|
345
|
-
* @decorator
|
|
346
|
-
* @validation
|
|
347
|
-
* @property
|
|
348
|
-
* @parameter
|
|
349
|
-
* @schema
|
|
350
|
-
* @ajv-errors
|
|
351
|
-
*/
|
|
352
|
-
exports.TimeFormat = (0, withErrorMsg_js_1.withErrorMsg)("format", () => {
|
|
353
|
-
return (0, exports.Format)(JsonFormatTypes_js_1.JsonFormatTypes.TIME);
|
|
354
|
-
});
|
|
355
|
-
/**
|
|
356
|
-
* Apply a uri validation on property.
|
|
357
|
-
*
|
|
358
|
-
* ## Example
|
|
359
|
-
* ### With primitive type
|
|
360
|
-
*
|
|
361
|
-
* ```typescript
|
|
362
|
-
* class Model {
|
|
363
|
-
* @Uri()
|
|
364
|
-
* property: string;
|
|
365
|
-
* }
|
|
366
|
-
* ```
|
|
367
|
-
*
|
|
368
|
-
* Will produce:
|
|
369
|
-
*
|
|
370
|
-
* ```json
|
|
371
|
-
* {
|
|
372
|
-
* "type": "object",
|
|
373
|
-
* "properties": {
|
|
374
|
-
* "property": {
|
|
375
|
-
* "type": "string",
|
|
376
|
-
* "format": "uri"
|
|
377
|
-
* }
|
|
378
|
-
* }
|
|
379
|
-
* }
|
|
380
|
-
* ```
|
|
381
|
-
*
|
|
382
|
-
* ### With array type
|
|
383
|
-
*
|
|
384
|
-
* ```typescript
|
|
385
|
-
* class Model {
|
|
386
|
-
* @Uri()
|
|
387
|
-
* @CollectionOf(String)
|
|
388
|
-
* property: string[];
|
|
389
|
-
* }
|
|
390
|
-
* ```
|
|
391
|
-
*
|
|
392
|
-
* Will produce:
|
|
393
|
-
*
|
|
394
|
-
* ```json
|
|
395
|
-
* {
|
|
396
|
-
* "type": "object",
|
|
397
|
-
* "properties": {
|
|
398
|
-
* "property": {
|
|
399
|
-
* "type": "array",
|
|
400
|
-
* "items": {
|
|
401
|
-
* "type": "string",
|
|
402
|
-
* "format": "uri"
|
|
403
|
-
* }
|
|
404
|
-
* }
|
|
405
|
-
* }
|
|
406
|
-
* }
|
|
407
|
-
* ```
|
|
408
|
-
*
|
|
409
|
-
* > See [Format](api/common/jsonschema/schema) decorator.
|
|
410
|
-
* @returns {Function}
|
|
411
|
-
* @decorator
|
|
412
|
-
* @validation
|
|
413
|
-
* @property
|
|
414
|
-
* @parameter
|
|
415
|
-
* @schema
|
|
416
|
-
* @ajv-errors
|
|
417
|
-
*/
|
|
418
|
-
exports.Uri = (0, withErrorMsg_js_1.withErrorMsg)("format", () => {
|
|
419
|
-
return (0, exports.Format)(JsonFormatTypes_js_1.JsonFormatTypes.URI);
|
|
420
|
-
});
|
|
421
|
-
/**
|
|
422
|
-
* Apply a url validation on property.
|
|
423
|
-
*
|
|
424
|
-
* ## Example
|
|
425
|
-
* ### With primitive type
|
|
426
|
-
*
|
|
427
|
-
* ```typescript
|
|
428
|
-
* class Model {
|
|
429
|
-
* @Url()
|
|
430
|
-
* property: string;
|
|
431
|
-
* }
|
|
432
|
-
* ```
|
|
433
|
-
*
|
|
434
|
-
* Will produce:
|
|
435
|
-
*
|
|
436
|
-
* ```json
|
|
437
|
-
* {
|
|
438
|
-
* "type": "object",
|
|
439
|
-
* "properties": {
|
|
440
|
-
* "property": {
|
|
441
|
-
* "type": "string",
|
|
442
|
-
* "format": "url"
|
|
443
|
-
* }
|
|
444
|
-
* }
|
|
445
|
-
* }
|
|
446
|
-
* ```
|
|
447
|
-
*
|
|
448
|
-
* ### With array type
|
|
449
|
-
*
|
|
450
|
-
* ```typescript
|
|
451
|
-
* class Model {
|
|
452
|
-
* @Url()
|
|
453
|
-
* @CollectionOf(String)
|
|
454
|
-
* property: string[];
|
|
455
|
-
* }
|
|
456
|
-
* ```
|
|
457
|
-
*
|
|
458
|
-
* Will produce:
|
|
459
|
-
*
|
|
460
|
-
* ```json
|
|
461
|
-
* {
|
|
462
|
-
* "type": "object",
|
|
463
|
-
* "properties": {
|
|
464
|
-
* "property": {
|
|
465
|
-
* "type": "array",
|
|
466
|
-
* "items": {
|
|
467
|
-
* "type": "string",
|
|
468
|
-
* "format": "url"
|
|
469
|
-
* }
|
|
470
|
-
* }
|
|
471
|
-
* }
|
|
472
|
-
* }
|
|
473
|
-
* ```
|
|
474
|
-
*
|
|
475
|
-
* > See [Format](api/common/jsonschema/schema) decorator.
|
|
476
|
-
* @returns {Function}
|
|
477
|
-
* @decorator
|
|
478
|
-
* @validation
|
|
479
|
-
* @property
|
|
480
|
-
* @parameter
|
|
481
|
-
* @schema
|
|
482
|
-
* @ajv-errors
|
|
483
|
-
*/
|
|
484
|
-
exports.Url = (0, withErrorMsg_js_1.withErrorMsg)("format", () => {
|
|
485
|
-
return (0, exports.Format)(JsonFormatTypes_js_1.JsonFormatTypes.URL);
|
|
486
|
-
});
|
|
487
|
-
//# sourceMappingURL=format.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../../../src/decorators/common/format.ts"],"names":[],"mappings":";;;AACA,wEAAgE;AAChE,iEAAyD;AACzD,uDAA+C;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACU,QAAA,MAAM,GAAG,IAAA,8BAAY,EAAC,QAAQ,EAAE,CAAC,MAAkD,EAAE,EAAE;IAClG,OAAO,IAAA,8BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACU,QAAA,KAAK,GAAG,IAAA,8BAAY,EAAC,QAAQ,EAAE,GAAG,EAAE;IAC/C,OAAO,IAAA,cAAM,EAAC,oCAAe,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACU,QAAA,QAAQ,GAAG,IAAA,8BAAY,EAAC,QAAQ,EAAE,GAAG,EAAE;IAClD,OAAO,IAAA,cAAM,EAAC,oCAAe,CAAC,SAAS,CAAC,CAAC;AAC3C,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACU,QAAA,UAAU,GAAG,IAAA,8BAAY,EAAC,QAAQ,EAAE,GAAG,EAAE;IACpD,OAAO,IAAA,cAAM,EAAC,oCAAe,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACU,QAAA,UAAU,GAAG,IAAA,8BAAY,EAAC,QAAQ,EAAE,GAAG,EAAE;IACpD,OAAO,IAAA,cAAM,EAAC,oCAAe,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACU,QAAA,GAAG,GAAG,IAAA,8BAAY,EAAC,QAAQ,EAAE,GAAG,EAAE;IAC7C,OAAO,IAAA,cAAM,EAAC,oCAAe,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACU,QAAA,GAAG,GAAG,IAAA,8BAAY,EAAC,QAAQ,EAAE,GAAG,EAAE;IAC7C,OAAO,IAAA,cAAM,EAAC,oCAAe,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ForwardGroups = void 0;
|
|
4
|
-
const jsonEntityFn_js_1 = require("./jsonEntityFn.js");
|
|
5
|
-
/**
|
|
6
|
-
* Allow to forward group on specific property.
|
|
7
|
-
*
|
|
8
|
-
* @decorator
|
|
9
|
-
* @validation
|
|
10
|
-
* @swagger
|
|
11
|
-
* @schema
|
|
12
|
-
* @input
|
|
13
|
-
*/
|
|
14
|
-
function ForwardGroups(bool = true) {
|
|
15
|
-
return (0, jsonEntityFn_js_1.JsonEntityFn)((entity) => {
|
|
16
|
-
entity.schema.$forwardGroups = bool;
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
exports.ForwardGroups = ForwardGroups;
|
|
20
|
-
//# sourceMappingURL=forwardGroups.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"forwardGroups.js","sourceRoot":"","sources":["../../../../src/decorators/common/forwardGroups.ts"],"names":[],"mappings":";;;AAAA,uDAA+C;AAE/C;;;;;;;;GAQG;AACH,SAAgB,aAAa,CAAC,IAAI,GAAG,IAAI;IACvC,OAAO,IAAA,8BAAY,EAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sCAIC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Groups = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const matchGroups_js_1 = require("../../utils/matchGroups.js");
|
|
6
|
-
const customKey_js_1 = require("./customKey.js");
|
|
7
|
-
const jsonEntityFn_js_1 = require("./jsonEntityFn.js");
|
|
8
|
-
/**
|
|
9
|
-
* @ignore
|
|
10
|
-
*/
|
|
11
|
-
function groupsClass(groups, entity) {
|
|
12
|
-
const entries = Object.entries(groups[0]);
|
|
13
|
-
entity.children.forEach((propEntity) => {
|
|
14
|
-
const groups = entries.filter(([, props]) => props.includes(propEntity.propertyName)).map(([key]) => key);
|
|
15
|
-
const decorator = Groups(...groups);
|
|
16
|
-
decorator(propEntity.target, propEntity.propertyKey);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function Groups(...groups) {
|
|
20
|
-
return (0, jsonEntityFn_js_1.JsonEntityFn)((entity) => {
|
|
21
|
-
switch (entity.decoratorType) {
|
|
22
|
-
case core_1.DecoratorTypes.CLASS:
|
|
23
|
-
groupsClass(groups, entity);
|
|
24
|
-
break;
|
|
25
|
-
case core_1.DecoratorTypes.PROP:
|
|
26
|
-
(0, customKey_js_1.CustomKey)("x-groups", groups)(entity.target, entity.propertyKey);
|
|
27
|
-
entity.schema.$hooks.on("groups", (prev, givenGroups) => {
|
|
28
|
-
if (!prev) {
|
|
29
|
-
if ((0, matchGroups_js_1.matchGroups)(groups, givenGroups)) {
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return prev;
|
|
34
|
-
});
|
|
35
|
-
break;
|
|
36
|
-
case core_1.DecoratorTypes.PARAM:
|
|
37
|
-
let groupsName = "";
|
|
38
|
-
if (groups.length == 2 && (0, core_1.isArray)(groups[1])) {
|
|
39
|
-
groupsName = groups[0];
|
|
40
|
-
groups = groups[1];
|
|
41
|
-
}
|
|
42
|
-
entity.parameter.groups = groups;
|
|
43
|
-
entity.parameter.groupsName = groupsName;
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
exports.Groups = Groups;
|
|
49
|
-
//# sourceMappingURL=groups.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../src/decorators/common/groups.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AAGnD,+DAAuD;AACvD,iDAAyC;AACzC,uDAA+C;AAE/C;;GAEG;AACH,SAAS,WAAW,CAAC,MAAW,EAAE,MAAsB;IACtD,MAAM,OAAO,GAAyB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QACrC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;QAC1G,MAAM,SAAS,GAAQ,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;QAEzC,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC;AAcD,SAAgB,MAAM,CAAC,GAAG,MAAW;IACnC,OAAO,IAAA,8BAAY,EAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,QAAQ,MAAM,CAAC,aAAa,EAAE;YAC5B,KAAK,qBAAc,CAAC,KAAK;gBACvB,WAAW,CAAC,MAAM,EAAE,MAAwB,CAAC,CAAC;gBAC9C,MAAM;YACR,KAAK,qBAAc,CAAC,IAAI;gBACtB,IAAA,wBAAS,EAAC,UAAU,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;gBACjE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,IAAa,EAAE,WAAqB,EAAE,EAAE;oBACzE,IAAI,CAAC,IAAI,EAAE;wBACT,IAAI,IAAA,4BAAW,EAAC,MAAM,EAAE,WAAW,CAAC,EAAE;4BACpC,OAAO,IAAI,CAAC;yBACb;qBACF;oBAED,OAAO,IAAI,CAAC;gBACd,CAAC,CAAC,CAAC;gBACH,MAAM;YACR,KAAK,qBAAc,CAAC,KAAK;gBACvB,IAAI,UAAU,GAAG,EAAE,CAAC;gBAEpB,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,IAAA,cAAO,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;oBAC5C,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;oBACvB,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;iBACpB;gBAEA,MAA6B,CAAC,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC;gBACxD,MAA6B,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,CAAC;gBACjE,MAAM;SACT;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AA/BD,wBA+BC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Hidden = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
/**
|
|
6
|
-
* Disable documentation for the class and his endpoint.
|
|
7
|
-
*
|
|
8
|
-
* ````typescript
|
|
9
|
-
* @Controller('/')
|
|
10
|
-
* export class Ctrl {
|
|
11
|
-
*
|
|
12
|
-
* @Get('/')
|
|
13
|
-
* @Hidden()
|
|
14
|
-
* hiddenRoute(){
|
|
15
|
-
*
|
|
16
|
-
* }
|
|
17
|
-
* }
|
|
18
|
-
*
|
|
19
|
-
* @Controller('/')
|
|
20
|
-
* @Hidden()
|
|
21
|
-
* export class Ctrl {
|
|
22
|
-
* @Get('/')
|
|
23
|
-
* hiddenRoute() {
|
|
24
|
-
*
|
|
25
|
-
* }
|
|
26
|
-
* @Get('/2')
|
|
27
|
-
* hiddenRoute2() {
|
|
28
|
-
*
|
|
29
|
-
* }
|
|
30
|
-
* }
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* @decorator
|
|
34
|
-
* @ignore
|
|
35
|
-
*/
|
|
36
|
-
function Hidden() {
|
|
37
|
-
return (0, core_1.StoreSet)("hidden", true);
|
|
38
|
-
}
|
|
39
|
-
exports.Hidden = Hidden;
|
|
40
|
-
//# sourceMappingURL=hidden.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hidden.js","sourceRoot":"","sources":["../../../../src/decorators/common/hidden.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,SAAgB,MAAM;IACpB,OAAO,IAAA,eAAQ,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,wBAEC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Ignore = void 0;
|
|
4
|
-
const jsonEntityFn_js_1 = require("./jsonEntityFn.js");
|
|
5
|
-
/**
|
|
6
|
-
* Ignore the property when JsonMapper serialize the class to a Plain Object JavaScript.
|
|
7
|
-
*
|
|
8
|
-
* ::: warning
|
|
9
|
-
* Swagger will not generate documentation for the ignored property.
|
|
10
|
-
* :::
|
|
11
|
-
*
|
|
12
|
-
* ```typescript
|
|
13
|
-
* class User {
|
|
14
|
-
* @Ignore()
|
|
15
|
-
* _id: string;
|
|
16
|
-
*
|
|
17
|
-
* @Property()
|
|
18
|
-
* firstName: string;
|
|
19
|
-
*
|
|
20
|
-
* @Property()
|
|
21
|
-
* lastName: string;
|
|
22
|
-
*
|
|
23
|
-
* @Ignore((value, ctx) => !ctx.endpoint)
|
|
24
|
-
* password: string;
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* The controller:
|
|
29
|
-
* ```typescript
|
|
30
|
-
* import {Post, Controller, BodyParams} from "@tsed/common";
|
|
31
|
-
* import {Person} from "../models/Person.js";
|
|
32
|
-
*
|
|
33
|
-
* @Controller("/")
|
|
34
|
-
* export class UsersCtrl {
|
|
35
|
-
* @Get("/")
|
|
36
|
-
* get(): User {
|
|
37
|
-
* const user = new User();
|
|
38
|
-
* user._id = "12345";
|
|
39
|
-
* user.firstName = "John";
|
|
40
|
-
* user.lastName = "Doe";
|
|
41
|
-
* user.password = "secretpassword";
|
|
42
|
-
* return
|
|
43
|
-
* }
|
|
44
|
-
* }
|
|
45
|
-
* ```
|
|
46
|
-
*
|
|
47
|
-
* The expected json object:
|
|
48
|
-
*
|
|
49
|
-
* ```json
|
|
50
|
-
* {
|
|
51
|
-
* "firstName": "John",
|
|
52
|
-
* "lastName": "Doe"
|
|
53
|
-
* }
|
|
54
|
-
* ```
|
|
55
|
-
* @param cb Callback to know if the property must be ignored
|
|
56
|
-
* @decorator
|
|
57
|
-
* @validation
|
|
58
|
-
* @swagger
|
|
59
|
-
* @schema
|
|
60
|
-
* @deprecated Since v7. Use @Groups decorator instead of and enable `jsonMapper.strictGroups` in your configuration.
|
|
61
|
-
*/
|
|
62
|
-
function Ignore(cb = true) {
|
|
63
|
-
return (0, jsonEntityFn_js_1.JsonEntityFn)((store) => {
|
|
64
|
-
store.schema.ignore(cb);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
exports.Ignore = Ignore;
|
|
68
|
-
//# sourceMappingURL=ignore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../../../src/decorators/common/ignore.ts"],"names":[],"mappings":";;;AACA,uDAA+C;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,SAAgB,MAAM,CAAC,KAA+B,IAAI;IACxD,OAAO,IAAA,8BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,wBAIC"}
|