@tsed/schema 6.88.1 → 6.89.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/{components → cjs/components}/anyMapper.d.ts +0 -0
- package/lib/cjs/components/anyMapper.js +24 -0
- package/lib/cjs/components/anyMapper.js.map +1 -0
- package/lib/{components → cjs/components}/classMapper.d.ts +0 -0
- package/lib/cjs/components/classMapper.js +41 -0
- package/lib/cjs/components/classMapper.js.map +1 -0
- package/lib/{components → cjs/components}/genericsMapper.d.ts +0 -0
- package/lib/cjs/components/genericsMapper.js +62 -0
- package/lib/cjs/components/genericsMapper.js.map +1 -0
- package/lib/{components → cjs/components}/index.d.ts +0 -0
- package/lib/cjs/components/index.js +13 -0
- package/lib/cjs/components/index.js.map +1 -0
- package/lib/{components → cjs/components}/inheritedClassMapper.d.ts +0 -0
- package/lib/cjs/components/inheritedClassMapper.js +22 -0
- package/lib/cjs/components/inheritedClassMapper.js.map +1 -0
- package/lib/{components → cjs/components}/itemMapper.d.ts +0 -0
- package/lib/cjs/components/itemMapper.js +10 -0
- package/lib/cjs/components/itemMapper.js.map +1 -0
- package/lib/{components → cjs/components}/lazyRefMapper.d.ts +0 -0
- package/lib/cjs/components/lazyRefMapper.js +19 -0
- package/lib/cjs/components/lazyRefMapper.js.map +1 -0
- package/lib/{components → cjs/components}/mapMapper.d.ts +0 -0
- package/lib/cjs/components/mapMapper.js +25 -0
- package/lib/cjs/components/mapMapper.js.map +1 -0
- package/lib/{components → cjs/components}/objectMapper.d.ts +0 -0
- package/lib/cjs/components/objectMapper.js +25 -0
- package/lib/cjs/components/objectMapper.js.map +1 -0
- package/lib/{components → cjs/components}/schemaMapper.d.ts +0 -0
- package/lib/cjs/components/schemaMapper.js +100 -0
- package/lib/cjs/components/schemaMapper.js.map +1 -0
- package/lib/{constants → cjs/constants}/httpMethods.d.ts +0 -0
- package/lib/cjs/constants/httpMethods.js +46 -0
- package/lib/cjs/constants/httpMethods.js.map +1 -0
- package/lib/{constants → cjs/constants}/httpStatusMessages.d.ts +0 -0
- package/lib/cjs/constants/httpStatusMessages.js +110 -0
- package/lib/cjs/constants/httpStatusMessages.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/class/children.d.ts +0 -0
- package/lib/cjs/decorators/class/children.js +24 -0
- package/lib/cjs/decorators/class/children.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/collectionContains.d.ts +0 -0
- package/lib/cjs/decorators/collections/collectionContains.js +29 -0
- package/lib/cjs/decorators/collections/collectionContains.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/collectionOf.d.ts +0 -0
- package/lib/cjs/decorators/collections/collectionOf.js +103 -0
- package/lib/cjs/decorators/collections/collectionOf.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/maxItems.d.ts +0 -0
- package/lib/cjs/decorators/collections/maxItems.js +60 -0
- package/lib/cjs/decorators/collections/maxItems.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/maxProperties.d.ts +0 -0
- package/lib/cjs/decorators/collections/maxProperties.js +83 -0
- package/lib/cjs/decorators/collections/maxProperties.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/minItems.d.ts +0 -0
- package/lib/cjs/decorators/collections/minItems.js +64 -0
- package/lib/cjs/decorators/collections/minItems.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/minProperties.d.ts +0 -0
- package/lib/cjs/decorators/collections/minProperties.js +82 -0
- package/lib/cjs/decorators/collections/minProperties.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/uniqueItems.d.ts +0 -0
- package/lib/cjs/decorators/collections/uniqueItems.js +60 -0
- package/lib/cjs/decorators/collections/uniqueItems.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/additionalProperties.d.ts +0 -0
- package/lib/cjs/decorators/common/additionalProperties.js +20 -0
- package/lib/cjs/decorators/common/additionalProperties.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/allOf.d.ts +0 -0
- package/lib/cjs/decorators/common/allOf.js +22 -0
- package/lib/cjs/decorators/common/allOf.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/allow.d.ts +0 -0
- package/lib/cjs/decorators/common/allow.js +47 -0
- package/lib/cjs/decorators/common/allow.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/any.d.ts +0 -0
- package/lib/cjs/decorators/common/any.js +46 -0
- package/lib/cjs/decorators/common/any.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/anyOf.d.ts +0 -0
- package/lib/cjs/decorators/common/anyOf.js +26 -0
- package/lib/cjs/decorators/common/anyOf.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/const.d.ts +0 -0
- package/lib/cjs/decorators/common/const.js +70 -0
- package/lib/cjs/decorators/common/const.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/customKey.d.ts +0 -0
- package/lib/cjs/decorators/common/customKey.js +43 -0
- package/lib/cjs/decorators/common/customKey.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/default.d.ts +0 -0
- package/lib/cjs/decorators/common/default.js +51 -0
- package/lib/cjs/decorators/common/default.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/description.d.ts +0 -0
- package/lib/cjs/decorators/common/description.js +76 -0
- package/lib/cjs/decorators/common/description.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/enum.d.ts +0 -0
- package/lib/cjs/decorators/common/enum.js +30 -0
- package/lib/cjs/decorators/common/enum.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/example.d.ts +0 -0
- package/lib/cjs/decorators/common/example.js +21 -0
- package/lib/cjs/decorators/common/example.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/examples.d.ts +0 -0
- package/lib/cjs/decorators/common/examples.js +21 -0
- package/lib/cjs/decorators/common/examples.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/exclusiveMaximum.d.ts +0 -0
- package/lib/cjs/decorators/common/exclusiveMaximum.js +77 -0
- package/lib/cjs/decorators/common/exclusiveMaximum.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/exclusiveMinimum.d.ts +0 -0
- package/lib/cjs/decorators/common/exclusiveMinimum.js +77 -0
- package/lib/cjs/decorators/common/exclusiveMinimum.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/format.d.ts +0 -0
- package/lib/cjs/decorators/common/format.js +486 -0
- package/lib/cjs/decorators/common/format.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/forwardGroups.d.ts +0 -0
- package/lib/cjs/decorators/common/forwardGroups.js +20 -0
- package/lib/cjs/decorators/common/forwardGroups.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/groups.d.ts +0 -0
- package/lib/cjs/decorators/common/groups.js +41 -0
- package/lib/cjs/decorators/common/groups.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/hidden.d.ts +0 -0
- package/lib/cjs/decorators/common/hidden.js +40 -0
- package/lib/cjs/decorators/common/hidden.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/ignore.d.ts +0 -0
- package/lib/cjs/decorators/common/ignore.js +71 -0
- package/lib/cjs/decorators/common/ignore.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/integer.d.ts +0 -0
- package/lib/cjs/decorators/common/integer.js +71 -0
- package/lib/cjs/decorators/common/integer.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/jsonEntityFn.d.ts +0 -0
- package/lib/cjs/decorators/common/jsonEntityFn.js +32 -0
- package/lib/cjs/decorators/common/jsonEntityFn.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/maxLength.d.ts +0 -0
- package/lib/cjs/decorators/common/maxLength.js +89 -0
- package/lib/cjs/decorators/common/maxLength.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/maximum.d.ts +0 -0
- package/lib/cjs/decorators/common/maximum.js +151 -0
- package/lib/cjs/decorators/common/maximum.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/minLength.d.ts +0 -0
- package/lib/cjs/decorators/common/minLength.js +90 -0
- package/lib/cjs/decorators/common/minLength.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/minimum.d.ts +0 -0
- package/lib/cjs/decorators/common/minimum.js +149 -0
- package/lib/cjs/decorators/common/minimum.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/multipleOf.d.ts +0 -0
- package/lib/cjs/decorators/common/multipleOf.js +81 -0
- package/lib/cjs/decorators/common/multipleOf.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/name.d.ts +0 -0
- package/lib/cjs/decorators/common/name.js +52 -0
- package/lib/cjs/decorators/common/name.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/nullable.d.ts +0 -0
- package/lib/cjs/decorators/common/nullable.js +34 -0
- package/lib/cjs/decorators/common/nullable.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/oneOf.d.ts +0 -0
- package/lib/cjs/decorators/common/oneOf.js +26 -0
- package/lib/cjs/decorators/common/oneOf.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/optional.d.ts +0 -0
- package/lib/cjs/decorators/common/optional.js +28 -0
- package/lib/cjs/decorators/common/optional.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/pattern.d.ts +0 -0
- package/lib/cjs/decorators/common/pattern.js +103 -0
- package/lib/cjs/decorators/common/pattern.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/property.d.ts +0 -0
- package/lib/cjs/decorators/common/property.js +27 -0
- package/lib/cjs/decorators/common/property.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/readOnly.d.ts +0 -0
- package/lib/cjs/decorators/common/readOnly.js +21 -0
- package/lib/cjs/decorators/common/readOnly.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/required.d.ts +0 -0
- package/lib/cjs/decorators/common/required.js +53 -0
- package/lib/cjs/decorators/common/required.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/requiredGroups.d.ts +0 -0
- package/lib/cjs/decorators/common/requiredGroups.js +29 -0
- package/lib/cjs/decorators/common/requiredGroups.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/schema.d.ts +0 -0
- package/lib/cjs/decorators/common/schema.js +68 -0
- package/lib/cjs/decorators/common/schema.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/title.d.ts +0 -0
- package/lib/cjs/decorators/common/title.js +49 -0
- package/lib/cjs/decorators/common/title.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/writeOnly.d.ts +0 -0
- package/lib/cjs/decorators/common/writeOnly.js +21 -0
- package/lib/cjs/decorators/common/writeOnly.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/config/jsonEntityComponent.d.ts +0 -0
- package/lib/cjs/decorators/config/jsonEntityComponent.js +18 -0
- package/lib/cjs/decorators/config/jsonEntityComponent.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/generics/genericOf.d.ts +0 -0
- package/lib/cjs/decorators/generics/genericOf.js +99 -0
- package/lib/cjs/decorators/generics/genericOf.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/generics/generics.d.ts +0 -0
- package/lib/cjs/decorators/generics/generics.js +25 -0
- package/lib/cjs/decorators/generics/generics.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/index.d.ts +0 -0
- package/lib/cjs/decorators/index.js +76 -0
- package/lib/cjs/decorators/index.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/consumes.d.ts +0 -0
- package/lib/cjs/decorators/operations/consumes.js +39 -0
- package/lib/cjs/decorators/operations/consumes.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/contentType.d.ts +0 -0
- package/lib/cjs/decorators/operations/contentType.js +28 -0
- package/lib/cjs/decorators/operations/contentType.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/deprecated.d.ts +0 -0
- package/lib/cjs/decorators/operations/deprecated.js +43 -0
- package/lib/cjs/decorators/operations/deprecated.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/header.d.ts +0 -0
- package/lib/cjs/decorators/operations/header.js +59 -0
- package/lib/cjs/decorators/operations/header.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/in.d.ts +0 -0
- package/lib/cjs/decorators/operations/in.js +78 -0
- package/lib/cjs/decorators/operations/in.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/location.d.ts +0 -0
- package/lib/cjs/decorators/operations/location.js +29 -0
- package/lib/cjs/decorators/operations/location.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/operationId.d.ts +0 -0
- package/lib/cjs/decorators/operations/operationId.js +24 -0
- package/lib/cjs/decorators/operations/operationId.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/operationPath.d.ts +0 -0
- package/lib/cjs/decorators/operations/operationPath.js +34 -0
- package/lib/cjs/decorators/operations/operationPath.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/partial.d.ts +0 -0
- package/lib/cjs/decorators/operations/partial.js +18 -0
- package/lib/cjs/decorators/operations/partial.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/path.d.ts +0 -0
- package/lib/cjs/decorators/operations/path.js +29 -0
- package/lib/cjs/decorators/operations/path.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/produces.d.ts +0 -0
- package/lib/cjs/decorators/operations/produces.js +46 -0
- package/lib/cjs/decorators/operations/produces.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/redirect.d.ts +0 -0
- package/lib/cjs/decorators/operations/redirect.js +26 -0
- package/lib/cjs/decorators/operations/redirect.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/returns.d.ts +0 -0
- package/lib/cjs/decorators/operations/returns.js +215 -0
- package/lib/cjs/decorators/operations/returns.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/route.d.ts +0 -0
- package/lib/cjs/decorators/operations/route.js +198 -0
- package/lib/cjs/decorators/operations/route.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/security.d.ts +0 -0
- package/lib/cjs/decorators/operations/security.js +43 -0
- package/lib/cjs/decorators/operations/security.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/status.d.ts +0 -0
- package/lib/cjs/decorators/operations/status.js +133 -0
- package/lib/cjs/decorators/operations/status.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/summary.d.ts +0 -0
- package/lib/cjs/decorators/operations/summary.js +34 -0
- package/lib/cjs/decorators/operations/summary.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/tags.d.ts +0 -0
- package/lib/cjs/decorators/operations/tags.js +52 -0
- package/lib/cjs/decorators/operations/tags.js.map +1 -0
- package/lib/{domain → cjs/domain}/DecoratorContext.d.ts +0 -0
- package/lib/cjs/domain/DecoratorContext.js +88 -0
- package/lib/cjs/domain/DecoratorContext.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonAliasMap.d.ts +0 -0
- package/lib/cjs/domain/JsonAliasMap.js +15 -0
- package/lib/cjs/domain/JsonAliasMap.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonClassStore.d.ts +0 -0
- package/lib/cjs/domain/JsonClassStore.js +37 -0
- package/lib/cjs/domain/JsonClassStore.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonEntityStore.d.ts +0 -0
- package/lib/cjs/domain/JsonEntityStore.js +163 -0
- package/lib/cjs/domain/JsonEntityStore.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonFormatTypes.d.ts +0 -0
- package/lib/cjs/domain/JsonFormatTypes.js +22 -0
- package/lib/cjs/domain/JsonFormatTypes.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonLazyRef.d.ts +0 -0
- package/lib/cjs/domain/JsonLazyRef.js +26 -0
- package/lib/cjs/domain/JsonLazyRef.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonMap.d.ts +0 -0
- package/lib/cjs/domain/JsonMap.js +27 -0
- package/lib/cjs/domain/JsonMap.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonMethodStore.d.ts +0 -0
- package/lib/cjs/domain/JsonMethodStore.js +64 -0
- package/lib/cjs/domain/JsonMethodStore.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonOperation.d.ts +0 -0
- package/lib/cjs/domain/JsonOperation.js +254 -0
- package/lib/cjs/domain/JsonOperation.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonOperationPathsMap.d.ts +0 -0
- package/lib/cjs/domain/JsonOperationPathsMap.js +29 -0
- package/lib/cjs/domain/JsonOperationPathsMap.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonOperationRoute.d.ts +0 -0
- package/lib/cjs/domain/JsonOperationRoute.js +56 -0
- package/lib/cjs/domain/JsonOperationRoute.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonParameter.d.ts +0 -0
- package/lib/cjs/domain/JsonParameter.js +157 -0
- package/lib/cjs/domain/JsonParameter.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonParameterStore.d.ts +0 -0
- package/lib/cjs/domain/JsonParameterStore.js +90 -0
- package/lib/cjs/domain/JsonParameterStore.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonParameterTypes.d.ts +0 -0
- package/lib/cjs/domain/JsonParameterTypes.js +27 -0
- package/lib/cjs/domain/JsonParameterTypes.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonPropertyStore.d.ts +0 -0
- package/lib/cjs/domain/JsonPropertyStore.js +68 -0
- package/lib/cjs/domain/JsonPropertyStore.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonRequestBody.d.ts +0 -0
- package/lib/cjs/domain/JsonRequestBody.js +32 -0
- package/lib/cjs/domain/JsonRequestBody.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonResponse.d.ts +0 -0
- package/lib/cjs/domain/JsonResponse.js +86 -0
- package/lib/cjs/domain/JsonResponse.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonSchema.d.ts +0 -0
- package/lib/cjs/domain/JsonSchema.js +692 -0
- package/lib/cjs/domain/JsonSchema.js.map +1 -0
- package/lib/{domain → cjs/domain}/SpecTypes.d.ts +0 -0
- package/lib/cjs/domain/SpecTypes.js +10 -0
- package/lib/cjs/domain/SpecTypes.js.map +1 -0
- package/lib/{domain → cjs/domain}/index.d.ts +0 -0
- package/lib/cjs/domain/index.js +20 -0
- package/lib/cjs/domain/index.js.map +1 -0
- package/lib/{hooks → cjs/hooks}/alterIgnore.d.ts +0 -0
- package/lib/cjs/hooks/alterIgnore.js +21 -0
- package/lib/cjs/hooks/alterIgnore.js.map +1 -0
- package/lib/{hooks → cjs/hooks}/alterRequiredGroups.d.ts +0 -0
- package/lib/cjs/hooks/alterRequiredGroups.js +15 -0
- package/lib/cjs/hooks/alterRequiredGroups.js.map +1 -0
- package/lib/{index.d.ts → cjs/index.d.ts} +0 -0
- package/lib/cjs/index.js +23 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/IgnoreCallback.d.ts +0 -0
- package/lib/cjs/interfaces/IgnoreCallback.js +3 -0
- package/lib/cjs/interfaces/IgnoreCallback.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/JsonHookContext.d.ts +0 -0
- package/lib/cjs/interfaces/JsonHookContext.js +3 -0
- package/lib/cjs/interfaces/JsonHookContext.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/JsonOpenSpec.d.ts +0 -0
- package/lib/cjs/interfaces/JsonOpenSpec.js +3 -0
- package/lib/cjs/interfaces/JsonOpenSpec.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/JsonSchemaOptions.d.ts +0 -0
- package/lib/cjs/interfaces/JsonSchemaOptions.js +3 -0
- package/lib/cjs/interfaces/JsonSchemaOptions.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/index.d.ts +0 -0
- package/lib/cjs/interfaces/index.js +8 -0
- package/lib/cjs/interfaces/index.js.map +1 -0
- package/lib/{registries → cjs/registries}/JsonSchemaMapperContainer.d.ts +0 -0
- package/lib/cjs/registries/JsonSchemaMapperContainer.js +33 -0
- package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +1 -0
- package/lib/{utils → cjs/utils}/buildPath.d.ts +0 -0
- package/lib/cjs/utils/buildPath.js +13 -0
- package/lib/cjs/utils/buildPath.js.map +1 -0
- package/lib/{utils → cjs/utils}/concatParameters.d.ts +0 -0
- package/lib/cjs/utils/concatParameters.js +16 -0
- package/lib/cjs/utils/concatParameters.js.map +1 -0
- package/lib/{utils → cjs/utils}/concatPath.d.ts +0 -0
- package/lib/cjs/utils/concatPath.js +8 -0
- package/lib/cjs/utils/concatPath.js.map +1 -0
- package/lib/{utils → cjs/utils}/defineStatusModel.d.ts +0 -0
- package/lib/cjs/utils/defineStatusModel.js +13 -0
- package/lib/cjs/utils/defineStatusModel.js.map +1 -0
- package/lib/{utils → cjs/utils}/from.d.ts +0 -0
- package/lib/cjs/utils/from.js +272 -0
- package/lib/cjs/utils/from.js.map +1 -0
- package/lib/{utils → cjs/utils}/generics.d.ts +0 -0
- package/lib/cjs/utils/generics.js +40 -0
- package/lib/cjs/utils/generics.js.map +1 -0
- package/lib/{utils → cjs/utils}/getComputedType.d.ts +0 -0
- package/lib/cjs/utils/getComputedType.js +26 -0
- package/lib/cjs/utils/getComputedType.js.map +1 -0
- package/lib/{utils → cjs/utils}/getInheritedStores.d.ts +0 -0
- package/lib/cjs/utils/getInheritedStores.js +23 -0
- package/lib/cjs/utils/getInheritedStores.js.map +1 -0
- package/lib/{utils → cjs/utils}/getJsonEntityStore.d.ts +0 -0
- package/lib/cjs/utils/getJsonEntityStore.js +25 -0
- package/lib/cjs/utils/getJsonEntityStore.js.map +1 -0
- package/lib/{utils → cjs/utils}/getJsonPathParameters.d.ts +0 -0
- package/lib/cjs/utils/getJsonPathParameters.js +73 -0
- package/lib/cjs/utils/getJsonPathParameters.js.map +1 -0
- package/lib/{utils → cjs/utils}/getJsonSchema.d.ts +0 -0
- package/lib/cjs/utils/getJsonSchema.js +55 -0
- package/lib/cjs/utils/getJsonSchema.js.map +1 -0
- package/lib/{utils → cjs/utils}/getJsonType.d.ts +0 -0
- package/lib/cjs/utils/getJsonType.js +40 -0
- package/lib/cjs/utils/getJsonType.js.map +1 -0
- package/lib/{utils → cjs/utils}/getOperationsRoutes.d.ts +0 -0
- package/lib/cjs/utils/getOperationsRoutes.js +36 -0
- package/lib/cjs/utils/getOperationsRoutes.js.map +1 -0
- package/lib/{utils → cjs/utils}/getOperationsStores.d.ts +0 -0
- package/lib/cjs/utils/getOperationsStores.js +33 -0
- package/lib/cjs/utils/getOperationsStores.js.map +1 -0
- package/lib/{utils → cjs/utils}/getPropertiesStores.d.ts +0 -0
- package/lib/cjs/utils/getPropertiesStores.js +45 -0
- package/lib/cjs/utils/getPropertiesStores.js.map +1 -0
- package/lib/{utils → cjs/utils}/getRequiredProperties.d.ts +0 -0
- package/lib/cjs/utils/getRequiredProperties.js +67 -0
- package/lib/cjs/utils/getRequiredProperties.js.map +1 -0
- package/lib/{utils → cjs/utils}/getSpec.d.ts +0 -0
- package/lib/cjs/utils/getSpec.js +87 -0
- package/lib/cjs/utils/getSpec.js.map +1 -0
- package/lib/{utils → cjs/utils}/isJsonClass.d.ts +0 -0
- package/lib/cjs/utils/isJsonClass.js +12 -0
- package/lib/cjs/utils/isJsonClass.js.map +1 -0
- package/lib/{utils → cjs/utils}/isSuccessStatus.d.ts +0 -0
- package/lib/cjs/utils/isSuccessStatus.js +8 -0
- package/lib/cjs/utils/isSuccessStatus.js.map +1 -0
- package/lib/{utils → cjs/utils}/mapHeaders.d.ts +0 -0
- package/lib/cjs/utils/mapHeaders.js +29 -0
- package/lib/cjs/utils/mapHeaders.js.map +1 -0
- package/lib/{utils → cjs/utils}/mapNullableType.d.ts +0 -0
- package/lib/cjs/utils/mapNullableType.js +30 -0
- package/lib/cjs/utils/mapNullableType.js.map +1 -0
- package/lib/{utils → cjs/utils}/mapRouteOptions.d.ts +0 -0
- package/lib/cjs/utils/mapRouteOptions.js +26 -0
- package/lib/cjs/utils/mapRouteOptions.js.map +1 -0
- package/lib/{utils → cjs/utils}/matchGroups.d.ts +0 -0
- package/lib/cjs/utils/matchGroups.js +23 -0
- package/lib/cjs/utils/matchGroups.js.map +1 -0
- package/lib/{utils → cjs/utils}/mergeOperation.d.ts +0 -0
- package/lib/cjs/utils/mergeOperation.js +44 -0
- package/lib/cjs/utils/mergeOperation.js.map +1 -0
- package/lib/{utils → cjs/utils}/mergeSpec.d.ts +0 -0
- package/lib/cjs/utils/mergeSpec.js +46 -0
- package/lib/cjs/utils/mergeSpec.js.map +1 -0
- package/lib/{utils → cjs/utils}/operationIdFormatter.d.ts +0 -0
- package/lib/cjs/utils/operationIdFormatter.js +37 -0
- package/lib/cjs/utils/operationIdFormatter.js.map +1 -0
- package/lib/{utils → cjs/utils}/ref.d.ts +0 -0
- package/lib/cjs/utils/ref.js +70 -0
- package/lib/cjs/utils/ref.js.map +1 -0
- package/lib/{utils → cjs/utils}/toJsonMapCollection.d.ts +0 -0
- package/lib/cjs/utils/toJsonMapCollection.js +15 -0
- package/lib/cjs/utils/toJsonMapCollection.js.map +1 -0
- package/lib/{utils → cjs/utils}/toJsonRegex.d.ts +0 -0
- package/lib/cjs/utils/toJsonRegex.js +12 -0
- package/lib/cjs/utils/toJsonRegex.js.map +1 -0
- package/lib/esm/components/anyMapper.js +20 -0
- package/lib/esm/components/anyMapper.js.map +1 -0
- package/lib/esm/components/classMapper.js +37 -0
- package/lib/esm/components/classMapper.js.map +1 -0
- package/lib/esm/components/genericsMapper.js +58 -0
- package/lib/esm/components/genericsMapper.js.map +1 -0
- package/lib/esm/components/index.js +10 -0
- package/lib/esm/components/index.js.map +1 -0
- package/lib/esm/components/inheritedClassMapper.js +18 -0
- package/lib/esm/components/inheritedClassMapper.js.map +1 -0
- package/lib/esm/components/itemMapper.js +6 -0
- package/lib/esm/components/itemMapper.js.map +1 -0
- package/lib/esm/components/lazyRefMapper.js +15 -0
- package/lib/esm/components/lazyRefMapper.js.map +1 -0
- package/lib/esm/components/mapMapper.js +21 -0
- package/lib/esm/components/mapMapper.js.map +1 -0
- package/lib/esm/components/objectMapper.js +21 -0
- package/lib/esm/components/objectMapper.js.map +1 -0
- package/lib/esm/components/schemaMapper.js +96 -0
- package/lib/esm/components/schemaMapper.js.map +1 -0
- package/lib/esm/constants/httpMethods.js +43 -0
- package/lib/esm/constants/httpMethods.js.map +1 -0
- package/lib/esm/constants/httpStatusMessages.js +105 -0
- package/lib/esm/constants/httpStatusMessages.js.map +1 -0
- package/lib/esm/decorators/class/children.js +20 -0
- package/lib/esm/decorators/class/children.js.map +1 -0
- package/lib/esm/decorators/collections/collectionContains.js +25 -0
- package/lib/esm/decorators/collections/collectionContains.js.map +1 -0
- package/lib/esm/decorators/collections/collectionOf.js +97 -0
- package/lib/esm/decorators/collections/collectionOf.js.map +1 -0
- package/lib/esm/decorators/collections/maxItems.js +56 -0
- package/lib/esm/decorators/collections/maxItems.js.map +1 -0
- package/lib/esm/decorators/collections/maxProperties.js +79 -0
- package/lib/esm/decorators/collections/maxProperties.js.map +1 -0
- package/lib/esm/decorators/collections/minItems.js +60 -0
- package/lib/esm/decorators/collections/minItems.js.map +1 -0
- package/lib/esm/decorators/collections/minProperties.js +78 -0
- package/lib/esm/decorators/collections/minProperties.js.map +1 -0
- package/lib/esm/decorators/collections/uniqueItems.js +56 -0
- package/lib/esm/decorators/collections/uniqueItems.js.map +1 -0
- package/lib/esm/decorators/common/additionalProperties.js +16 -0
- package/lib/esm/decorators/common/additionalProperties.js.map +1 -0
- package/lib/esm/decorators/common/allOf.js +18 -0
- package/lib/esm/decorators/common/allOf.js.map +1 -0
- package/lib/esm/decorators/common/allow.js +43 -0
- package/lib/esm/decorators/common/allow.js.map +1 -0
- package/lib/esm/decorators/common/any.js +42 -0
- package/lib/esm/decorators/common/any.js.map +1 -0
- package/lib/esm/decorators/common/anyOf.js +22 -0
- package/lib/esm/decorators/common/anyOf.js.map +1 -0
- package/lib/esm/decorators/common/const.js +66 -0
- package/lib/esm/decorators/common/const.js.map +1 -0
- package/lib/esm/decorators/common/customKey.js +38 -0
- package/lib/esm/decorators/common/customKey.js.map +1 -0
- package/lib/esm/decorators/common/default.js +47 -0
- package/lib/esm/decorators/common/default.js.map +1 -0
- package/lib/esm/decorators/common/description.js +72 -0
- package/lib/esm/decorators/common/description.js.map +1 -0
- package/lib/esm/decorators/common/enum.js +26 -0
- package/lib/esm/decorators/common/enum.js.map +1 -0
- package/lib/esm/decorators/common/example.js +17 -0
- package/lib/esm/decorators/common/example.js.map +1 -0
- package/lib/esm/decorators/common/examples.js +17 -0
- package/lib/esm/decorators/common/examples.js.map +1 -0
- package/lib/esm/decorators/common/exclusiveMaximum.js +73 -0
- package/lib/esm/decorators/common/exclusiveMaximum.js.map +1 -0
- package/lib/esm/decorators/common/exclusiveMinimum.js +73 -0
- package/lib/esm/decorators/common/exclusiveMinimum.js.map +1 -0
- package/lib/esm/decorators/common/format.js +476 -0
- package/lib/esm/decorators/common/format.js.map +1 -0
- package/lib/esm/decorators/common/forwardGroups.js +16 -0
- package/lib/esm/decorators/common/forwardGroups.js.map +1 -0
- package/lib/esm/decorators/common/groups.js +37 -0
- package/lib/esm/decorators/common/groups.js.map +1 -0
- package/lib/esm/decorators/common/hidden.js +36 -0
- package/lib/esm/decorators/common/hidden.js.map +1 -0
- package/lib/esm/decorators/common/ignore.js +67 -0
- package/lib/esm/decorators/common/ignore.js.map +1 -0
- package/lib/esm/decorators/common/integer.js +67 -0
- package/lib/esm/decorators/common/integer.js.map +1 -0
- package/lib/esm/decorators/common/jsonEntityFn.js +28 -0
- package/lib/esm/decorators/common/jsonEntityFn.js.map +1 -0
- package/lib/esm/decorators/common/maxLength.js +85 -0
- package/lib/esm/decorators/common/maxLength.js.map +1 -0
- package/lib/esm/decorators/common/maximum.js +146 -0
- package/lib/esm/decorators/common/maximum.js.map +1 -0
- package/lib/esm/decorators/common/minLength.js +86 -0
- package/lib/esm/decorators/common/minLength.js.map +1 -0
- package/lib/esm/decorators/common/minimum.js +144 -0
- package/lib/esm/decorators/common/minimum.js.map +1 -0
- package/lib/esm/decorators/common/multipleOf.js +77 -0
- package/lib/esm/decorators/common/multipleOf.js.map +1 -0
- package/lib/esm/decorators/common/name.js +48 -0
- package/lib/esm/decorators/common/name.js.map +1 -0
- package/lib/esm/decorators/common/nullable.js +30 -0
- package/lib/esm/decorators/common/nullable.js.map +1 -0
- package/lib/esm/decorators/common/oneOf.js +22 -0
- package/lib/esm/decorators/common/oneOf.js.map +1 -0
- package/lib/esm/decorators/common/optional.js +24 -0
- package/lib/esm/decorators/common/optional.js.map +1 -0
- package/lib/esm/decorators/common/pattern.js +99 -0
- package/lib/esm/decorators/common/pattern.js.map +1 -0
- package/lib/esm/decorators/common/property.js +23 -0
- package/lib/esm/decorators/common/property.js.map +1 -0
- package/lib/esm/decorators/common/readOnly.js +17 -0
- package/lib/esm/decorators/common/readOnly.js.map +1 -0
- package/lib/esm/decorators/common/required.js +49 -0
- package/lib/esm/decorators/common/required.js.map +1 -0
- package/lib/esm/decorators/common/requiredGroups.js +25 -0
- package/lib/esm/decorators/common/requiredGroups.js.map +1 -0
- package/lib/esm/decorators/common/schema.js +63 -0
- package/lib/esm/decorators/common/schema.js.map +1 -0
- package/lib/esm/decorators/common/title.js +45 -0
- package/lib/esm/decorators/common/title.js.map +1 -0
- package/lib/esm/decorators/common/writeOnly.js +17 -0
- package/lib/esm/decorators/common/writeOnly.js.map +1 -0
- package/lib/esm/decorators/config/jsonEntityComponent.js +14 -0
- package/lib/esm/decorators/config/jsonEntityComponent.js.map +1 -0
- package/lib/esm/decorators/generics/genericOf.js +95 -0
- package/lib/esm/decorators/generics/genericOf.js.map +1 -0
- package/lib/esm/decorators/generics/generics.js +21 -0
- package/lib/esm/decorators/generics/generics.js.map +1 -0
- package/lib/esm/decorators/index.js +73 -0
- package/lib/esm/decorators/index.js.map +1 -0
- package/lib/esm/decorators/operations/consumes.js +35 -0
- package/lib/esm/decorators/operations/consumes.js.map +1 -0
- package/lib/esm/decorators/operations/contentType.js +24 -0
- package/lib/esm/decorators/operations/contentType.js.map +1 -0
- package/lib/esm/decorators/operations/deprecated.js +39 -0
- package/lib/esm/decorators/operations/deprecated.js.map +1 -0
- package/lib/esm/decorators/operations/header.js +55 -0
- package/lib/esm/decorators/operations/header.js.map +1 -0
- package/lib/esm/decorators/operations/in.js +74 -0
- package/lib/esm/decorators/operations/in.js.map +1 -0
- package/lib/esm/decorators/operations/location.js +25 -0
- package/lib/esm/decorators/operations/location.js.map +1 -0
- package/lib/esm/decorators/operations/operationId.js +20 -0
- package/lib/esm/decorators/operations/operationId.js.map +1 -0
- package/lib/esm/decorators/operations/operationPath.js +30 -0
- package/lib/esm/decorators/operations/operationPath.js.map +1 -0
- package/lib/esm/decorators/operations/partial.js +14 -0
- package/lib/esm/decorators/operations/partial.js.map +1 -0
- package/lib/esm/decorators/operations/path.js +25 -0
- package/lib/esm/decorators/operations/path.js.map +1 -0
- package/lib/esm/decorators/operations/produces.js +42 -0
- package/lib/esm/decorators/operations/produces.js.map +1 -0
- package/lib/esm/decorators/operations/redirect.js +22 -0
- package/lib/esm/decorators/operations/redirect.js.map +1 -0
- package/lib/esm/decorators/operations/returns.js +211 -0
- package/lib/esm/decorators/operations/returns.js.map +1 -0
- package/lib/esm/decorators/operations/route.js +186 -0
- package/lib/esm/decorators/operations/route.js.map +1 -0
- package/lib/esm/decorators/operations/security.js +39 -0
- package/lib/esm/decorators/operations/security.js.map +1 -0
- package/lib/esm/decorators/operations/status.js +129 -0
- package/lib/esm/decorators/operations/status.js.map +1 -0
- package/lib/esm/decorators/operations/summary.js +30 -0
- package/lib/esm/decorators/operations/summary.js.map +1 -0
- package/lib/esm/decorators/operations/tags.js +48 -0
- package/lib/esm/decorators/operations/tags.js.map +1 -0
- package/lib/esm/domain/DecoratorContext.js +84 -0
- package/lib/esm/domain/DecoratorContext.js.map +1 -0
- package/lib/esm/domain/JsonAliasMap.js +11 -0
- package/lib/esm/domain/JsonAliasMap.js.map +1 -0
- package/lib/esm/domain/JsonClassStore.js +34 -0
- package/lib/esm/domain/JsonClassStore.js.map +1 -0
- package/lib/esm/domain/JsonEntityStore.js +159 -0
- package/lib/esm/domain/JsonEntityStore.js.map +1 -0
- package/lib/esm/domain/JsonFormatTypes.js +19 -0
- package/lib/esm/domain/JsonFormatTypes.js.map +1 -0
- package/lib/esm/domain/JsonLazyRef.js +22 -0
- package/lib/esm/domain/JsonLazyRef.js.map +1 -0
- package/lib/esm/domain/JsonMap.js +23 -0
- package/lib/esm/domain/JsonMap.js.map +1 -0
- package/lib/esm/domain/JsonMethodStore.js +61 -0
- package/lib/esm/domain/JsonMethodStore.js.map +1 -0
- package/lib/esm/domain/JsonOperation.js +250 -0
- package/lib/esm/domain/JsonOperation.js.map +1 -0
- package/lib/esm/domain/JsonOperationPathsMap.js +25 -0
- package/lib/esm/domain/JsonOperationPathsMap.js.map +1 -0
- package/lib/esm/domain/JsonOperationRoute.js +52 -0
- package/lib/esm/domain/JsonOperationRoute.js.map +1 -0
- package/lib/esm/domain/JsonParameter.js +153 -0
- package/lib/esm/domain/JsonParameter.js.map +1 -0
- package/lib/esm/domain/JsonParameterStore.js +87 -0
- package/lib/esm/domain/JsonParameterStore.js.map +1 -0
- package/lib/esm/domain/JsonParameterTypes.js +22 -0
- package/lib/esm/domain/JsonParameterTypes.js.map +1 -0
- package/lib/esm/domain/JsonPropertyStore.js +65 -0
- package/lib/esm/domain/JsonPropertyStore.js.map +1 -0
- package/lib/esm/domain/JsonRequestBody.js +28 -0
- package/lib/esm/domain/JsonRequestBody.js.map +1 -0
- package/lib/esm/domain/JsonResponse.js +81 -0
- package/lib/esm/domain/JsonResponse.js.map +1 -0
- package/lib/esm/domain/JsonSchema.js +688 -0
- package/lib/esm/domain/JsonSchema.js.map +1 -0
- package/lib/esm/domain/SpecTypes.js +7 -0
- package/lib/esm/domain/SpecTypes.js.map +1 -0
- package/lib/esm/domain/index.js +17 -0
- package/lib/esm/domain/index.js.map +1 -0
- package/lib/esm/hooks/alterIgnore.js +17 -0
- package/lib/esm/hooks/alterIgnore.js.map +1 -0
- package/lib/esm/hooks/alterRequiredGroups.js +11 -0
- package/lib/esm/hooks/alterRequiredGroups.js.map +1 -0
- package/lib/esm/index.js +20 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/interfaces/IgnoreCallback.js +2 -0
- package/lib/esm/interfaces/IgnoreCallback.js.map +1 -0
- package/lib/esm/interfaces/JsonHookContext.js +2 -0
- package/lib/esm/interfaces/JsonHookContext.js.map +1 -0
- package/lib/esm/interfaces/JsonOpenSpec.js +2 -0
- package/lib/esm/interfaces/JsonOpenSpec.js.map +1 -0
- package/lib/esm/interfaces/JsonSchemaOptions.js +2 -0
- package/lib/esm/interfaces/JsonSchemaOptions.js.map +1 -0
- package/lib/esm/interfaces/index.js +5 -0
- package/lib/esm/interfaces/index.js.map +1 -0
- package/lib/esm/registries/JsonSchemaMapperContainer.js +27 -0
- package/lib/esm/registries/JsonSchemaMapperContainer.js.map +1 -0
- package/lib/esm/utils/buildPath.js +9 -0
- package/lib/esm/utils/buildPath.js.map +1 -0
- package/lib/esm/utils/concatParameters.js +12 -0
- package/lib/esm/utils/concatParameters.js.map +1 -0
- package/lib/esm/utils/concatPath.js +4 -0
- package/lib/esm/utils/concatPath.js.map +1 -0
- package/lib/esm/utils/defineStatusModel.js +8 -0
- package/lib/esm/utils/defineStatusModel.js.map +1 -0
- package/lib/esm/utils/from.js +249 -0
- package/lib/esm/utils/from.js.map +1 -0
- package/lib/esm/utils/generics.js +34 -0
- package/lib/esm/utils/generics.js.map +1 -0
- package/lib/esm/utils/getComputedType.js +22 -0
- package/lib/esm/utils/getComputedType.js.map +1 -0
- package/lib/esm/utils/getInheritedStores.js +19 -0
- package/lib/esm/utils/getInheritedStores.js.map +1 -0
- package/lib/esm/utils/getJsonEntityStore.js +20 -0
- package/lib/esm/utils/getJsonEntityStore.js.map +1 -0
- package/lib/esm/utils/getJsonPathParameters.js +69 -0
- package/lib/esm/utils/getJsonPathParameters.js.map +1 -0
- package/lib/esm/utils/getJsonSchema.js +51 -0
- package/lib/esm/utils/getJsonSchema.js.map +1 -0
- package/lib/esm/utils/getJsonType.js +36 -0
- package/lib/esm/utils/getJsonType.js.map +1 -0
- package/lib/esm/utils/getOperationsRoutes.js +32 -0
- package/lib/esm/utils/getOperationsRoutes.js.map +1 -0
- package/lib/esm/utils/getOperationsStores.js +29 -0
- package/lib/esm/utils/getOperationsStores.js.map +1 -0
- package/lib/esm/utils/getPropertiesStores.js +40 -0
- package/lib/esm/utils/getPropertiesStores.js.map +1 -0
- package/lib/esm/utils/getRequiredProperties.js +63 -0
- package/lib/esm/utils/getRequiredProperties.js.map +1 -0
- package/lib/esm/utils/getSpec.js +83 -0
- package/lib/esm/utils/getSpec.js.map +1 -0
- package/lib/esm/utils/isJsonClass.js +8 -0
- package/lib/esm/utils/isJsonClass.js.map +1 -0
- package/lib/esm/utils/isSuccessStatus.js +3 -0
- package/lib/esm/utils/isSuccessStatus.js.map +1 -0
- package/lib/esm/utils/mapHeaders.js +25 -0
- package/lib/esm/utils/mapHeaders.js.map +1 -0
- package/lib/esm/utils/mapNullableType.js +26 -0
- package/lib/esm/utils/mapNullableType.js.map +1 -0
- package/lib/esm/utils/mapRouteOptions.js +22 -0
- package/lib/esm/utils/mapRouteOptions.js.map +1 -0
- package/lib/esm/utils/matchGroups.js +18 -0
- package/lib/esm/utils/matchGroups.js.map +1 -0
- package/lib/esm/utils/mergeOperation.js +40 -0
- package/lib/esm/utils/mergeOperation.js.map +1 -0
- package/lib/esm/utils/mergeSpec.js +42 -0
- package/lib/esm/utils/mergeSpec.js.map +1 -0
- package/lib/esm/utils/operationIdFormatter.js +33 -0
- package/lib/esm/utils/operationIdFormatter.js.map +1 -0
- package/lib/esm/utils/ref.js +64 -0
- package/lib/esm/utils/ref.js.map +1 -0
- package/lib/esm/utils/toJsonMapCollection.js +11 -0
- package/lib/esm/utils/toJsonMapCollection.js.map +1 -0
- package/lib/esm/utils/toJsonRegex.js +8 -0
- package/lib/esm/utils/toJsonRegex.js.map +1 -0
- package/lib/types/components/anyMapper.d.ts +2 -0
- package/lib/types/components/classMapper.d.ts +3 -0
- package/lib/types/components/genericsMapper.d.ts +5 -0
- package/lib/types/components/index.d.ts +9 -0
- package/lib/types/components/inheritedClassMapper.d.ts +5 -0
- package/lib/types/components/itemMapper.d.ts +2 -0
- package/lib/types/components/lazyRefMapper.d.ts +3 -0
- package/lib/types/components/mapMapper.d.ts +9 -0
- package/lib/types/components/objectMapper.d.ts +8 -0
- package/lib/types/components/schemaMapper.d.ts +3 -0
- package/lib/types/constants/httpMethods.d.ts +12 -0
- package/lib/types/constants/httpStatusMessages.d.ts +272 -0
- package/lib/types/decorators/class/children.d.ts +11 -0
- package/lib/types/decorators/collections/collectionContains.d.ts +21 -0
- package/lib/types/decorators/collections/collectionOf.d.ts +101 -0
- package/lib/types/decorators/collections/maxItems.d.ts +47 -0
- package/lib/types/decorators/collections/maxProperties.d.ts +70 -0
- package/lib/types/decorators/collections/minItems.d.ts +51 -0
- package/lib/types/decorators/collections/minProperties.d.ts +69 -0
- package/lib/types/decorators/collections/uniqueItems.d.ts +50 -0
- package/lib/types/decorators/common/additionalProperties.d.ts +11 -0
- package/lib/types/decorators/common/allOf.d.ts +13 -0
- package/lib/types/decorators/common/allow.d.ts +28 -0
- package/lib/types/decorators/common/any.d.ts +38 -0
- package/lib/types/decorators/common/anyOf.d.ts +17 -0
- package/lib/types/decorators/common/const.d.ts +61 -0
- package/lib/types/decorators/common/customKey.d.ts +26 -0
- package/lib/types/decorators/common/default.d.ts +41 -0
- package/lib/types/decorators/common/description.d.ts +53 -0
- package/lib/types/decorators/common/enum.d.ts +98 -0
- package/lib/types/decorators/common/example.d.ts +11 -0
- package/lib/types/decorators/common/examples.d.ts +12 -0
- package/lib/types/decorators/common/exclusiveMaximum.d.ts +69 -0
- package/lib/types/decorators/common/exclusiveMinimum.d.ts +69 -0
- package/lib/types/decorators/common/format.d.ts +459 -0
- package/lib/types/decorators/common/forwardGroups.d.ts +10 -0
- package/lib/types/decorators/common/groups.d.ts +11 -0
- package/lib/types/decorators/common/hidden.d.ts +32 -0
- package/lib/types/decorators/common/ignore.d.ts +58 -0
- package/lib/types/decorators/common/integer.d.ts +61 -0
- package/lib/types/decorators/common/jsonEntityFn.d.ts +21 -0
- package/lib/types/decorators/common/maxLength.d.ts +76 -0
- package/lib/types/decorators/common/maximum.d.ts +138 -0
- package/lib/types/decorators/common/minLength.d.ts +77 -0
- package/lib/types/decorators/common/minimum.d.ts +136 -0
- package/lib/types/decorators/common/multipleOf.d.ts +68 -0
- package/lib/types/decorators/common/name.d.ts +32 -0
- package/lib/types/decorators/common/nullable.d.ts +25 -0
- package/lib/types/decorators/common/oneOf.d.ts +17 -0
- package/lib/types/decorators/common/optional.d.ts +10 -0
- package/lib/types/decorators/common/pattern.d.ts +93 -0
- package/lib/types/decorators/common/property.d.ts +11 -0
- package/lib/types/decorators/common/readOnly.d.ts +11 -0
- package/lib/types/decorators/common/required.d.ts +44 -0
- package/lib/types/decorators/common/requiredGroups.d.ts +10 -0
- package/lib/types/decorators/common/schema.d.ts +53 -0
- package/lib/types/decorators/common/title.d.ts +39 -0
- package/lib/types/decorators/common/writeOnly.d.ts +11 -0
- package/lib/types/decorators/config/jsonEntityComponent.d.ts +10 -0
- package/lib/types/decorators/generics/genericOf.d.ts +76 -0
- package/lib/types/decorators/generics/generics.d.ts +14 -0
- package/lib/types/decorators/index.d.ts +67 -0
- package/lib/types/decorators/operations/consumes.d.ts +19 -0
- package/lib/types/decorators/operations/contentType.d.ts +20 -0
- package/lib/types/decorators/operations/deprecated.d.ts +23 -0
- package/lib/types/decorators/operations/header.d.ts +49 -0
- package/lib/types/decorators/operations/in.d.ts +64 -0
- package/lib/types/decorators/operations/location.d.ts +22 -0
- package/lib/types/decorators/operations/operationId.d.ts +10 -0
- package/lib/types/decorators/operations/operationPath.d.ts +21 -0
- package/lib/types/decorators/operations/partial.d.ts +10 -0
- package/lib/types/decorators/operations/path.d.ts +15 -0
- package/lib/types/decorators/operations/produces.d.ts +26 -0
- package/lib/types/decorators/operations/redirect.d.ts +52 -0
- package/lib/types/decorators/operations/returns.d.ts +238 -0
- package/lib/types/decorators/operations/route.d.ts +185 -0
- package/lib/types/decorators/operations/security.d.ts +23 -0
- package/lib/types/decorators/operations/status.d.ts +127 -0
- package/lib/types/decorators/operations/summary.d.ts +20 -0
- package/lib/types/decorators/operations/tags.d.ts +23 -0
- package/lib/types/domain/DecoratorContext.d.ts +28 -0
- package/lib/types/domain/JsonAliasMap.d.ts +12 -0
- package/lib/types/domain/JsonClassStore.d.ts +12 -0
- package/lib/types/domain/JsonEntityStore.d.ts +132 -0
- package/lib/types/domain/JsonFormatTypes.d.ts +17 -0
- package/lib/types/domain/JsonLazyRef.d.ts +11 -0
- package/lib/types/domain/JsonMap.d.ts +7 -0
- package/lib/types/domain/JsonMethodStore.d.ts +19 -0
- package/lib/types/domain/JsonOperation.d.ts +51 -0
- package/lib/types/domain/JsonOperationPathsMap.d.ts +7 -0
- package/lib/types/domain/JsonOperationRoute.d.ts +24 -0
- package/lib/types/domain/JsonParameter.d.ts +22 -0
- package/lib/types/domain/JsonParameterStore.d.ts +30 -0
- package/lib/types/domain/JsonParameterTypes.d.ts +16 -0
- package/lib/types/domain/JsonPropertyStore.d.ts +23 -0
- package/lib/types/domain/JsonRequestBody.d.ts +11 -0
- package/lib/types/domain/JsonResponse.d.ts +22 -0
- package/lib/types/domain/JsonSchema.d.ts +337 -0
- package/lib/types/domain/SpecTypes.d.ts +5 -0
- package/lib/types/domain/index.d.ts +16 -0
- package/lib/types/hooks/alterIgnore.d.ts +9 -0
- package/lib/types/hooks/alterRequiredGroups.d.ts +6 -0
- package/lib/types/index.d.ts +19 -0
- package/lib/types/interfaces/IgnoreCallback.d.ts +4 -0
- package/lib/types/interfaces/JsonHookContext.d.ts +17 -0
- package/lib/types/interfaces/JsonOpenSpec.d.ts +9 -0
- package/lib/types/interfaces/JsonSchemaOptions.d.ts +26 -0
- package/lib/types/interfaces/index.d.ts +4 -0
- package/lib/types/registries/JsonSchemaMapperContainer.d.ts +18 -0
- package/lib/types/utils/buildPath.d.ts +6 -0
- package/lib/types/utils/concatParameters.d.ts +4 -0
- package/lib/types/utils/concatPath.d.ts +1 -0
- package/lib/types/utils/defineStatusModel.d.ts +3 -0
- package/lib/types/utils/from.d.ts +189 -0
- package/lib/types/utils/generics.d.ts +50 -0
- package/lib/types/utils/getComputedType.d.ts +5 -0
- package/lib/types/utils/getInheritedStores.d.ts +8 -0
- package/lib/types/utils/getJsonEntityStore.d.ts +19 -0
- package/lib/types/utils/getJsonPathParameters.d.ts +7 -0
- package/lib/types/utils/getJsonSchema.d.ts +4 -0
- package/lib/types/utils/getJsonType.d.ts +5 -0
- package/lib/types/utils/getOperationsRoutes.d.ts +8 -0
- package/lib/types/utils/getOperationsStores.d.ts +6 -0
- package/lib/types/utils/getPropertiesStores.d.ts +20 -0
- package/lib/types/utils/getRequiredProperties.d.ts +6 -0
- package/lib/types/utils/getSpec.d.ts +49 -0
- package/lib/types/utils/isJsonClass.d.ts +4 -0
- package/lib/types/utils/isSuccessStatus.d.ts +2 -0
- package/lib/types/utils/mapHeaders.d.ts +9 -0
- package/lib/types/utils/mapNullableType.d.ts +3 -0
- package/lib/types/utils/mapRouteOptions.d.ts +5 -0
- package/lib/types/utils/matchGroups.d.ts +4 -0
- package/lib/types/utils/mergeOperation.d.ts +17 -0
- package/lib/types/utils/mergeSpec.d.ts +23 -0
- package/lib/types/utils/operationIdFormatter.d.ts +4 -0
- package/lib/types/utils/ref.d.ts +14 -0
- package/lib/types/utils/toJsonMapCollection.d.ts +7 -0
- package/lib/types/utils/toJsonRegex.d.ts +5 -0
- package/package.json +16 -12
- package/tsconfig.compile.esm.json +23 -0
- package/lib/index.js +0 -8379
- package/lib/index.js.map +0 -1
- package/lib/index.modern.js +0 -8230
- package/lib/index.modern.js.map +0 -1
- package/lib/utils/mergeSpec.benchmark.d.ts +0 -1
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { Type } from "@tsed/core";
|
|
2
|
+
import { OS3Example } from "@tsed/openspec";
|
|
3
|
+
import { JsonSchema, JsonSchemaObject } from "../../domain/JsonSchema";
|
|
4
|
+
import { JsonHeader, JsonHeaders } from "../../interfaces/JsonOpenSpec";
|
|
5
|
+
import { GenericValue } from "../../utils/generics";
|
|
6
|
+
export interface ReturnsChainedDecorators {
|
|
7
|
+
<T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;
|
|
8
|
+
(target: Function): void;
|
|
9
|
+
/**
|
|
10
|
+
* Set a Content-Type for the current response
|
|
11
|
+
* @param value
|
|
12
|
+
* @constructor
|
|
13
|
+
*/
|
|
14
|
+
ContentType(value: string): this;
|
|
15
|
+
/**
|
|
16
|
+
* Add a description
|
|
17
|
+
* @param description
|
|
18
|
+
*/
|
|
19
|
+
Description(description: string): this;
|
|
20
|
+
/**
|
|
21
|
+
* Add examples
|
|
22
|
+
* @param examples
|
|
23
|
+
*/
|
|
24
|
+
Examples(examples: Record<string, OS3Example>): this;
|
|
25
|
+
Examples(examples: Record<string, any>): this;
|
|
26
|
+
Examples(examples: any): this;
|
|
27
|
+
/**
|
|
28
|
+
* Change the model type
|
|
29
|
+
* @param type
|
|
30
|
+
*/
|
|
31
|
+
Type(type: Type<any> | any): this;
|
|
32
|
+
/**
|
|
33
|
+
* Change the status
|
|
34
|
+
* @param status
|
|
35
|
+
* @constructor
|
|
36
|
+
*/
|
|
37
|
+
Status(status: string | number): this;
|
|
38
|
+
/**
|
|
39
|
+
* Add the nested types
|
|
40
|
+
* @param types
|
|
41
|
+
*/
|
|
42
|
+
Of(...types: GenericValue[]): this;
|
|
43
|
+
/**
|
|
44
|
+
* Declare a nested generic models
|
|
45
|
+
* @param generics
|
|
46
|
+
*/
|
|
47
|
+
Nested(...generics: GenericValue[]): this;
|
|
48
|
+
/**
|
|
49
|
+
* Add header.
|
|
50
|
+
* @param key
|
|
51
|
+
* @param value
|
|
52
|
+
*/
|
|
53
|
+
Header(key: string, value: number | string | (JsonHeader & {
|
|
54
|
+
value?: string | number | boolean;
|
|
55
|
+
})): this;
|
|
56
|
+
/**
|
|
57
|
+
* Add headers
|
|
58
|
+
*/
|
|
59
|
+
Headers(headers: JsonHeaders): this;
|
|
60
|
+
/**
|
|
61
|
+
* Add location hea
|
|
62
|
+
*/
|
|
63
|
+
Location(location: string, meta?: JsonHeader): this;
|
|
64
|
+
/**
|
|
65
|
+
* Assign partial schema
|
|
66
|
+
* @param schema
|
|
67
|
+
*/
|
|
68
|
+
Schema(schema: Partial<JsonSchemaObject> | JsonSchema): this;
|
|
69
|
+
/**
|
|
70
|
+
* Add an inline title for the return model.
|
|
71
|
+
* @param title
|
|
72
|
+
*/
|
|
73
|
+
Title(title: string): this;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @param groups
|
|
77
|
+
* @constructor
|
|
78
|
+
*/
|
|
79
|
+
Groups(...groups: string[]): this;
|
|
80
|
+
[key: string]: any;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Add responses documentation for a specific status code.
|
|
84
|
+
*
|
|
85
|
+
* ## Usage
|
|
86
|
+
*
|
|
87
|
+
* Ts.ED v5/v6 API introducing the chaining decorator concept. Now a decorator like Returns can be used with another decorators like Description.
|
|
88
|
+
*
|
|
89
|
+
* ::: warning
|
|
90
|
+
* v5 has a basic support of the chaining decorator to facilitate the migration to v6!
|
|
91
|
+
* :::
|
|
92
|
+
*
|
|
93
|
+
* ```typescript
|
|
94
|
+
* import {Returns} from "@tsed/schema";
|
|
95
|
+
*
|
|
96
|
+
* @Controller("/")
|
|
97
|
+
* class MyController {
|
|
98
|
+
* @Returns(404, String).Description("Not Found")
|
|
99
|
+
* @Returns(200, Model).Description("Success")
|
|
100
|
+
* async myMethod(): Promise<Model> {}
|
|
101
|
+
* }
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* ::: tip
|
|
105
|
+
* TypeScript and your IDE will discover automatically the chained decorators. But for more details you can look on @@ReturnsChainedDecorators@@ interface, to know
|
|
106
|
+
* what chained decorators are available under Returns decorator.
|
|
107
|
+
* :::
|
|
108
|
+
*
|
|
109
|
+
* This example will produce this documentation in swagger:
|
|
110
|
+
*
|
|
111
|
+
* ```json
|
|
112
|
+
* {
|
|
113
|
+
* "responses": {
|
|
114
|
+
* "404": {
|
|
115
|
+
* "description": "Description",
|
|
116
|
+
* "schema": {"type": "string"}
|
|
117
|
+
* },
|
|
118
|
+
* "2OO": {
|
|
119
|
+
* "description": "Description",
|
|
120
|
+
* "schema": {"$ref": "..."}
|
|
121
|
+
* }
|
|
122
|
+
* }
|
|
123
|
+
* }
|
|
124
|
+
* ```
|
|
125
|
+
*
|
|
126
|
+
* ## Declaring an Array
|
|
127
|
+
*
|
|
128
|
+
* Use chained decorators to declare an array with model as following:
|
|
129
|
+
*
|
|
130
|
+
* ```typescript
|
|
131
|
+
* import {Returns} from "@tsed/schema";
|
|
132
|
+
*
|
|
133
|
+
* @Controller("/models")
|
|
134
|
+
* class ModelCtrl {
|
|
135
|
+
* @Get("/")
|
|
136
|
+
* @Returns(200, Array).Of(Model).Description("Success")
|
|
137
|
+
* async myMethod(): Promise<Model> {
|
|
138
|
+
* }
|
|
139
|
+
* }
|
|
140
|
+
* ```
|
|
141
|
+
*
|
|
142
|
+
* Deprecated version:
|
|
143
|
+
*
|
|
144
|
+
* ```typescript
|
|
145
|
+
* import {ReturnsArray} from "@tsed/common";
|
|
146
|
+
* import {Returns} from "@tsed/schema";
|
|
147
|
+
*
|
|
148
|
+
* @Controller("/")
|
|
149
|
+
* class MyController {
|
|
150
|
+
* @ReturnsArray(200, Model) // deprecated
|
|
151
|
+
* async myMethod(): Promise<Model> {}
|
|
152
|
+
* }
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* ### Declaring a generic model <Badge text="6+"/>
|
|
156
|
+
*
|
|
157
|
+
* Sometime, it might be useful to use generic models. TypeScript doesn't store the generic type in the metadata. This is why we need to
|
|
158
|
+
* declare explicitly the generic models with the decorators.
|
|
159
|
+
*
|
|
160
|
+
* One of the generic's usage, can be a paginated list. With Returns decorator it's now possible to declare generic type and generate the appropriate OpenSpec documentation.
|
|
161
|
+
*
|
|
162
|
+
* Starting with the pagination model, by using @@Generics@@ and @@CollectionOf@@:
|
|
163
|
+
*
|
|
164
|
+
* ```typescript
|
|
165
|
+
* @Generics("T")
|
|
166
|
+
* class Pagination<T> {
|
|
167
|
+
* @CollectionOf("T")
|
|
168
|
+
* data: T[];
|
|
169
|
+
*
|
|
170
|
+
* @Property()
|
|
171
|
+
* totalCount: number;
|
|
172
|
+
* }
|
|
173
|
+
* ```
|
|
174
|
+
*
|
|
175
|
+
* Now, we need a model to be used with the generic Pagination model:
|
|
176
|
+
*
|
|
177
|
+
* ```typescript
|
|
178
|
+
* class Product {
|
|
179
|
+
* @Property()
|
|
180
|
+
* id: string;
|
|
181
|
+
*
|
|
182
|
+
* @Property()
|
|
183
|
+
* title: string;
|
|
184
|
+
* }
|
|
185
|
+
* ```
|
|
186
|
+
*
|
|
187
|
+
* Finally, we can use our models on a method as following:
|
|
188
|
+
*
|
|
189
|
+
* ```typescript
|
|
190
|
+
* class Controller {
|
|
191
|
+
* @OperationPath("POST", "/")
|
|
192
|
+
* @Returns(200, Pagination).Of(Product).Description("description")
|
|
193
|
+
* async method(): Promise<Pagination<Product> | null> {
|
|
194
|
+
* return null;
|
|
195
|
+
* }
|
|
196
|
+
* }
|
|
197
|
+
* ```
|
|
198
|
+
*
|
|
199
|
+
* ### Declaring a nested generics models <Badge text="6+"/>
|
|
200
|
+
*
|
|
201
|
+
* It's also possible to declare a nested generics models in order to have this type `Pagination<Submission<Product>>`:
|
|
202
|
+
*
|
|
203
|
+
* ```typescript
|
|
204
|
+
* import {Generics, Property, Returns} from "@tsed/schema";
|
|
205
|
+
* import {Post} from "@tsed/common";
|
|
206
|
+
*
|
|
207
|
+
* class Controller {
|
|
208
|
+
* @Post("/")
|
|
209
|
+
* @Returns(200, Pagination).Of(Submission).Nested(Product).Description("description")
|
|
210
|
+
* async method(): Promise<Pagination<Submission<Product>> | null> {
|
|
211
|
+
* return null;
|
|
212
|
+
* }
|
|
213
|
+
* }
|
|
214
|
+
* ```
|
|
215
|
+
*
|
|
216
|
+
* And here is the Submission model:
|
|
217
|
+
*
|
|
218
|
+
* ```typescript
|
|
219
|
+
* import {Generics, Property} from "@tsed/schema";
|
|
220
|
+
*
|
|
221
|
+
* @Generics("T")
|
|
222
|
+
* class Submission<T> {
|
|
223
|
+
* @Property()
|
|
224
|
+
* _id: string;
|
|
225
|
+
* @Property("T")
|
|
226
|
+
* data: T;
|
|
227
|
+
* }
|
|
228
|
+
* ```
|
|
229
|
+
*
|
|
230
|
+
* @param status
|
|
231
|
+
* @param model
|
|
232
|
+
* @decorator
|
|
233
|
+
* @swagger
|
|
234
|
+
* @schema
|
|
235
|
+
* @response
|
|
236
|
+
* @operation
|
|
237
|
+
*/
|
|
238
|
+
export declare function Returns(status?: string | number, model?: Type<any>): ReturnsChainedDecorators;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { OperationMethods } from "../../constants/httpMethods";
|
|
2
|
+
export interface RouteChainedDecorators {
|
|
3
|
+
<T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;
|
|
4
|
+
/**
|
|
5
|
+
* @param string
|
|
6
|
+
* @constructor
|
|
7
|
+
*/
|
|
8
|
+
Path(string: string): this;
|
|
9
|
+
/**
|
|
10
|
+
* Set the operation method
|
|
11
|
+
* @param method
|
|
12
|
+
*/
|
|
13
|
+
Method(method: OperationMethods | string): this;
|
|
14
|
+
/**
|
|
15
|
+
* Set the operation id
|
|
16
|
+
* @param id
|
|
17
|
+
*/
|
|
18
|
+
Id(id: string): this;
|
|
19
|
+
/**
|
|
20
|
+
* Set the operation id
|
|
21
|
+
* @param name
|
|
22
|
+
*/
|
|
23
|
+
Name(name: string): this;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param description
|
|
27
|
+
*/
|
|
28
|
+
Description(description: string): this;
|
|
29
|
+
/**
|
|
30
|
+
* Summary
|
|
31
|
+
* @constructor
|
|
32
|
+
* @param Summary
|
|
33
|
+
*/
|
|
34
|
+
Summary(Summary: string): this;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Describe a new route with a method and path.
|
|
38
|
+
*
|
|
39
|
+
* ```typescript
|
|
40
|
+
* @Controller('/')
|
|
41
|
+
* export class Ctrl {
|
|
42
|
+
*
|
|
43
|
+
* @Route('GET', '/')
|
|
44
|
+
* get() { }
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @returns {Function}
|
|
50
|
+
* @param method
|
|
51
|
+
* @param path
|
|
52
|
+
* @param args
|
|
53
|
+
* @decorator
|
|
54
|
+
* @operation
|
|
55
|
+
*/
|
|
56
|
+
export declare function Route(method: string, path: string, ...args: any[]): RouteChainedDecorators;
|
|
57
|
+
export declare function Route(...args: any[]): RouteChainedDecorators;
|
|
58
|
+
/**
|
|
59
|
+
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
60
|
+
*
|
|
61
|
+
* This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
|
|
62
|
+
* For example, if you placed the following route at the top of all other route definitions, it would require that
|
|
63
|
+
* all routes from that point on would require authentication, and automatically load a user.
|
|
64
|
+
* Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
|
|
65
|
+
* to continue matching subsequent routes.
|
|
66
|
+
* @param path
|
|
67
|
+
* @param args
|
|
68
|
+
* @returns {Function}
|
|
69
|
+
* @decorator
|
|
70
|
+
* @operation
|
|
71
|
+
* @httpMethod
|
|
72
|
+
*/
|
|
73
|
+
export declare function All(path?: string | RegExp | any, ...args: any[]): RouteChainedDecorators;
|
|
74
|
+
/**
|
|
75
|
+
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
76
|
+
*
|
|
77
|
+
* This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
|
|
78
|
+
* For example, if you placed the following route at the top of all other route definitions, it would require that
|
|
79
|
+
* all routes from that point on would require authentication, and automatically load a user.
|
|
80
|
+
* Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
|
|
81
|
+
* to continue matching subsequent routes.
|
|
82
|
+
* @param path
|
|
83
|
+
* @param args
|
|
84
|
+
* @returns {Function}
|
|
85
|
+
* @decorator
|
|
86
|
+
* @operation
|
|
87
|
+
* @httpMethod
|
|
88
|
+
*/
|
|
89
|
+
export declare function Get(path?: string | RegExp | any, ...args: any[]): RouteChainedDecorators;
|
|
90
|
+
/**
|
|
91
|
+
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
92
|
+
*
|
|
93
|
+
* This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
|
|
94
|
+
* For example, if you placed the following route at the top of all other route definitions, it would require that
|
|
95
|
+
* all routes from that point on would require authentication, and automatically load a user.
|
|
96
|
+
* Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
|
|
97
|
+
* to continue matching subsequent routes.
|
|
98
|
+
* @param path
|
|
99
|
+
* @param args
|
|
100
|
+
* @returns {Function}
|
|
101
|
+
* @decorator
|
|
102
|
+
* @operation
|
|
103
|
+
* @httpMethod
|
|
104
|
+
*/
|
|
105
|
+
export declare function Post(path?: string | RegExp | any, ...args: any[]): RouteChainedDecorators;
|
|
106
|
+
/**
|
|
107
|
+
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
108
|
+
*
|
|
109
|
+
* This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
|
|
110
|
+
* For example, if you placed the following route at the top of all other route definitions, it would require that
|
|
111
|
+
* all routes from that point on would require authentication, and automatically load a user.
|
|
112
|
+
* Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
|
|
113
|
+
* to continue matching subsequent routes.
|
|
114
|
+
* @param path
|
|
115
|
+
* @param args
|
|
116
|
+
* @returns {Function}
|
|
117
|
+
* @decorator
|
|
118
|
+
* @operation
|
|
119
|
+
* @httpMethod
|
|
120
|
+
*/
|
|
121
|
+
export declare function Put(path?: string | RegExp | any, ...args: any[]): RouteChainedDecorators;
|
|
122
|
+
/**
|
|
123
|
+
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
124
|
+
*
|
|
125
|
+
* This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
|
|
126
|
+
* For example, if you placed the following route at the top of all other route definitions, it would require that
|
|
127
|
+
* all routes from that point on would require authentication, and automatically load a user.
|
|
128
|
+
* Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
|
|
129
|
+
* to continue matching subsequent routes.
|
|
130
|
+
* @param path
|
|
131
|
+
* @param args
|
|
132
|
+
* @returns {Function}
|
|
133
|
+
* @decorator
|
|
134
|
+
* @operation
|
|
135
|
+
* @httpMethod
|
|
136
|
+
*/
|
|
137
|
+
export declare function Delete(path?: string | RegExp | any, ...args: any[]): RouteChainedDecorators;
|
|
138
|
+
/**
|
|
139
|
+
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
140
|
+
*
|
|
141
|
+
* This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
|
|
142
|
+
* For example, if you placed the following route at the top of all other route definitions, it would require that
|
|
143
|
+
* all routes from that point on would require authentication, and automatically load a user.
|
|
144
|
+
* Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
|
|
145
|
+
* to continue matching subsequent routes.
|
|
146
|
+
* @param path
|
|
147
|
+
* @param args
|
|
148
|
+
* @returns {Function}
|
|
149
|
+
* @decorator
|
|
150
|
+
* @operation
|
|
151
|
+
* @httpMethod
|
|
152
|
+
*/
|
|
153
|
+
export declare function Head(path?: string | RegExp | any, ...args: any[]): RouteChainedDecorators;
|
|
154
|
+
/**
|
|
155
|
+
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
156
|
+
*
|
|
157
|
+
* This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
|
|
158
|
+
* For example, if you placed the following route at the top of all other route definitions, it would require that
|
|
159
|
+
* all routes from that point on would require authentication, and automatically load a user.
|
|
160
|
+
* Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
|
|
161
|
+
* to continue matching subsequent routes.
|
|
162
|
+
* @param path
|
|
163
|
+
* @param args
|
|
164
|
+
* @returns {Function}
|
|
165
|
+
* @decorator
|
|
166
|
+
* @operation
|
|
167
|
+
* @httpMethod
|
|
168
|
+
*/
|
|
169
|
+
export declare function Patch(path?: string | RegExp | any, ...args: any[]): RouteChainedDecorators;
|
|
170
|
+
/**
|
|
171
|
+
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
172
|
+
*
|
|
173
|
+
* This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.
|
|
174
|
+
* For example, if you placed the following route at the top of all other route definitions, it would require that
|
|
175
|
+
* all routes from that point on would require authentication, and automatically load a user.
|
|
176
|
+
* Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()
|
|
177
|
+
* to continue matching subsequent routes.
|
|
178
|
+
* @param path
|
|
179
|
+
* @param args
|
|
180
|
+
* @returns {Function}
|
|
181
|
+
* @decorator
|
|
182
|
+
* @operation
|
|
183
|
+
* @httpMethod
|
|
184
|
+
*/
|
|
185
|
+
export declare function Options(path?: string | RegExp | any, ...args: any[]): RouteChainedDecorators;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Add security metadata on the decorated method.
|
|
3
|
+
*
|
|
4
|
+
* ## Examples
|
|
5
|
+
* ### On method
|
|
6
|
+
*
|
|
7
|
+
* ```typescript
|
|
8
|
+
* @Controller("/")
|
|
9
|
+
* class ModelCtrl {
|
|
10
|
+
* @Security("write:calendars")
|
|
11
|
+
* async method() {}
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @param name
|
|
16
|
+
* @param scopes
|
|
17
|
+
* @decorator
|
|
18
|
+
* @swagger
|
|
19
|
+
* @schema
|
|
20
|
+
* @classDecorator
|
|
21
|
+
* @operation
|
|
22
|
+
*/
|
|
23
|
+
export declare function Security(name: string, ...scopes: string[]): (...args: any[]) => any;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { Type } from "@tsed/core";
|
|
2
|
+
import { ReturnsChainedDecorators } from "./returns";
|
|
3
|
+
/**
|
|
4
|
+
* Add responses documentation for a specific status code.
|
|
5
|
+
*
|
|
6
|
+
* ## Usage
|
|
7
|
+
*
|
|
8
|
+
* Ts.ED v6 API introducing the chaining decorator concept.
|
|
9
|
+
* Now a decorator like Returns can be used with another decorators like Description.
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import {Returns} from "@tsed/schema";
|
|
13
|
+
*
|
|
14
|
+
* @Controller("/")
|
|
15
|
+
* class MyController {
|
|
16
|
+
* @Status(404, String).Description("Not Found")
|
|
17
|
+
* @Status(200, Model).Description("Success")
|
|
18
|
+
* async myMethod(): Promise<Model> {}
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* ::: tip
|
|
23
|
+
* TypeScript and your IDE will discover automatically the chained decorators. But for more details you can look on @@ReturnsChainedDecorators@@ interface, to know
|
|
24
|
+
* what chained decorators are available under Returns decorator.
|
|
25
|
+
* :::
|
|
26
|
+
*
|
|
27
|
+
* This example will produce this documentation in swagger:
|
|
28
|
+
*
|
|
29
|
+
* ```json
|
|
30
|
+
* {
|
|
31
|
+
* "responses": {
|
|
32
|
+
* "404": {
|
|
33
|
+
* "description": "Description",
|
|
34
|
+
* "schema": {"type": "string"}
|
|
35
|
+
* },
|
|
36
|
+
* "2OO": {
|
|
37
|
+
* "description": "Description",
|
|
38
|
+
* "schema": {"$ref": "..."}
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* ### Declaring a generic model
|
|
45
|
+
*
|
|
46
|
+
* Sometime, it might be useful to use generic models. TypeScript doesn't store the generic type in the metadata. This is why we need to
|
|
47
|
+
* declare explicitly the generic models with the decorators.
|
|
48
|
+
*
|
|
49
|
+
* One of the generic's usage, can be a paginated list. With Returns decorator it's now possible to declare generic type and generate the appropriate OpenSpec documentation.
|
|
50
|
+
*
|
|
51
|
+
* Starting with the pagination model, by using @@Generics@@ and @@CollectionOf@@:
|
|
52
|
+
*
|
|
53
|
+
* ```typescript
|
|
54
|
+
* @Generics("T")
|
|
55
|
+
* class Pagination<T> {
|
|
56
|
+
* @CollectionOf("T")
|
|
57
|
+
* data: T[];
|
|
58
|
+
*
|
|
59
|
+
* @Property()
|
|
60
|
+
* totalCount: number;
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* Now, we need a model to be used with the generic Pagination model:
|
|
65
|
+
*
|
|
66
|
+
* ```typescript
|
|
67
|
+
* class Product {
|
|
68
|
+
* @Property()
|
|
69
|
+
* id: string;
|
|
70
|
+
*
|
|
71
|
+
* @Property()
|
|
72
|
+
* title: string;
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* Finally, we can use our models on a method as following:
|
|
77
|
+
*
|
|
78
|
+
* ```typescript
|
|
79
|
+
* class Controller {
|
|
80
|
+
* @OperationPath("POST", "/")
|
|
81
|
+
* @Status(200, Pagination).Of(Product).Description("description")
|
|
82
|
+
* async method(): Promise<Pagination<Product> | null> {
|
|
83
|
+
* return null;
|
|
84
|
+
* }
|
|
85
|
+
* }
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* ### Declaring a nested generics models <Badge text="6+"/>
|
|
89
|
+
*
|
|
90
|
+
* It's also possible to declare a nested generics models in order to have this type `Pagination<Submission<Product>>`:
|
|
91
|
+
*
|
|
92
|
+
* ```typescript
|
|
93
|
+
* import {Generics, Property, Returns} from "@tsed/schema";
|
|
94
|
+
* import {Post} from "@tsed/common";
|
|
95
|
+
*
|
|
96
|
+
* class Controller {
|
|
97
|
+
* @Post("/")
|
|
98
|
+
* @Status(200, Pagination).Of(Submission).Nested(Product).Description("description")
|
|
99
|
+
* async method(): Promise<Pagination<Submission<Product>> | null> {
|
|
100
|
+
* return null;
|
|
101
|
+
* }
|
|
102
|
+
* }
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* And here is the Submission model:
|
|
106
|
+
*
|
|
107
|
+
* ```typescript
|
|
108
|
+
* import {Generics, Property} from "@tsed/schema";
|
|
109
|
+
*
|
|
110
|
+
* @Generics("T")
|
|
111
|
+
* class Submission<T> {
|
|
112
|
+
* @Property()
|
|
113
|
+
* _id: string;
|
|
114
|
+
* @Property("T")
|
|
115
|
+
* data: T;
|
|
116
|
+
* }
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* @param status
|
|
120
|
+
* @param model
|
|
121
|
+
* @decorator
|
|
122
|
+
* @swagger
|
|
123
|
+
* @schema
|
|
124
|
+
* @response
|
|
125
|
+
* @operation
|
|
126
|
+
*/
|
|
127
|
+
export declare function Status(status: string | number, model?: Type<any> | any): ReturnsChainedDecorators;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Add summary metadata on the decorated element.
|
|
3
|
+
*
|
|
4
|
+
* ## Examples
|
|
5
|
+
* ### On method
|
|
6
|
+
*
|
|
7
|
+
* ```typescript
|
|
8
|
+
* class Model {
|
|
9
|
+
* @Summary("summary")
|
|
10
|
+
* id: string;
|
|
11
|
+
* }
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @param summary
|
|
15
|
+
* @decorator
|
|
16
|
+
* @swagger
|
|
17
|
+
* @schema
|
|
18
|
+
* @operation
|
|
19
|
+
*/
|
|
20
|
+
export declare function Summary(summary: string): (...args: any[]) => any;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OpenSpecTag } from "@tsed/openspec";
|
|
2
|
+
/**
|
|
3
|
+
* Add tags metadata on the decorated element.
|
|
4
|
+
*
|
|
5
|
+
* ## Examples
|
|
6
|
+
* ### On method
|
|
7
|
+
*
|
|
8
|
+
* ```typescript
|
|
9
|
+
* @Controller("/")
|
|
10
|
+
* class MyController {
|
|
11
|
+
* @Tags("api")
|
|
12
|
+
* get() {}
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @param tags
|
|
17
|
+
* @decorator
|
|
18
|
+
* @swagger
|
|
19
|
+
* @schema
|
|
20
|
+
* @classDecorator
|
|
21
|
+
* @operation
|
|
22
|
+
*/
|
|
23
|
+
export declare function Tags(...tags: (string | OpenSpecTag)[]): (...args: any[]) => any;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DecoratorParameters, DecoratorTypes } from "@tsed/core";
|
|
2
|
+
import { JsonEntityStore } from "./JsonEntityStore";
|
|
3
|
+
/**
|
|
4
|
+
* @ignore
|
|
5
|
+
*/
|
|
6
|
+
export interface DecoratorActionHandler {
|
|
7
|
+
(ctx: Map<string, any>): void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class DecoratorContext<T = any> extends Map<string, any> {
|
|
13
|
+
readonly methods: string[];
|
|
14
|
+
protected decoratorType: DecoratorTypes;
|
|
15
|
+
protected entity: JsonEntityStore;
|
|
16
|
+
protected actions: DecoratorActionHandler[];
|
|
17
|
+
constructor(opts?: any);
|
|
18
|
+
addAction(cb: DecoratorActionHandler): this;
|
|
19
|
+
build(): T;
|
|
20
|
+
toObject(): any;
|
|
21
|
+
getMergedKey(key: string, defaultValue: any): any;
|
|
22
|
+
protected bind(args: DecoratorParameters, decorator: any): void;
|
|
23
|
+
protected onInit(args: DecoratorParameters, decorator: any): void;
|
|
24
|
+
protected onMapKey(key: string, value: any): void;
|
|
25
|
+
protected runActions(): this;
|
|
26
|
+
protected beforeInit(): void;
|
|
27
|
+
protected afterInit(): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ignore
|
|
3
|
+
*/
|
|
4
|
+
export declare type AliasType = string | number | symbol;
|
|
5
|
+
/**
|
|
6
|
+
* @ignore
|
|
7
|
+
*/
|
|
8
|
+
export declare type AliasMap = Map<AliasType, AliasType>;
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
export declare function mapAliasedProperties(value: any, alias: AliasMap): any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { JsonMethodStore } from "./JsonMethodStore";
|
|
2
|
+
import type { JsonPropertyStore } from "./JsonPropertyStore";
|
|
3
|
+
import { JsonEntityStore } from "./JsonEntityStore";
|
|
4
|
+
export declare class JsonClassStore extends JsonEntityStore {
|
|
5
|
+
/**
|
|
6
|
+
* List of children JsonEntityStore (properties or methods or params)
|
|
7
|
+
*/
|
|
8
|
+
readonly children: Map<string | number, JsonMethodStore | JsonPropertyStore>;
|
|
9
|
+
get path(): string;
|
|
10
|
+
set path(path: string);
|
|
11
|
+
protected build(): void;
|
|
12
|
+
}
|