@tsed/schema 7.86.3 → 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,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
|
*
|
|
@@ -88,8 +88,10 @@ export interface ReturnsChainedDecorators {
|
|
|
88
88
|
/**
|
|
89
89
|
* Add an inline title for the return model.
|
|
90
90
|
* @param title
|
|
91
|
+
* @deprecated use Label instead
|
|
91
92
|
*/
|
|
92
93
|
Title(title: string): this;
|
|
94
|
+
Label(label: string): this;
|
|
93
95
|
/**
|
|
94
96
|
* Use group to filter model
|
|
95
97
|
* @param groups
|
|
@@ -170,7 +172,7 @@ export interface ReturnsChainedDecorators {
|
|
|
170
172
|
*
|
|
171
173
|
* Deprecated version:
|
|
172
174
|
*
|
|
173
|
-
* ```
|
|
175
|
+
* ```ts
|
|
174
176
|
* import {ReturnsArray} from "@tsed/common";
|
|
175
177
|
* import {Returns} from "@tsed/schema";
|
|
176
178
|
*
|
|
@@ -183,14 +185,14 @@ export interface ReturnsChainedDecorators {
|
|
|
183
185
|
*
|
|
184
186
|
* ### Declaring a generic model <Badge text="6+"/>
|
|
185
187
|
*
|
|
186
|
-
*
|
|
188
|
+
* Sometimes, it might be useful to use generic models. TypeScript doesn't store the generic type in the metadata. This is why we need to
|
|
187
189
|
* declare explicitly the generic models with the decorators.
|
|
188
190
|
*
|
|
189
|
-
* One of the generic's usage
|
|
191
|
+
* One of the generic's usage can be a paginated list. With Returns decorator it's now possible to declare a generic type and generate the appropriate OpenSpec documentation.
|
|
190
192
|
*
|
|
191
193
|
* Starting with the pagination model, by using @@Generics@@ and @@CollectionOf@@:
|
|
192
194
|
*
|
|
193
|
-
* ```
|
|
195
|
+
* ```ts
|
|
194
196
|
* @Generics("T")
|
|
195
197
|
* class Pagination<T> {
|
|
196
198
|
* @CollectionOf("T")
|
|
@@ -213,7 +215,7 @@ export interface ReturnsChainedDecorators {
|
|
|
213
215
|
* }
|
|
214
216
|
* ```
|
|
215
217
|
*
|
|
216
|
-
* Finally, we can use our models on a method as
|
|
218
|
+
* Finally, we can use our models on a method as follows:
|
|
217
219
|
*
|
|
218
220
|
* ```typescript
|
|
219
221
|
* class Controller {
|
|
@@ -225,11 +227,11 @@ export interface ReturnsChainedDecorators {
|
|
|
225
227
|
* }
|
|
226
228
|
* ```
|
|
227
229
|
*
|
|
228
|
-
* ### Declaring
|
|
230
|
+
* ### Declaring nested generics models <Badge text="6+"/>
|
|
229
231
|
*
|
|
230
|
-
* It's also possible to declare a nested generics
|
|
232
|
+
* It's also possible to declare a nested generics model to have this type `Pagination<Submission<Product>>`:
|
|
231
233
|
*
|
|
232
|
-
* ```
|
|
234
|
+
* ```ts
|
|
233
235
|
* import {Generics, Property, Returns} from "@tsed/schema";
|
|
234
236
|
* import {Post} from "@tsed/common";
|
|
235
237
|
*
|
|
@@ -244,7 +246,7 @@ export interface ReturnsChainedDecorators {
|
|
|
244
246
|
*
|
|
245
247
|
* And here is the Submission model:
|
|
246
248
|
*
|
|
247
|
-
* ```
|
|
249
|
+
* ```ts
|
|
248
250
|
* import {Generics, Property} from "@tsed/schema";
|
|
249
251
|
*
|
|
250
252
|
* @Generics("T")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OpenSpecTag } from "@tsed/openspec";
|
|
2
2
|
/**
|
|
3
|
-
* Add tags
|
|
3
|
+
* Add metadata tags to the decorated element (class or method).
|
|
4
4
|
*
|
|
5
5
|
* ## Examples
|
|
6
6
|
* ### On method
|
|
@@ -12,6 +12,15 @@ import { OpenSpecTag } from "@tsed/openspec";
|
|
|
12
12
|
* get() {}
|
|
13
13
|
* }
|
|
14
14
|
* ```
|
|
15
|
+
* ### On Class
|
|
16
|
+
*
|
|
17
|
+
* ```typescript
|
|
18
|
+
* @Controller("/")
|
|
19
|
+
* @Tags("api")
|
|
20
|
+
* class MyController {
|
|
21
|
+
* get() {}
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
15
24
|
*
|
|
16
25
|
* @param tags
|
|
17
26
|
* @decorator
|
|
@@ -20,4 +29,4 @@ import { OpenSpecTag } from "@tsed/openspec";
|
|
|
20
29
|
* @classDecorator
|
|
21
30
|
* @operation
|
|
22
31
|
*/
|
|
23
|
-
export declare function Tags(...tags: (string | OpenSpecTag)[]):
|
|
32
|
+
export declare function Tags(...tags: (string | OpenSpecTag)[]): ClassDecorator & MethodDecorator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { JsonEntityStore } from "./JsonEntityStore.js";
|
|
1
2
|
import type { JsonMethodStore } from "./JsonMethodStore.js";
|
|
2
3
|
import type { JsonPropertyStore } from "./JsonPropertyStore.js";
|
|
3
|
-
import { JsonEntityStore } from "./JsonEntityStore.js";
|
|
4
4
|
export declare class JsonClassStore extends JsonEntityStore {
|
|
5
5
|
/**
|
|
6
6
|
* List of children JsonEntityStore (properties or methods or params)
|
|
@@ -51,16 +51,26 @@ export declare abstract class JsonEntityStore implements JsonEntityStoreOptions
|
|
|
51
51
|
readonly isStore = true;
|
|
52
52
|
readonly parent: JsonEntityStore;
|
|
53
53
|
readonly target: Type<any>;
|
|
54
|
+
constructor(options: JsonEntityStoreOptions);
|
|
54
55
|
/**
|
|
55
56
|
*
|
|
56
57
|
*/
|
|
57
58
|
protected _type: Type<any>;
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
get type(): Type<any> | any;
|
|
61
|
+
/**
|
|
62
|
+
* Get original type without transformation
|
|
63
|
+
* @param value
|
|
64
|
+
*/
|
|
65
|
+
set type(value: Type<any> | any);
|
|
58
66
|
/**
|
|
59
67
|
* Ref to JsonSchema
|
|
60
68
|
*/
|
|
61
69
|
protected _schema: JsonSchema;
|
|
62
|
-
|
|
63
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Return the JsonSchema
|
|
72
|
+
*/
|
|
73
|
+
get schema(): JsonSchema;
|
|
64
74
|
/**
|
|
65
75
|
* Return the class name of the entity.
|
|
66
76
|
* @returns {string}
|
|
@@ -73,26 +83,16 @@ export declare abstract class JsonEntityStore implements JsonEntityStoreOptions
|
|
|
73
83
|
get isDate(): boolean;
|
|
74
84
|
get isObject(): boolean;
|
|
75
85
|
get isClass(): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Return the JsonSchema
|
|
78
|
-
*/
|
|
79
|
-
get schema(): JsonSchema;
|
|
80
|
-
get nestedGenerics(): Type<any>[][];
|
|
81
|
-
set nestedGenerics(nestedGenerics: Type<any>[][]);
|
|
82
|
-
get type(): Type<any> | any;
|
|
83
|
-
/**
|
|
84
|
-
* Get original type without transformation
|
|
85
|
-
* @param value
|
|
86
|
-
*/
|
|
87
|
-
set type(value: Type<any> | any);
|
|
88
86
|
/**
|
|
89
87
|
* Return the itemSchema computed type. if the type is a function used for recursive model, the function will be called to
|
|
90
88
|
* get the right type.
|
|
91
89
|
*/
|
|
92
|
-
get computedType(): any
|
|
90
|
+
get computedType(): Type<any>;
|
|
93
91
|
get itemSchema(): JsonSchema;
|
|
94
92
|
get parentSchema(): JsonSchema;
|
|
95
93
|
get isDiscriminatorChild(): boolean;
|
|
94
|
+
get path(): string;
|
|
95
|
+
set path(path: string);
|
|
96
96
|
static from<T extends JsonClassStore = JsonClassStore>(target: Type<any>): T;
|
|
97
97
|
static from<T extends JsonPropertyStore = JsonPropertyStore>(target: Type<any> | any, propertyKey: string | symbol): T;
|
|
98
98
|
static from<T extends JsonParameterStore = JsonParameterStore>(target: Type<any> | any, propertyKey: string | symbol, index: number): T;
|
|
@@ -104,7 +104,11 @@ export declare abstract class JsonEntityStore implements JsonEntityStoreOptions
|
|
|
104
104
|
get<T = any>(key: string, defaultValue?: any): T;
|
|
105
105
|
set(key: string, value?: any): Store;
|
|
106
106
|
toString(): string;
|
|
107
|
+
getBestType(): any;
|
|
108
|
+
is(input: DecoratorTypes.CLASS): this is JsonClassStore;
|
|
109
|
+
is(input: DecoratorTypes.PROP): this is JsonPropertyStore;
|
|
110
|
+
is(input: DecoratorTypes.METHOD): this is JsonMethodStore;
|
|
111
|
+
is(input: DecoratorTypes.PARAM): this is JsonParameterStore;
|
|
107
112
|
protected abstract build(): void;
|
|
108
113
|
protected buildType(type: any): void;
|
|
109
|
-
getBestType(): any;
|
|
110
114
|
}
|
|
@@ -3,9 +3,8 @@ import { JsonMap } from "./JsonMap.js";
|
|
|
3
3
|
import { JsonSchema } from "./JsonSchema.js";
|
|
4
4
|
export declare class JsonMedia extends JsonMap<OS3MediaType<JsonSchema>> {
|
|
5
5
|
$kind: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
examples(examples: any): this;
|
|
6
|
+
constructor(obj?: Partial<OS3MediaType<JsonSchema>>);
|
|
7
|
+
schema(schema?: JsonSchema): JsonSchema;
|
|
8
|
+
examples(examples?: any): this;
|
|
9
|
+
type(type: any): this;
|
|
11
10
|
}
|
|
@@ -39,6 +39,12 @@ export declare class JsonMethodStore extends JsonEntityStore {
|
|
|
39
39
|
* @param descriptor
|
|
40
40
|
*/
|
|
41
41
|
static get(target: Type<any>, propertyKey: string | symbol, descriptor?: PropertyDescriptor): JsonMethodStore;
|
|
42
|
+
/**
|
|
43
|
+
* TODO must be located on JsonOperation level directly
|
|
44
|
+
* @param status
|
|
45
|
+
* @param contentType
|
|
46
|
+
* @param includes
|
|
47
|
+
*/
|
|
42
48
|
getResponseOptions(status: number, { contentType, includes }?: {
|
|
43
49
|
contentType?: string;
|
|
44
50
|
includes?: string[];
|
|
@@ -73,10 +79,11 @@ export declare class JsonMethodStore extends JsonEntityStore {
|
|
|
73
79
|
/**
|
|
74
80
|
* EndpointMetadata contains metadata about a controller and his method.
|
|
75
81
|
* Each annotation (@Get, @Body...) attached to a method are stored into endpoint.
|
|
76
|
-
* EndpointMetadata
|
|
82
|
+
* EndpointMetadata converts this metadata to an array which contain arguments to call an Express method.
|
|
77
83
|
*
|
|
78
84
|
* Example :
|
|
79
|
-
|
|
85
|
+
*
|
|
86
|
+
*```ts
|
|
80
87
|
* @Controller("/my-path")
|
|
81
88
|
* provide MyClass {
|
|
82
89
|
*
|
|
@@ -4,10 +4,12 @@ import { JsonMap } from "./JsonMap.js";
|
|
|
4
4
|
import { JsonParameter } from "./JsonParameter.js";
|
|
5
5
|
import { JsonResponse } from "./JsonResponse.js";
|
|
6
6
|
import { JsonSchema } from "./JsonSchema.js";
|
|
7
|
-
export
|
|
8
|
-
path: string | RegExp;
|
|
7
|
+
export declare class JsonMethodPath extends JsonMap<any> {
|
|
9
8
|
method: string;
|
|
10
|
-
|
|
9
|
+
path: string | RegExp;
|
|
10
|
+
constructor(method: string, path: string | RegExp);
|
|
11
|
+
summary(summary: string): this;
|
|
12
|
+
description(description: string): this;
|
|
11
13
|
}
|
|
12
14
|
export interface JsonOperationOptions extends OS3Operation<JsonSchema, JsonParameter, JsonMap<JsonResponse>> {
|
|
13
15
|
consumes: string[];
|
|
@@ -41,11 +43,12 @@ export declare class JsonOperation extends JsonMap<JsonOperationOptions> {
|
|
|
41
43
|
addSecurityScopes(name: string, scopes: string[]): this;
|
|
42
44
|
description(description: string): this;
|
|
43
45
|
deprecated(deprecated: boolean): this;
|
|
46
|
+
addAllowedGroupsParameter(allowedGroups: string[]): this;
|
|
44
47
|
parameters(parameters: JsonParameter[]): this;
|
|
45
48
|
addParameter(index: number, parameter: JsonParameter): void;
|
|
46
49
|
consumes(consumes: string[]): this;
|
|
47
50
|
produces(produces: string[]): this;
|
|
48
51
|
addProduce(produce: string): void;
|
|
49
|
-
addOperationPath(method: string, path: string | RegExp
|
|
52
|
+
addOperationPath(method: string, path: string | RegExp): JsonMethodPath;
|
|
50
53
|
getAllowedOperationPath(allowedVerbs?: string[]): JsonMethodPath[];
|
|
51
54
|
}
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import { Type } from "@tsed/core";
|
|
2
1
|
import { OpenSpecHash, OpenSpecRef, OS3Example, OS3Parameter } from "@tsed/openspec";
|
|
3
2
|
import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions.js";
|
|
4
|
-
import { NestedGenerics } from "../utils/generics.js";
|
|
5
3
|
import { JsonMap } from "./JsonMap.js";
|
|
6
4
|
import { JsonSchema } from "./JsonSchema.js";
|
|
7
|
-
export declare class JsonParameter extends JsonMap<OS3Parameter<JsonSchema>>
|
|
5
|
+
export declare class JsonParameter extends JsonMap<OS3Parameter<JsonSchema>> {
|
|
8
6
|
$kind: string;
|
|
9
|
-
nestedGenerics: Type<any>[][];
|
|
10
|
-
groups: string[];
|
|
11
|
-
groupsName: string;
|
|
12
|
-
$schema: JsonSchema;
|
|
13
7
|
expression: string;
|
|
8
|
+
constructor(obj?: Partial<OS3Parameter<JsonSchema>>);
|
|
14
9
|
getName(): any;
|
|
15
10
|
name(name: string): this;
|
|
16
11
|
examples(examples: OpenSpecHash<OS3Example | OpenSpecRef>): this;
|
|
17
12
|
description(description: string): this;
|
|
18
13
|
in(inType: string, expression?: string | any): this;
|
|
19
14
|
required(required: boolean): this;
|
|
15
|
+
schema(): JsonSchema;
|
|
20
16
|
schema(schema: JsonSchema): this;
|
|
17
|
+
itemSchema(schema?: JsonSchema): JsonSchema;
|
|
21
18
|
toJSON(options?: JsonSchemaOptions): any;
|
|
22
19
|
}
|
|
@@ -2,7 +2,6 @@ import { Type } from "@tsed/core";
|
|
|
2
2
|
import { JsonEntityStore, JsonEntityStoreOptions } from "./JsonEntityStore.js";
|
|
3
3
|
import type { JsonMethodStore } from "./JsonMethodStore.js";
|
|
4
4
|
import { JsonParameter } from "./JsonParameter.js";
|
|
5
|
-
import { JsonSchema } from "./JsonSchema.js";
|
|
6
5
|
export interface JsonParameterStoreOptions extends JsonEntityStoreOptions {
|
|
7
6
|
dataPath?: string;
|
|
8
7
|
paramType?: string;
|
|
@@ -25,8 +24,6 @@ export declare class JsonParameterStore extends JsonEntityStore {
|
|
|
25
24
|
readonly parameter: JsonParameter;
|
|
26
25
|
readonly parent: JsonMethodStore;
|
|
27
26
|
constructor(options: JsonParameterStoreOptions);
|
|
28
|
-
get nestedGenerics(): Type<any>[][];
|
|
29
|
-
set nestedGenerics(nestedGenerics: Type<any>[][]);
|
|
30
27
|
/**
|
|
31
28
|
* Return the required state.
|
|
32
29
|
* @returns {boolean}
|
|
@@ -34,6 +31,7 @@ export declare class JsonParameterStore extends JsonEntityStore {
|
|
|
34
31
|
get required(): boolean;
|
|
35
32
|
set required(value: boolean);
|
|
36
33
|
get allowedRequiredValues(): any[];
|
|
34
|
+
get schema(): import("./JsonSchema.js").JsonSchema;
|
|
37
35
|
static getParams<T extends JsonParameterStore = JsonParameterStore>(target: Type<any>, propertyKey: string | symbol): T[];
|
|
38
36
|
static get(target: Type<any>, propertyKey: string | symbol, index: number): JsonParameterStore;
|
|
39
37
|
/**
|
|
@@ -42,7 +40,6 @@ export declare class JsonParameterStore extends JsonEntityStore {
|
|
|
42
40
|
* @returns {boolean}
|
|
43
41
|
*/
|
|
44
42
|
isRequired(value: any): boolean;
|
|
45
|
-
protected getSchema(type: any): JsonSchema;
|
|
46
43
|
protected build(): void;
|
|
47
44
|
}
|
|
48
45
|
/**
|
|
@@ -1,29 +1,10 @@
|
|
|
1
1
|
import { Type } from "@tsed/core";
|
|
2
|
-
import { JsonEntityStore } from "./JsonEntityStore.js";
|
|
3
2
|
import type { JsonClassStore } from "./JsonClassStore.js";
|
|
3
|
+
import { JsonEntityStore } from "./JsonEntityStore.js";
|
|
4
4
|
export declare class JsonPropertyStore extends JsonEntityStore {
|
|
5
5
|
readonly parent: JsonClassStore;
|
|
6
|
-
/**
|
|
7
|
-
* Return the required state.
|
|
8
|
-
* @returns {boolean}
|
|
9
|
-
*/
|
|
10
|
-
get required(): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Change the state of the required data.
|
|
13
|
-
* @param value
|
|
14
|
-
*/
|
|
15
|
-
set required(value: boolean);
|
|
16
|
-
get allowedRequiredValues(): any[];
|
|
17
|
-
discriminatorKey(): this;
|
|
18
|
-
isDiscriminatorKey(): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Check precondition between value, required and allowedRequiredValues to know if the entity is required.
|
|
21
|
-
* @param value
|
|
22
|
-
* @returns {boolean}
|
|
23
|
-
*/
|
|
24
|
-
isRequired(value: any): boolean;
|
|
25
|
-
protected build(): void;
|
|
26
6
|
static get(target: Type<any>, propertyKey: string | symbol): JsonPropertyStore;
|
|
7
|
+
protected build(): void;
|
|
27
8
|
}
|
|
28
9
|
/**
|
|
29
10
|
* @alias JsonPropertyStore
|