@tsed/schema 7.86.2 → 7.87.0
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/cjs/components/default/anyMapper.js +1 -2
- package/lib/cjs/components/default/anyMapper.js.map +1 -1
- package/lib/cjs/components/default/classMapper.js +2 -22
- package/lib/cjs/components/default/classMapper.js.map +1 -1
- package/lib/cjs/components/default/discriminatorMappingMapper.js.map +1 -1
- package/lib/cjs/components/default/genericsMapper.js +61 -47
- package/lib/cjs/components/default/genericsMapper.js.map +1 -1
- package/lib/cjs/components/default/inheritedClassMapper.js.map +1 -1
- package/lib/cjs/components/default/lazyRefMapper.js +1 -2
- package/lib/cjs/components/default/lazyRefMapper.js.map +1 -1
- package/lib/cjs/components/default/mapMapper.js +0 -2
- package/lib/cjs/components/default/mapMapper.js.map +1 -1
- package/lib/cjs/components/default/nextMapper.js +80 -0
- package/lib/cjs/components/default/nextMapper.js.map +1 -0
- package/lib/cjs/components/default/nullableMapper.js.map +1 -1
- package/lib/cjs/components/default/objectMapper.js +8 -3
- package/lib/cjs/components/default/objectMapper.js.map +1 -1
- package/lib/cjs/components/default/ofMapper.js +2 -5
- package/lib/cjs/components/default/ofMapper.js.map +1 -1
- package/lib/cjs/components/default/requiredMapper.js +2 -2
- package/lib/cjs/components/default/requiredMapper.js.map +1 -1
- package/lib/cjs/components/default/schemaMapper.js +6 -7
- package/lib/cjs/components/default/schemaMapper.js.map +1 -1
- package/lib/cjs/components/index.js +1 -7
- package/lib/cjs/components/index.js.map +1 -1
- package/lib/cjs/components/open-spec/enumsMapper.js.map +1 -1
- package/lib/cjs/components/open-spec/generate.js.map +1 -1
- package/lib/cjs/components/open-spec/nullableMapper.js +5 -1
- package/lib/cjs/components/open-spec/nullableMapper.js.map +1 -1
- package/lib/cjs/components/open-spec/operationInFilesMapper.js.map +1 -1
- package/lib/cjs/components/open-spec/operationInParameterMapper.js +3 -7
- package/lib/cjs/components/open-spec/operationInParameterMapper.js.map +1 -1
- package/lib/cjs/components/open-spec/operationInQueryMapper.js +21 -16
- package/lib/cjs/components/open-spec/operationInQueryMapper.js.map +1 -1
- package/lib/cjs/components/open-spec/operationMediaMapper.js +5 -2
- package/lib/cjs/components/open-spec/operationMediaMapper.js.map +1 -1
- package/lib/cjs/components/open-spec/operationRequestBodyMapper.js +4 -3
- package/lib/cjs/components/open-spec/operationRequestBodyMapper.js.map +1 -1
- package/lib/cjs/components/open-spec/pathsMapper.js +1 -0
- package/lib/cjs/components/open-spec/pathsMapper.js.map +1 -1
- package/lib/cjs/constants/VendorKeys.js +15 -0
- package/lib/cjs/constants/VendorKeys.js.map +1 -0
- package/lib/cjs/constants/httpStatusMessages.js +1 -1
- package/lib/cjs/constants/httpStatusMessages.js.map +1 -1
- package/lib/cjs/decorators/class/children.js.map +1 -1
- package/lib/cjs/decorators/collections/collectionOf.js +29 -0
- package/lib/cjs/decorators/collections/collectionOf.js.map +1 -1
- package/lib/cjs/decorators/common/allow.js.map +1 -1
- package/lib/cjs/decorators/common/any.js.map +1 -1
- package/lib/cjs/decorators/common/defaultMsg.js.map +1 -1
- package/lib/cjs/decorators/common/description.js +8 -11
- package/lib/cjs/decorators/common/description.js.map +1 -1
- package/lib/cjs/decorators/common/discriminatorKey.js +1 -1
- package/lib/cjs/decorators/common/discriminatorKey.js.map +1 -1
- package/lib/cjs/decorators/common/enum.js.map +1 -1
- package/lib/cjs/decorators/common/examples.js.map +1 -1
- package/lib/cjs/decorators/common/format.js.map +1 -1
- package/lib/cjs/decorators/common/forwardGroups.js +1 -1
- package/lib/cjs/decorators/common/forwardGroups.js.map +1 -1
- package/lib/cjs/decorators/common/groups.js +15 -26
- package/lib/cjs/decorators/common/groups.js.map +1 -1
- package/lib/cjs/decorators/common/integer.js.map +1 -1
- package/lib/cjs/decorators/common/oneOf.js +1 -2
- package/lib/cjs/decorators/common/oneOf.js.map +1 -1
- package/lib/cjs/decorators/common/optional.js.map +1 -1
- package/lib/cjs/decorators/config/jsonEntityComponent.js.map +1 -1
- package/lib/cjs/decorators/generics/genericOf.js +7 -16
- package/lib/cjs/decorators/generics/genericOf.js.map +1 -1
- package/lib/cjs/decorators/generics/generics.js +3 -3
- package/lib/cjs/decorators/generics/generics.js.map +1 -1
- package/lib/cjs/decorators/operations/acceptMime.js.map +1 -1
- package/lib/cjs/decorators/operations/consumes.js.map +1 -1
- package/lib/cjs/decorators/operations/deprecated.js.map +1 -1
- package/lib/cjs/decorators/operations/header.js.map +1 -1
- package/lib/cjs/decorators/operations/in.js.map +1 -1
- package/lib/cjs/decorators/operations/inFile.js +2 -2
- package/lib/cjs/decorators/operations/inFile.js.map +1 -1
- package/lib/cjs/decorators/operations/operation.js +5 -1
- package/lib/cjs/decorators/operations/operation.js.map +1 -1
- package/lib/cjs/decorators/operations/operationId.js.map +1 -1
- package/lib/cjs/decorators/operations/operationPath.js +1 -1
- package/lib/cjs/decorators/operations/operationPath.js.map +1 -1
- package/lib/cjs/decorators/operations/path.js.map +1 -1
- package/lib/cjs/decorators/operations/produces.js.map +1 -1
- package/lib/cjs/decorators/operations/redirect.js +1 -1
- package/lib/cjs/decorators/operations/redirect.js.map +1 -1
- package/lib/cjs/decorators/operations/returns.js +39 -62
- package/lib/cjs/decorators/operations/returns.js.map +1 -1
- package/lib/cjs/decorators/operations/security.js.map +1 -1
- package/lib/cjs/decorators/operations/status.js.map +1 -1
- package/lib/cjs/decorators/operations/summary.js.map +1 -1
- package/lib/cjs/decorators/operations/tags.js +10 -1
- package/lib/cjs/decorators/operations/tags.js.map +1 -1
- package/lib/cjs/domain/DecoratorContext.js.map +1 -1
- package/lib/cjs/domain/JsonClassStore.js +1 -1
- package/lib/cjs/domain/JsonClassStore.js.map +1 -1
- package/lib/cjs/domain/JsonEntityStore.js +40 -35
- package/lib/cjs/domain/JsonEntityStore.js.map +1 -1
- package/lib/cjs/domain/JsonLazyRef.js.map +1 -1
- package/lib/cjs/domain/JsonMap.js.map +1 -1
- package/lib/cjs/domain/JsonMedia.js +27 -6
- package/lib/cjs/domain/JsonMedia.js.map +1 -1
- package/lib/cjs/domain/JsonMethodStore.js +27 -8
- package/lib/cjs/domain/JsonMethodStore.js.map +1 -1
- package/lib/cjs/domain/JsonOperation.js +36 -8
- package/lib/cjs/domain/JsonOperation.js.map +1 -1
- package/lib/cjs/domain/JsonParameter.js +20 -5
- package/lib/cjs/domain/JsonParameter.js.map +1 -1
- package/lib/cjs/domain/JsonParameterStore.js +15 -25
- package/lib/cjs/domain/JsonParameterStore.js.map +1 -1
- package/lib/cjs/domain/JsonPropertyStore.js +14 -45
- package/lib/cjs/domain/JsonPropertyStore.js.map +1 -1
- package/lib/cjs/domain/JsonSchema.js +286 -79
- package/lib/cjs/domain/JsonSchema.js.map +1 -1
- package/lib/cjs/domain/__fixtures__/inspectOperationsPaths.js +11 -0
- package/lib/cjs/domain/__fixtures__/inspectOperationsPaths.js.map +1 -0
- package/lib/cjs/fn/email.js +2 -2
- package/lib/cjs/fn/email.js.map +1 -1
- package/lib/cjs/fn/uri.js +2 -2
- package/lib/cjs/fn/uri.js.map +1 -1
- package/lib/cjs/fn/url.js +2 -2
- package/lib/cjs/fn/url.js.map +1 -1
- package/lib/cjs/index.js +4 -8
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/utils/generics.js +5 -36
- package/lib/cjs/utils/generics.js.map +1 -1
- package/lib/cjs/utils/getJsonEntityStore.js +3 -3
- package/lib/cjs/utils/getJsonEntityStore.js.map +1 -1
- package/lib/cjs/utils/getJsonSchema.js +24 -17
- package/lib/cjs/utils/getJsonSchema.js.map +1 -1
- package/lib/cjs/utils/getOperationsStores.js.map +1 -1
- package/lib/cjs/utils/getPropertiesStores.js.map +1 -1
- package/lib/cjs/utils/getSpec.js.map +1 -1
- package/lib/cjs/utils/mergeSchema.js +103 -0
- package/lib/cjs/utils/mergeSchema.js.map +1 -0
- package/lib/cjs/utils/ref.js +15 -13
- package/lib/cjs/utils/ref.js.map +1 -1
- package/lib/esm/components/default/anyMapper.js +1 -2
- package/lib/esm/components/default/anyMapper.js.map +1 -1
- package/lib/esm/components/default/classMapper.js +2 -22
- package/lib/esm/components/default/classMapper.js.map +1 -1
- package/lib/esm/components/default/discriminatorMappingMapper.js.map +1 -1
- package/lib/esm/components/default/genericsMapper.js +62 -48
- 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/lazyRefMapper.js +1 -2
- package/lib/esm/components/default/lazyRefMapper.js.map +1 -1
- package/lib/esm/components/default/mapMapper.js +0 -2
- package/lib/esm/components/default/mapMapper.js.map +1 -1
- package/lib/esm/components/default/nextMapper.js +75 -0
- package/lib/esm/components/default/nextMapper.js.map +1 -0
- package/lib/esm/components/default/nullableMapper.js.map +1 -1
- package/lib/esm/components/default/objectMapper.js +8 -3
- package/lib/esm/components/default/objectMapper.js.map +1 -1
- package/lib/esm/components/default/ofMapper.js +2 -5
- package/lib/esm/components/default/ofMapper.js.map +1 -1
- package/lib/esm/components/default/requiredMapper.js +2 -2
- package/lib/esm/components/default/requiredMapper.js.map +1 -1
- package/lib/esm/components/default/schemaMapper.js +7 -8
- package/lib/esm/components/default/schemaMapper.js.map +1 -1
- package/lib/esm/components/index.js +1 -7
- package/lib/esm/components/index.js.map +1 -1
- package/lib/esm/components/open-spec/enumsMapper.js.map +1 -1
- package/lib/esm/components/open-spec/generate.js.map +1 -1
- package/lib/esm/components/open-spec/nullableMapper.js +5 -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 +3 -7
- package/lib/esm/components/open-spec/operationInParameterMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationInQueryMapper.js +22 -17
- package/lib/esm/components/open-spec/operationInQueryMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationMediaMapper.js +5 -2
- package/lib/esm/components/open-spec/operationMediaMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationRequestBodyMapper.js +4 -3
- package/lib/esm/components/open-spec/operationRequestBodyMapper.js.map +1 -1
- package/lib/esm/components/open-spec/pathsMapper.js +1 -0
- package/lib/esm/components/open-spec/pathsMapper.js.map +1 -1
- package/lib/esm/constants/VendorKeys.js +12 -0
- package/lib/esm/constants/VendorKeys.js.map +1 -0
- 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/collections/collectionOf.js +29 -0
- package/lib/esm/decorators/collections/collectionOf.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/defaultMsg.js.map +1 -1
- package/lib/esm/decorators/common/description.js +9 -12
- package/lib/esm/decorators/common/description.js.map +1 -1
- package/lib/esm/decorators/common/discriminatorKey.js +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/forwardGroups.js +1 -1
- package/lib/esm/decorators/common/forwardGroups.js.map +1 -1
- package/lib/esm/decorators/common/groups.js +15 -26
- package/lib/esm/decorators/common/groups.js.map +1 -1
- package/lib/esm/decorators/common/integer.js.map +1 -1
- package/lib/esm/decorators/common/oneOf.js +1 -2
- package/lib/esm/decorators/common/oneOf.js.map +1 -1
- package/lib/esm/decorators/common/optional.js.map +1 -1
- package/lib/esm/decorators/config/jsonEntityComponent.js.map +1 -1
- package/lib/esm/decorators/generics/genericOf.js +8 -17
- package/lib/esm/decorators/generics/genericOf.js.map +1 -1
- package/lib/esm/decorators/generics/generics.js +3 -3
- package/lib/esm/decorators/generics/generics.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 +5 -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 +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 +1 -1
- package/lib/esm/decorators/operations/redirect.js.map +1 -1
- package/lib/esm/decorators/operations/returns.js +40 -63
- package/lib/esm/decorators/operations/returns.js.map +1 -1
- package/lib/esm/decorators/operations/security.js.map +1 -1
- 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 +10 -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 +40 -35
- 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 +27 -6
- package/lib/esm/domain/JsonMedia.js.map +1 -1
- package/lib/esm/domain/JsonMethodStore.js +28 -9
- package/lib/esm/domain/JsonMethodStore.js.map +1 -1
- package/lib/esm/domain/JsonOperation.js +34 -7
- package/lib/esm/domain/JsonOperation.js.map +1 -1
- package/lib/esm/domain/JsonParameter.js +20 -5
- package/lib/esm/domain/JsonParameter.js.map +1 -1
- package/lib/esm/domain/JsonParameterStore.js +16 -26
- package/lib/esm/domain/JsonParameterStore.js.map +1 -1
- package/lib/esm/domain/JsonPropertyStore.js +15 -46
- package/lib/esm/domain/JsonPropertyStore.js.map +1 -1
- package/lib/esm/domain/JsonSchema.js +287 -80
- package/lib/esm/domain/JsonSchema.js.map +1 -1
- package/lib/esm/domain/__fixtures__/inspectOperationsPaths.js +7 -0
- package/lib/esm/domain/__fixtures__/inspectOperationsPaths.js.map +1 -0
- package/lib/esm/fn/email.js +2 -2
- package/lib/esm/fn/email.js.map +1 -1
- package/lib/esm/fn/uri.js +2 -2
- package/lib/esm/fn/uri.js.map +1 -1
- package/lib/esm/fn/url.js +2 -2
- package/lib/esm/fn/url.js.map +1 -1
- package/lib/esm/index.js +4 -8
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/utils/generics.js +3 -32
- package/lib/esm/utils/generics.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/getJsonSchema.js +24 -17
- package/lib/esm/utils/getJsonSchema.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/mergeSchema.js +99 -0
- package/lib/esm/utils/mergeSchema.js.map +1 -0
- package/lib/esm/utils/ref.js +14 -13
- package/lib/esm/utils/ref.js.map +1 -1
- package/lib/types/components/default/classMapper.d.ts +1 -1
- package/lib/types/components/default/genericsMapper.d.ts +9 -2
- package/lib/types/components/default/lazyRefMapper.d.ts +1 -1
- package/lib/types/components/default/nextMapper.d.ts +5 -0
- package/lib/types/components/default/ofMapper.d.ts +1 -1
- package/lib/types/components/index.d.ts +1 -7
- package/lib/types/components/open-spec/nullableMapper.d.ts +2 -1
- package/lib/types/components/open-spec/operationInQueryMapper.d.ts +1 -1
- package/lib/types/constants/VendorKeys.d.ts +10 -0
- package/lib/types/decorators/collections/collectionOf.d.ts +6 -0
- package/lib/types/decorators/generics/genericOf.d.ts +3 -0
- package/lib/types/decorators/generics/generics.d.ts +2 -2
- package/lib/types/decorators/operations/acceptMime.d.ts +1 -1
- package/lib/types/decorators/operations/consumes.d.ts +1 -1
- package/lib/types/decorators/operations/header.d.ts +1 -1
- package/lib/types/decorators/operations/operationId.d.ts +1 -1
- package/lib/types/decorators/operations/operationPath.d.ts +1 -1
- package/lib/types/decorators/operations/path.d.ts +1 -1
- package/lib/types/decorators/operations/returns.d.ts +11 -9
- package/lib/types/decorators/operations/tags.d.ts +11 -2
- package/lib/types/domain/JsonClassStore.d.ts +1 -1
- package/lib/types/domain/JsonEntityStore.d.ts +20 -16
- package/lib/types/domain/JsonMedia.d.ts +4 -5
- package/lib/types/domain/JsonMethodStore.d.ts +9 -2
- package/lib/types/domain/JsonOperation.d.ts +7 -4
- package/lib/types/domain/JsonParameter.d.ts +4 -7
- package/lib/types/domain/JsonParameterStore.d.ts +1 -4
- package/lib/types/domain/JsonPropertyStore.d.ts +2 -21
- package/lib/types/domain/JsonSchema.d.ts +83 -40
- package/lib/types/domain/__fixtures__/inspectOperationsPaths.d.ts +5 -0
- package/lib/types/index.d.ts +4 -8
- package/lib/types/interfaces/JsonSchemaOptions.d.ts +16 -2
- package/lib/types/utils/generics.d.ts +7 -48
- package/lib/types/utils/getJsonEntityStore.d.ts +3 -3
- package/lib/types/utils/getJsonSchema.d.ts +3 -2
- package/lib/types/utils/mergeSchema.d.ts +2 -0
- package/lib/types/utils/ref.d.ts +4 -2
- package/lib/types-esm/components/default/classMapper.d.ts +1 -1
- package/lib/types-esm/components/default/genericsMapper.d.ts +9 -2
- package/lib/types-esm/components/default/lazyRefMapper.d.ts +1 -1
- package/lib/types-esm/components/default/nextMapper.d.ts +5 -0
- package/lib/types-esm/components/default/ofMapper.d.ts +1 -1
- package/lib/types-esm/components/index.d.ts +1 -7
- package/lib/types-esm/components/open-spec/nullableMapper.d.ts +2 -1
- package/lib/types-esm/components/open-spec/operationInQueryMapper.d.ts +1 -1
- package/lib/types-esm/constants/VendorKeys.d.ts +10 -0
- package/lib/types-esm/decorators/collections/collectionOf.d.ts +6 -0
- package/lib/types-esm/decorators/generics/genericOf.d.ts +3 -0
- package/lib/types-esm/decorators/generics/generics.d.ts +2 -2
- package/lib/types-esm/decorators/operations/acceptMime.d.ts +1 -1
- package/lib/types-esm/decorators/operations/consumes.d.ts +1 -1
- package/lib/types-esm/decorators/operations/header.d.ts +1 -1
- package/lib/types-esm/decorators/operations/operationId.d.ts +1 -1
- package/lib/types-esm/decorators/operations/operationPath.d.ts +1 -1
- package/lib/types-esm/decorators/operations/path.d.ts +1 -1
- package/lib/types-esm/decorators/operations/returns.d.ts +11 -9
- package/lib/types-esm/decorators/operations/tags.d.ts +11 -2
- package/lib/types-esm/domain/JsonClassStore.d.ts +1 -1
- package/lib/types-esm/domain/JsonEntityStore.d.ts +20 -16
- package/lib/types-esm/domain/JsonMedia.d.ts +4 -5
- package/lib/types-esm/domain/JsonMethodStore.d.ts +9 -2
- package/lib/types-esm/domain/JsonOperation.d.ts +7 -4
- package/lib/types-esm/domain/JsonParameter.d.ts +4 -7
- package/lib/types-esm/domain/JsonParameterStore.d.ts +1 -4
- package/lib/types-esm/domain/JsonPropertyStore.d.ts +2 -21
- package/lib/types-esm/domain/JsonSchema.d.ts +83 -40
- package/lib/types-esm/domain/__fixtures__/inspectOperationsPaths.d.ts +5 -0
- package/lib/types-esm/index.d.ts +4 -8
- package/lib/types-esm/interfaces/JsonSchemaOptions.d.ts +16 -2
- package/lib/types-esm/utils/generics.d.ts +7 -48
- package/lib/types-esm/utils/getJsonEntityStore.d.ts +3 -3
- package/lib/types-esm/utils/getJsonSchema.d.ts +3 -2
- package/lib/types-esm/utils/mergeSchema.d.ts +2 -0
- package/lib/types-esm/utils/ref.d.ts +4 -2
- package/package.json +6 -6
- 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/itemMapper.js +0 -10
- package/lib/cjs/components/default/itemMapper.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/utils/somethingOf.js +0 -16
- package/lib/cjs/utils/somethingOf.js.map +0 -1
- package/lib/esm/components/async-api/channelsMapper.js +0 -58
- package/lib/esm/components/async-api/channelsMapper.js.map +0 -1
- package/lib/esm/components/async-api/generate.js +0 -18
- package/lib/esm/components/async-api/generate.js.map +0 -1
- package/lib/esm/components/async-api/messageMapper.js +0 -40
- package/lib/esm/components/async-api/messageMapper.js.map +0 -1
- package/lib/esm/components/async-api/payloadMapper.js +0 -48
- package/lib/esm/components/async-api/payloadMapper.js.map +0 -1
- package/lib/esm/components/async-api/responseMapper.js +0 -54
- package/lib/esm/components/async-api/responseMapper.js.map +0 -1
- package/lib/esm/components/default/itemMapper.js +0 -6
- package/lib/esm/components/default/itemMapper.js.map +0 -1
- package/lib/esm/components/default/propertiesMapper.js +0 -21
- package/lib/esm/components/default/propertiesMapper.js.map +0 -1
- package/lib/esm/utils/somethingOf.js +0 -12
- package/lib/esm/utils/somethingOf.js.map +0 -1
- package/lib/types/components/async-api/channelsMapper.d.ts +0 -2
- package/lib/types/components/async-api/generate.d.ts +0 -1
- package/lib/types/components/async-api/messageMapper.d.ts +0 -6
- package/lib/types/components/async-api/payloadMapper.d.ts +0 -4
- package/lib/types/components/async-api/responseMapper.d.ts +0 -6
- package/lib/types/components/default/itemMapper.d.ts +0 -2
- package/lib/types/components/default/propertiesMapper.d.ts +0 -3
- package/lib/types/utils/somethingOf.d.ts +0 -1
- 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/itemMapper.d.ts +0 -2
- package/lib/types-esm/components/default/propertiesMapper.d.ts +0 -3
- package/lib/types-esm/utils/somethingOf.d.ts +0 -1
|
@@ -1,67 +1,99 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import { Type, ValueOf, Hooks } from "@tsed/core";
|
|
2
|
+
import type { JSONSchema7, JSONSchema7Definition, JSONSchema7Type, JSONSchema7TypeName, JSONSchema7Version } from "json-schema";
|
|
3
|
+
import { VendorKeys } from "../constants/VendorKeys.js";
|
|
3
4
|
import { IgnoreCallback } from "../interfaces/IgnoreCallback.js";
|
|
4
5
|
import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions.js";
|
|
5
|
-
import {
|
|
6
|
+
import { type GenericsMap, GenericValue } from "../utils/generics.js";
|
|
6
7
|
import { AliasMap, AliasType } from "./JsonAliasMap.js";
|
|
7
8
|
import { Discriminator } from "./JsonDiscriminator.js";
|
|
8
9
|
import { JsonFormatTypes } from "./JsonFormatTypes.js";
|
|
9
10
|
import { JsonLazyRef } from "./JsonLazyRef.js";
|
|
10
|
-
export interface JsonSchemaObject extends
|
|
11
|
-
type
|
|
12
|
-
additionalProperties?: boolean |
|
|
13
|
-
|
|
14
|
-
items?: (any | JSONSchema6Definition) | (any | JSONSchema6Definition)[];
|
|
11
|
+
export interface JsonSchemaObject extends Omit<JSONSchema7, "type" | "additionalProperties" | "items"> {
|
|
12
|
+
type?: Type | JSONSchema7["type"] | null | (String | null | Date | Number | Object | Boolean)[];
|
|
13
|
+
additionalProperties?: boolean | JSONSchema7 | Type | JsonSchema;
|
|
14
|
+
items?: (Type | JSONSchema7Definition | JsonSchema) | (Type | JSONSchema7Definition | JsonSchema)[];
|
|
15
15
|
}
|
|
16
|
-
export type AnyJsonSchema =
|
|
17
|
-
|
|
16
|
+
export type AnyJsonSchema = JsonSchemaObject | JSONSchema7 | JsonSchema | JsonLazyRef | {
|
|
17
|
+
label?: string;
|
|
18
|
+
} | Type;
|
|
19
|
+
export declare class JsonSchema extends Map<string, any> {
|
|
18
20
|
#private;
|
|
19
21
|
readonly $kind: string;
|
|
20
22
|
readonly $isJsonDocument = true;
|
|
21
23
|
readonly $hooks: Hooks;
|
|
22
|
-
readonly $required: Set<string>;
|
|
23
24
|
readonly $allow: any[];
|
|
24
25
|
$selfRequired: boolean;
|
|
25
|
-
$forwardGroups: boolean;
|
|
26
26
|
$ignore: boolean | IgnoreCallback;
|
|
27
27
|
isDiscriminatorKey: boolean;
|
|
28
28
|
isDiscriminator: boolean;
|
|
29
29
|
constructor(obj?: JsonSchema | Partial<JsonSchemaObject>);
|
|
30
30
|
get alias(): AliasMap;
|
|
31
|
-
get nestedGenerics(): any[];
|
|
32
|
-
set nestedGenerics(value: any[]);
|
|
33
|
-
get genericLabels(): string[];
|
|
34
|
-
set genericLabels(value: string[]);
|
|
35
31
|
get isClass(): boolean;
|
|
36
32
|
/**
|
|
37
|
-
*
|
|
33
|
+
* The current schema is a collection
|
|
38
34
|
*/
|
|
39
35
|
get isCollection(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The current schema is a reference to another schema
|
|
38
|
+
* to link property/param to a class schema (if the reference exists).
|
|
39
|
+
*/
|
|
40
|
+
get isLocalSchema(): boolean;
|
|
40
41
|
/**
|
|
41
42
|
* Current schema is a generic
|
|
42
43
|
*/
|
|
43
44
|
get isGeneric(): boolean;
|
|
44
45
|
get discriminatorAncestor(): any;
|
|
45
46
|
/**
|
|
46
|
-
*
|
|
47
|
+
* Return the itemSchema computed type.
|
|
48
|
+
* If the type is a function used for a recursive model,
|
|
49
|
+
* the function will be called to get the right type.
|
|
50
|
+
*/
|
|
51
|
+
get class(): Type<any>;
|
|
52
|
+
/**
|
|
53
|
+
* Return the itemSchema computed type.
|
|
47
54
|
*/
|
|
48
|
-
get
|
|
49
|
-
get genericType(): string;
|
|
50
|
-
get class(): any;
|
|
55
|
+
get collectionClass(): Type<any>;
|
|
51
56
|
get canRef(): boolean;
|
|
52
57
|
get isNullable(): boolean;
|
|
53
58
|
get isReadOnly(): any;
|
|
54
59
|
get isWriteOnly(): any;
|
|
55
60
|
get hasDiscriminator(): boolean;
|
|
56
|
-
static from(
|
|
57
|
-
|
|
61
|
+
static from(item?: Partial<JsonSchemaObject> | Type<any> | JsonSchema): JsonSchema;
|
|
62
|
+
/**
|
|
63
|
+
* Check if the schema as key, #key or x-key
|
|
64
|
+
* @param key
|
|
65
|
+
*/
|
|
66
|
+
has(key: string): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Get the value of the schema by key, #key or x-key.
|
|
69
|
+
* @param key
|
|
70
|
+
* @param defaultValue
|
|
71
|
+
*/
|
|
72
|
+
get<T = any>(key: string, defaultValue: T): T;
|
|
73
|
+
get<T = any>(key: string, defaultValue?: T): T | undefined;
|
|
74
|
+
forwardGroups(bool?: boolean): this;
|
|
75
|
+
groups(groups?: string[], isProperty?: boolean): this;
|
|
76
|
+
groupsName(groupsName?: string): this;
|
|
77
|
+
allowedGroups(groups?: string[]): this;
|
|
78
|
+
/**
|
|
79
|
+
* Assign the Generic Labels used over a class or a schema.
|
|
80
|
+
* @param genericLabels
|
|
81
|
+
*/
|
|
82
|
+
genericLabels(genericLabels: string[]): this;
|
|
83
|
+
genericLabel(genericLabel: string): this;
|
|
84
|
+
/**
|
|
85
|
+
* Assign the types of the generics that must be used for the property
|
|
86
|
+
* @param generics
|
|
87
|
+
*/
|
|
88
|
+
genericOf(...generics: GenericValue[][]): this;
|
|
89
|
+
nullable(value: boolean): this;
|
|
58
90
|
itemSchema(obj?: AnyJsonSchema): JsonSchema;
|
|
59
91
|
getAliasOf(property: AliasType): AliasType | undefined;
|
|
60
92
|
addAlias(property: AliasType, alias: AliasType): this;
|
|
61
93
|
removeAlias(property: AliasType): this;
|
|
62
94
|
$id($id: string): this;
|
|
63
95
|
$ref($ref: string): this;
|
|
64
|
-
$schema($schema:
|
|
96
|
+
$schema($schema: JSONSchema7Version): this;
|
|
65
97
|
/**
|
|
66
98
|
* Create a ref and use name to sharing schema
|
|
67
99
|
* @param name
|
|
@@ -74,12 +106,12 @@ export declare class JsonSchema extends Map<string, any> implements NestedGeneri
|
|
|
74
106
|
* It is RECOMMENDED that a default value be valid against the associated schema.
|
|
75
107
|
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3
|
|
76
108
|
*/
|
|
77
|
-
default(value:
|
|
109
|
+
default(value: JSONSchema7Type | undefined | (() => JSONSchema7Type)): this;
|
|
78
110
|
/**
|
|
79
111
|
* More readible form of a one-element "enum"
|
|
80
112
|
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24
|
|
81
113
|
*/
|
|
82
|
-
const(value:
|
|
114
|
+
const(value: JSONSchema7Type): this;
|
|
83
115
|
/**
|
|
84
116
|
* This attribute is a string that provides a full description of the of purpose the instance property.
|
|
85
117
|
*
|
|
@@ -103,17 +135,17 @@ export declare class JsonSchema extends Map<string, any> implements NestedGeneri
|
|
|
103
135
|
* An array instance is valid against "contains" if at least one of its elements is valid against the given schema.
|
|
104
136
|
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14
|
|
105
137
|
*/
|
|
106
|
-
contains(contains:
|
|
138
|
+
contains(contains: JSONSchema7Definition): this;
|
|
107
139
|
/**
|
|
108
140
|
* Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword
|
|
109
141
|
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4
|
|
110
142
|
*/
|
|
111
|
-
examples(examples:
|
|
143
|
+
examples(examples: JSONSchema7Type[]): this;
|
|
112
144
|
/**
|
|
113
145
|
* Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword
|
|
114
146
|
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4
|
|
115
147
|
*/
|
|
116
|
-
example(...examples:
|
|
148
|
+
example(...examples: JSONSchema7Type[]): this;
|
|
117
149
|
/**
|
|
118
150
|
* This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.
|
|
119
151
|
* Omitting this keyword has the same behavior as an empty schema.
|
|
@@ -166,6 +198,7 @@ export declare class JsonSchema extends Map<string, any> implements NestedGeneri
|
|
|
166
198
|
addRequired(property: string): this;
|
|
167
199
|
removeRequired(property: string): this;
|
|
168
200
|
isRequired(property: string): boolean;
|
|
201
|
+
getRequiredFields(): string[];
|
|
169
202
|
/**
|
|
170
203
|
* This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.
|
|
171
204
|
* Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,
|
|
@@ -210,7 +243,7 @@ export declare class JsonSchema extends Map<string, any> implements NestedGeneri
|
|
|
210
243
|
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21
|
|
211
244
|
*/
|
|
212
245
|
dependencies(dependencies: {
|
|
213
|
-
[p: string]:
|
|
246
|
+
[p: string]: JSONSchema7Definition | JsonSchema | string[];
|
|
214
247
|
}): this;
|
|
215
248
|
/**
|
|
216
249
|
* Takes a schema which validates the names of all properties rather than their values.
|
|
@@ -218,7 +251,7 @@ export declare class JsonSchema extends Map<string, any> implements NestedGeneri
|
|
|
218
251
|
* Omitting this keyword has the same behavior as an empty schema.
|
|
219
252
|
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22
|
|
220
253
|
*/
|
|
221
|
-
propertyNames(propertyNames:
|
|
254
|
+
propertyNames(propertyNames: JSONSchema7Definition | JsonSchema): this;
|
|
222
255
|
/**
|
|
223
256
|
* This provides an enumeration of all possible values that are valid
|
|
224
257
|
* for the instance property. This MUST be an array, and each item in
|
|
@@ -303,7 +336,7 @@ export declare class JsonSchema extends Map<string, any> implements NestedGeneri
|
|
|
303
336
|
* A single type, or a union of simple types
|
|
304
337
|
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25
|
|
305
338
|
*/
|
|
306
|
-
type(type: any |
|
|
339
|
+
type(type: any | JSONSchema7TypeName | JSONSchema7TypeName[]): this;
|
|
307
340
|
any(...types: any[]): this;
|
|
308
341
|
integer(): this;
|
|
309
342
|
/**
|
|
@@ -315,26 +348,36 @@ export declare class JsonSchema extends Map<string, any> implements NestedGeneri
|
|
|
315
348
|
readOnly(readOnly: boolean): this;
|
|
316
349
|
writeOnly(readOnly: boolean): this;
|
|
317
350
|
customKey(key: string, value: any): this;
|
|
351
|
+
vendorKey(key: VendorKeys, value: any): this;
|
|
318
352
|
toObject(options?: JsonSchemaOptions): any;
|
|
319
353
|
toJSON(options?: JsonSchemaOptions): any;
|
|
320
|
-
assign(obj?:
|
|
354
|
+
assign(obj?: AnyJsonSchema): this;
|
|
321
355
|
set(key: string, value: any): this;
|
|
322
|
-
/**
|
|
323
|
-
* Return the itemSchema computed type.
|
|
324
|
-
* If the type is a function used for recursive model,
|
|
325
|
-
* the function will be called to get the right type.
|
|
326
|
-
*/
|
|
327
|
-
getComputedType(): any;
|
|
328
|
-
getComputedItemType(): any;
|
|
329
356
|
/**
|
|
330
357
|
* Return the Json type as string
|
|
331
358
|
*/
|
|
332
359
|
getJsonType(): string | string[];
|
|
333
360
|
getTarget(): Type<any>;
|
|
361
|
+
getAllowedGroups(): Set<string> | undefined;
|
|
362
|
+
getAllowedRequiredValues(): any[];
|
|
363
|
+
getGroups(): string[] | undefined;
|
|
364
|
+
getGroupsName(): string | undefined;
|
|
334
365
|
/**
|
|
335
366
|
* Get the symbolic name of the entity
|
|
336
367
|
*/
|
|
337
368
|
getName(): any;
|
|
338
369
|
clone(): JsonSchema;
|
|
370
|
+
getGenericLabels(): string[] | undefined;
|
|
371
|
+
getGenericOf(): GenericsMap | undefined;
|
|
372
|
+
/**
|
|
373
|
+
* Returns the reference schema for class-based schemas.
|
|
374
|
+
* Used to get the original schema definition when this schema is a local reference.
|
|
375
|
+
* @returns The reference schema or undefined if not applicable
|
|
376
|
+
*/
|
|
377
|
+
getRefSchema(): JsonSchema | undefined;
|
|
378
|
+
propertyKey(s: string): this;
|
|
379
|
+
getPropertyKey(): string | symbol | undefined;
|
|
380
|
+
target(target: any): void;
|
|
381
|
+
isRequiredValue(property: string, value: any): boolean;
|
|
339
382
|
protected setManyOf(keyword: "oneOf" | "anyOf" | "allOf", value: AnyJsonSchema[]): this | undefined;
|
|
340
383
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Automatically generated by @tsed/barrels.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./components/async-api/channelsMapper.js";
|
|
5
|
-
export * from "./components/async-api/generate.js";
|
|
6
|
-
export * from "./components/async-api/messageMapper.js";
|
|
7
|
-
export * from "./components/async-api/payloadMapper.js";
|
|
8
|
-
export * from "./components/async-api/responseMapper.js";
|
|
9
4
|
export * from "./components/default/anyMapper.js";
|
|
10
5
|
export * from "./components/default/classMapper.js";
|
|
11
6
|
export * from "./components/default/discriminatorMappingMapper.js";
|
|
12
7
|
export * from "./components/default/enumsMapper.js";
|
|
13
8
|
export * from "./components/default/genericsMapper.js";
|
|
14
9
|
export * from "./components/default/inheritedClassMapper.js";
|
|
15
|
-
export * from "./components/default/itemMapper.js";
|
|
16
10
|
export * from "./components/default/lazyRefMapper.js";
|
|
17
11
|
export * from "./components/default/mapMapper.js";
|
|
12
|
+
export * from "./components/default/nextMapper.js";
|
|
18
13
|
export * from "./components/default/nullableMapper.js";
|
|
19
14
|
export * from "./components/default/objectMapper.js";
|
|
20
15
|
export * from "./components/default/ofMapper.js";
|
|
21
|
-
export * from "./components/default/propertiesMapper.js";
|
|
22
16
|
export * from "./components/default/requiredMapper.js";
|
|
23
17
|
export * from "./components/default/schemaMapper.js";
|
|
24
18
|
export * from "./components/index.js";
|
|
@@ -38,6 +32,7 @@ export * from "./components/open-spec/pathsMapper.js";
|
|
|
38
32
|
export * from "./constants/httpStatusMessages.js";
|
|
39
33
|
export * from "./constants/jsonSchemaProperties.js";
|
|
40
34
|
export * from "./constants/OperationVerbs.js";
|
|
35
|
+
export * from "./constants/VendorKeys.js";
|
|
41
36
|
export * from "./decorators/class/children.js";
|
|
42
37
|
export * from "./decorators/class/discriminatorValue.js";
|
|
43
38
|
export * from "./decorators/collections/collectionContains.js";
|
|
@@ -118,6 +113,7 @@ export * from "./decorators/operations/subscribe.js";
|
|
|
118
113
|
export * from "./decorators/operations/summary.js";
|
|
119
114
|
export * from "./decorators/operations/tags.js";
|
|
120
115
|
export * from "./decorators/operations/view.js";
|
|
116
|
+
export * from "./domain/__fixtures__/inspectOperationsPaths.js";
|
|
121
117
|
export * from "./domain/DecoratorContext.js";
|
|
122
118
|
export * from "./domain/JsonAliasMap.js";
|
|
123
119
|
export * from "./domain/JsonClassStore.js";
|
|
@@ -190,12 +186,12 @@ export * from "./utils/mapOpenSpec3.js";
|
|
|
190
186
|
export * from "./utils/mapOpenSpecInfo.js";
|
|
191
187
|
export * from "./utils/mapOperationOptions.js";
|
|
192
188
|
export * from "./utils/matchGroups.js";
|
|
189
|
+
export * from "./utils/mergeSchema.js";
|
|
193
190
|
export * from "./utils/mergeSpec.js";
|
|
194
191
|
export * from "./utils/operationIdFormatter.js";
|
|
195
192
|
export * from "./utils/ref.js";
|
|
196
193
|
export * from "./utils/removeHiddenOperation.js";
|
|
197
194
|
export * from "./utils/serializeEnumValues.js";
|
|
198
|
-
export * from "./utils/somethingOf.js";
|
|
199
195
|
export * from "./utils/toJsonMapCollection.js";
|
|
200
196
|
export * from "./utils/toJsonRegex.js";
|
|
201
197
|
export * from "./utils/transformToOS2.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SpecTypes } from "../domain/SpecTypes.js";
|
|
2
|
+
import type { GenericsMap } from "../utils/generics.js";
|
|
2
3
|
export interface JsonSchemaOptions {
|
|
3
4
|
/**
|
|
4
5
|
* Map properties with the alias name. By default, false
|
|
@@ -13,12 +14,16 @@ export interface JsonSchemaOptions {
|
|
|
13
14
|
*/
|
|
14
15
|
specType?: SpecTypes;
|
|
15
16
|
/**
|
|
16
|
-
* Define
|
|
17
|
+
* Define the spec version for OPENAPI (3.1.0, 3.0.3, 3.0.2, 3.0.1, 3.0.0)
|
|
18
|
+
*/
|
|
19
|
+
specVersion?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Define a group restriction to generate the JsonSchema.
|
|
17
22
|
* Set false to disable groups.
|
|
18
23
|
*/
|
|
19
24
|
groups?: string[] | false;
|
|
20
25
|
/**
|
|
21
|
-
* Set the postfix groups name for generated model and ref.
|
|
26
|
+
* Set the postfix groups name for a generated model and ref.
|
|
22
27
|
*/
|
|
23
28
|
groupsName?: string;
|
|
24
29
|
/**
|
|
@@ -29,5 +34,14 @@ export interface JsonSchemaOptions {
|
|
|
29
34
|
* Inline enums when enum instead of using $ref.
|
|
30
35
|
*/
|
|
31
36
|
inlineEnums?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Represents optional generic definitions that adhere to the JSON Schema standard.
|
|
39
|
+
*
|
|
40
|
+
* This property allows the specification of generics when constructing or representing a JSON schema.
|
|
41
|
+
* It can be used to define reusable and parameterized components within the schema structure.
|
|
42
|
+
*
|
|
43
|
+
* @type {GenericsMap|undefined}
|
|
44
|
+
*/
|
|
45
|
+
generics?: GenericsMap;
|
|
32
46
|
[key: string]: any;
|
|
33
47
|
}
|
|
@@ -1,50 +1,9 @@
|
|
|
1
1
|
import { Type } from "@tsed/core";
|
|
2
2
|
import { JsonSchema } from "../domain/JsonSchema.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
export interface GenericTypes {
|
|
12
|
-
genericTypes: Type<any>[];
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @ignore
|
|
17
|
-
*/
|
|
18
|
-
export interface GenericLabels {
|
|
19
|
-
genericLabels: string[];
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @ignore
|
|
24
|
-
*/
|
|
25
|
-
export interface NestedGenerics {
|
|
26
|
-
nestedGenerics: GenericValue[][];
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @ignore
|
|
31
|
-
*/
|
|
32
|
-
export interface GenericsContext extends GenericTypes, GenericLabels, NestedGenerics {
|
|
33
|
-
generics: GenericsMap;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* @ignore
|
|
37
|
-
* @param genericLabels
|
|
38
|
-
* @param genericTypes
|
|
39
|
-
*/
|
|
40
|
-
export declare function getGenericsMap(genericLabels: string[], genericTypes: GenericValue[]): GenericsMap;
|
|
41
|
-
/**
|
|
42
|
-
* @ignore
|
|
43
|
-
* @param options
|
|
44
|
-
*/
|
|
45
|
-
export declare function mapGenericsOptions(options: Partial<GenericTypes & GenericLabels>): Partial<GenericTypes & GenericLabels>;
|
|
46
|
-
/**
|
|
47
|
-
* @ignore
|
|
48
|
-
* @param value
|
|
49
|
-
*/
|
|
50
|
-
export declare function popGenerics(value: NestedGenerics): NestedGenerics & GenericTypes;
|
|
3
|
+
import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions.js";
|
|
4
|
+
export type GenericValue = Type<any> | JsonSchema | String | Number | Boolean | Object | Date;
|
|
5
|
+
export type GenericsMap = Record<string, [GenericValue] | [GenericValue, GenericsMap]>;
|
|
6
|
+
export declare function getGenericsOptions(value: JsonSchema, options: JsonSchemaOptions): {
|
|
7
|
+
generics: GenericsMap | undefined;
|
|
8
|
+
mapper: string;
|
|
9
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Type } from "@tsed/core";
|
|
2
|
-
import { JsonEntityStore } from "../domain/JsonEntityStore.js";
|
|
3
2
|
import { JsonClassStore } from "../domain/JsonClassStore.js";
|
|
4
|
-
import {
|
|
5
|
-
import { JsonParameterStore } from "../domain/JsonParameterStore.js";
|
|
3
|
+
import { JsonEntityStore } from "../domain/JsonEntityStore.js";
|
|
6
4
|
import { JsonMethodStore } from "../domain/JsonMethodStore.js";
|
|
5
|
+
import { JsonParameterStore } from "../domain/JsonParameterStore.js";
|
|
6
|
+
import { JsonPropertyStore } from "../domain/JsonPropertyStore.js";
|
|
7
7
|
/**
|
|
8
8
|
* Get entity store from decorator args
|
|
9
9
|
* @param target
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import "../components/index.js";
|
|
1
2
|
import { Type } from "@tsed/core";
|
|
2
|
-
import "../
|
|
3
|
+
import { JsonParameterStore } from "../domain/JsonParameterStore.js";
|
|
3
4
|
import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions.js";
|
|
4
|
-
export declare function getJsonSchema(model: Type<any> |
|
|
5
|
+
export declare function getJsonSchema(model: Type<any> | JsonParameterStore, options?: JsonSchemaOptions): any;
|
package/lib/types/utils/ref.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { JSONSchema7 } from "json-schema";
|
|
1
2
|
import type { JsonSchema } from "../domain/JsonSchema.js";
|
|
2
3
|
import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions.js";
|
|
4
|
+
export declare function getSchemaFromRef($ref: string | undefined, options: JsonSchemaOptions): JSONSchema7 | undefined;
|
|
3
5
|
/**
|
|
4
6
|
* @ignore
|
|
5
7
|
*/
|
|
@@ -7,8 +9,8 @@ export declare function createRefName(name: string, options: JsonSchemaOptions):
|
|
|
7
9
|
/**
|
|
8
10
|
* @ignore
|
|
9
11
|
*/
|
|
10
|
-
export declare function createRef(name: string, schema: JsonSchema, options: JsonSchemaOptions):
|
|
12
|
+
export declare function createRef(name: string, schema: JsonSchema, options: JsonSchemaOptions): JSONSchema7;
|
|
11
13
|
/**
|
|
12
14
|
* @ignore
|
|
13
15
|
*/
|
|
14
|
-
export declare function toRef(value: JsonSchema, schema:
|
|
16
|
+
export declare function toRef(value: JsonSchema, schema: JSONSchema7 | undefined | null, options: JsonSchemaOptions): JSONSchema7;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JsonSchema } from "../../domain/JsonSchema.js";
|
|
2
2
|
import { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions.js";
|
|
3
|
-
export declare function classMapper(value: JsonSchema, options: JsonSchemaOptions):
|
|
3
|
+
export declare function classMapper(value: JsonSchema, options: JsonSchemaOptions): import("json-schema").JSONSchema7;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { JSONSchema7 } from "json-schema";
|
|
2
|
+
import { JsonSchema } from "../../domain/JsonSchema.js";
|
|
3
|
+
import type { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions.js";
|
|
2
4
|
/**
|
|
3
5
|
* @ignore
|
|
4
6
|
*/
|
|
5
|
-
export declare function genericsMapper(
|
|
7
|
+
export declare function genericsMapper(baseObj: JSONSchema7, schema: JsonSchema, options: JsonSchemaOptions): JSONSchema7 | {
|
|
8
|
+
allOf: (JSONSchema7 | {
|
|
9
|
+
properties: JSONSchema7;
|
|
10
|
+
type: string;
|
|
11
|
+
})[];
|
|
12
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JsonLazyRef } from "../../domain/JsonLazyRef.js";
|
|
2
2
|
import { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions.js";
|
|
3
|
-
export declare function lazyRefMapper(jsonLazyRef: JsonLazyRef, options: JsonSchemaOptions):
|
|
3
|
+
export declare function lazyRefMapper(jsonLazyRef: JsonLazyRef, options: JsonSchemaOptions): import("json-schema").JSONSchema7;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Type } from "@tsed/core";
|
|
2
|
+
import { JsonSchema } from "../../domain/JsonSchema.js";
|
|
3
|
+
import type { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions.js";
|
|
4
|
+
export declare function itemMapper(input: JsonSchema | Type, options: JsonSchemaOptions): any;
|
|
5
|
+
export declare function nextMapper(input: JsonSchema | Type | any, options: JsonSchemaOptions): any;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { JsonSchema } from "../../domain/JsonSchema.js";
|
|
2
2
|
import type { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions.js";
|
|
3
|
-
export declare function ofMapper(input: (any | JsonSchema)[], options: JsonSchemaOptions
|
|
3
|
+
export declare function ofMapper(input: (any | JsonSchema)[], options: JsonSchemaOptions): any[];
|
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Automatically generated by @tsed/barrels.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./async-api/channelsMapper.js";
|
|
5
|
-
export * from "./async-api/generate.js";
|
|
6
|
-
export * from "./async-api/messageMapper.js";
|
|
7
|
-
export * from "./async-api/payloadMapper.js";
|
|
8
|
-
export * from "./async-api/responseMapper.js";
|
|
9
4
|
export * from "./default/anyMapper.js";
|
|
10
5
|
export * from "./default/classMapper.js";
|
|
11
6
|
export * from "./default/discriminatorMappingMapper.js";
|
|
12
7
|
export * from "./default/enumsMapper.js";
|
|
13
8
|
export * from "./default/genericsMapper.js";
|
|
14
9
|
export * from "./default/inheritedClassMapper.js";
|
|
15
|
-
export * from "./default/itemMapper.js";
|
|
16
10
|
export * from "./default/lazyRefMapper.js";
|
|
17
11
|
export * from "./default/mapMapper.js";
|
|
12
|
+
export * from "./default/nextMapper.js";
|
|
18
13
|
export * from "./default/nullableMapper.js";
|
|
19
14
|
export * from "./default/objectMapper.js";
|
|
20
15
|
export * from "./default/ofMapper.js";
|
|
21
|
-
export * from "./default/propertiesMapper.js";
|
|
22
16
|
export * from "./default/requiredMapper.js";
|
|
23
17
|
export * from "./default/schemaMapper.js";
|
|
24
18
|
export * from "./open-spec/discriminatorMappingMapper.js";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { JsonSchema } from "../../domain/JsonSchema.js";
|
|
2
|
-
|
|
2
|
+
import { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions.js";
|
|
3
|
+
export declare function nullableMapperOpenApi(obj: any, schema: JsonSchema | null, options: JsonSchemaOptions): any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { JsonParameterOptions } from "./operationInParameterMapper.js";
|
|
2
|
-
export declare function operationInQueryMapper(parameter: any, { jsonSchema,
|
|
2
|
+
export declare function operationInQueryMapper(parameter: any, { jsonSchema, ...options }: JsonParameterOptions): any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum VendorKeys {
|
|
2
|
+
GENERIC_LABELS = "genericLabels",
|
|
3
|
+
GENERIC_LABEL = "genericLabel",
|
|
4
|
+
GENERIC_OF = "genericOf",
|
|
5
|
+
NULLABLE = "nullable",
|
|
6
|
+
FORWARD_GROUPS = "forwardGroups",
|
|
7
|
+
GROUPS = "groups",
|
|
8
|
+
GROUPS_NAME = "groupsName",
|
|
9
|
+
ALLOWED_GROUPS = "allowedGroups"
|
|
10
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface ArrayOfChainedDecorators {
|
|
2
2
|
(...args: any): any;
|
|
3
|
+
Nested(...generics: any[]): this;
|
|
3
4
|
/**
|
|
4
5
|
* An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.
|
|
5
6
|
*
|
|
@@ -10,6 +11,7 @@ export interface ArrayOfChainedDecorators {
|
|
|
10
11
|
* ::: tip
|
|
11
12
|
* Omitting this keyword has the same behavior as a value of 0.
|
|
12
13
|
* :::
|
|
14
|
+
* @deprecated Since 2025-05-12. Use MinItems decorator instead.
|
|
13
15
|
*/
|
|
14
16
|
MinItems(minItems: number): this;
|
|
15
17
|
/**
|
|
@@ -20,6 +22,7 @@ export interface ArrayOfChainedDecorators {
|
|
|
20
22
|
* :: warning
|
|
21
23
|
* The value `maxItems` MUST be a non-negative integer.
|
|
22
24
|
* :::
|
|
25
|
+
* @deprecated Since 2025-05-12. Use MaxItems decorator instead.
|
|
23
26
|
*/
|
|
24
27
|
MaxItems(maxItems: number): this;
|
|
25
28
|
/**
|
|
@@ -30,6 +33,7 @@ export interface ArrayOfChainedDecorators {
|
|
|
30
33
|
Contains(): this;
|
|
31
34
|
/**
|
|
32
35
|
* If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.
|
|
36
|
+
* @deprecated Since 2025-05-12. Use UniqueItems decorator instead.
|
|
33
37
|
*/
|
|
34
38
|
UniqueItems(uniqueItems?: boolean): this;
|
|
35
39
|
}
|
|
@@ -41,6 +45,7 @@ export interface MapOfChainedDecorators {
|
|
|
41
45
|
* ::: warning
|
|
42
46
|
* The value of this keyword MUST be a non-negative integer.
|
|
43
47
|
* :::
|
|
48
|
+
* @deprecated Since 2025-05-12. Use MinProperties decorator instead.
|
|
44
49
|
*/
|
|
45
50
|
MinProperties(minProperties: number): this;
|
|
46
51
|
/**
|
|
@@ -49,6 +54,7 @@ export interface MapOfChainedDecorators {
|
|
|
49
54
|
* ::: warning
|
|
50
55
|
* The value of this keyword MUST be a non-negative integer.
|
|
51
56
|
* :::
|
|
57
|
+
* @deprecated Since 2025-05-12. Use MaxProperties decorator instead.
|
|
52
58
|
*/
|
|
53
59
|
MaxProperties(maxProperties: number): this;
|
|
54
60
|
}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* See @@GenericOf@@ decorator for more details.
|
|
5
5
|
*
|
|
6
|
-
* @param generics
|
|
7
6
|
* @decorator
|
|
8
7
|
* @validation
|
|
9
8
|
* @swagger
|
|
10
9
|
* @schema
|
|
11
10
|
* @input
|
|
12
11
|
* @generics
|
|
12
|
+
* @param genericLabels
|
|
13
13
|
*/
|
|
14
|
-
export declare function Generics(...
|
|
14
|
+
export declare function Generics(...genericLabels: string[]): ClassDecorator;
|
|
@@ -46,4 +46,4 @@ import { JsonHeader, JsonHeaders } from "../../interfaces/JsonOpenSpec.js";
|
|
|
46
46
|
* @operation
|
|
47
47
|
* @response
|
|
48
48
|
*/
|
|
49
|
-
export declare function Header(headers: string | number | JsonHeaders, value?: string | number | JsonHeader):
|
|
49
|
+
export declare function Header(headers: string | number | JsonHeaders, value?: string | number | JsonHeader): import("./returns.js").ReturnsChainedDecorators;
|
|
@@ -5,7 +5,7 @@ import { OperationVerbs } from "../../constants/OperationVerbs.js";
|
|
|
5
5
|
* ::: warning
|
|
6
6
|
* Don't use decorator with Ts.ED application.
|
|
7
7
|
*
|
|
8
|
-
* Use
|
|
8
|
+
* Use these decorators instead:
|
|
9
9
|
*
|
|
10
10
|
* <ApiList query="status.includes('decorator') && status.includes('httpMethod')" />
|
|
11
11
|
*
|