@tsed/schema 6.87.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,95 @@
|
|
|
1
|
+
import { isObject } from "@tsed/core";
|
|
2
|
+
import { JsonEntityStore } from "../../domain/JsonEntityStore";
|
|
3
|
+
import { string } from "../../utils/from";
|
|
4
|
+
/**
|
|
5
|
+
* @ignore
|
|
6
|
+
*/
|
|
7
|
+
function isEnum(type) {
|
|
8
|
+
return isObject(type) && !("toJSON" in type);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Set the types of a Generic class.
|
|
12
|
+
*
|
|
13
|
+
* ## Example
|
|
14
|
+
*
|
|
15
|
+
* ```typescript
|
|
16
|
+
* class Product {
|
|
17
|
+
* @Property()
|
|
18
|
+
* label: string;
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* @Generics("T")
|
|
22
|
+
* class Paginated<T> {
|
|
23
|
+
* @CollectionOf("T")
|
|
24
|
+
* data: T[];
|
|
25
|
+
*
|
|
26
|
+
* @Property()
|
|
27
|
+
* totalCount: number;
|
|
28
|
+
* }
|
|
29
|
+
*
|
|
30
|
+
* class Payload {
|
|
31
|
+
* @GenericOf(Product)
|
|
32
|
+
* products: Paginated<Product>;
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* ## Example with nested generics
|
|
37
|
+
*
|
|
38
|
+
* ```typescript
|
|
39
|
+
* class Product {
|
|
40
|
+
* @Property()
|
|
41
|
+
* label: string;
|
|
42
|
+
* }
|
|
43
|
+
*
|
|
44
|
+
* @Generics("T")
|
|
45
|
+
* class Paginated<T> {
|
|
46
|
+
* @CollectionOf("T")
|
|
47
|
+
* data: T[];
|
|
48
|
+
*
|
|
49
|
+
* @Property()
|
|
50
|
+
* totalCount: number;
|
|
51
|
+
* }
|
|
52
|
+
*
|
|
53
|
+
* @Generics("D")
|
|
54
|
+
* class Submission<D> {
|
|
55
|
+
* @Property()
|
|
56
|
+
* _id: string;
|
|
57
|
+
*
|
|
58
|
+
* @Property("D")
|
|
59
|
+
* data: D;
|
|
60
|
+
* }
|
|
61
|
+
*
|
|
62
|
+
* class Payload {
|
|
63
|
+
* @GenericOf(Submissions).Nested(Product)
|
|
64
|
+
* submissions: Paginated<Submission<Product>>;
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @param {Type<any>[]} generics
|
|
69
|
+
* @decorator
|
|
70
|
+
* @validation
|
|
71
|
+
* @swagger
|
|
72
|
+
* @schema
|
|
73
|
+
* @input
|
|
74
|
+
* @generics
|
|
75
|
+
*/
|
|
76
|
+
export function GenericOf(...generics) {
|
|
77
|
+
const nestedGenerics = [
|
|
78
|
+
generics.map((type) => {
|
|
79
|
+
if (isEnum(type)) {
|
|
80
|
+
return string().enum(Object.values(type));
|
|
81
|
+
}
|
|
82
|
+
return type;
|
|
83
|
+
})
|
|
84
|
+
];
|
|
85
|
+
const decorator = (...args) => {
|
|
86
|
+
const store = JsonEntityStore.from(...args);
|
|
87
|
+
store.nestedGenerics = nestedGenerics;
|
|
88
|
+
};
|
|
89
|
+
decorator.Nested = (...generics) => {
|
|
90
|
+
nestedGenerics.push(generics);
|
|
91
|
+
return decorator;
|
|
92
|
+
};
|
|
93
|
+
return decorator;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=genericOf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genericOf.js","sourceRoot":"","sources":["../../../../src/decorators/generics/genericOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAO,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAGxC;;GAEG;AACH,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC;AAC/C,CAAC;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,MAAM,UAAU,SAAS,CAAC,GAAG,QAAwB;IACnD,MAAM,cAAc,GAAqB;QACvC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACpB,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE;gBAChB,OAAO,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;aAC3C;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;KACH,CAAC;IAEF,MAAM,SAAS,GAAG,CAAC,GAAG,IAAS,EAAE,EAAE;QACjC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QAC5C,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;IACxC,CAAC,CAAC;IAEF,SAAS,CAAC,MAAM,GAAG,CAAC,GAAG,QAAa,EAAE,EAAE;QACtC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE9B,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import {isObject, Type} from \"@tsed/core\";\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {string} from \"../../utils/from\";\nimport {GenericValue} from \"../../utils/generics\";\n\n/**\n * @ignore\n */\nfunction isEnum(type: any) {\n return isObject(type) && !(\"toJSON\" in type);\n}\n\nexport interface GenericOfChainedDecorators {\n (...args: any): any;\n\n /**\n * Declare a nested generic models\n * @param generics\n */\n Nested(...generics: GenericValue[]): this;\n}\n\n/**\n * Set the types of a Generic class.\n *\n * ## Example\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * class Payload {\n * @GenericOf(Product)\n * products: Paginated<Product>;\n * }\n * ```\n *\n * ## Example with nested generics\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * @Generics(\"D\")\n * class Submission<D> {\n * @Property()\n * _id: string;\n *\n * @Property(\"D\")\n * data: D;\n * }\n *\n * class Payload {\n * @GenericOf(Submissions).Nested(Product)\n * submissions: Paginated<Submission<Product>>;\n * }\n * ```\n *\n * @param {Type<any>[]} generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function GenericOf(...generics: GenericValue[]): GenericOfChainedDecorators {\n const nestedGenerics: GenericValue[][] = [\n generics.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n })\n ];\n\n const decorator = (...args: any) => {\n const store = JsonEntityStore.from(...args);\n store.nestedGenerics = nestedGenerics;\n };\n\n decorator.Nested = (...generics: any) => {\n nestedGenerics.push(generics);\n\n return decorator;\n };\n\n return decorator;\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JsonEntityStore } from "../../domain/JsonEntityStore";
|
|
2
|
+
/**
|
|
3
|
+
* Define generics list. This list is used by @@GenericOf@@ and the @@getJsonSchema@@ function to build the correct JsonSchema.
|
|
4
|
+
*
|
|
5
|
+
* See @@GenericOf@@ decorator for more details.
|
|
6
|
+
*
|
|
7
|
+
* @param generics
|
|
8
|
+
* @decorator
|
|
9
|
+
* @validation
|
|
10
|
+
* @swagger
|
|
11
|
+
* @schema
|
|
12
|
+
* @input
|
|
13
|
+
* @generics
|
|
14
|
+
*/
|
|
15
|
+
export function Generics(...generics) {
|
|
16
|
+
return (target) => {
|
|
17
|
+
const storedSchema = JsonEntityStore.from(target);
|
|
18
|
+
storedSchema.schema.genericLabels = generics;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=generics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generics.js","sourceRoot":"","sources":["../../../../src/decorators/generics/generics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAG,QAAkB;IAC5C,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAElD,YAAY,CAAC,MAAM,CAAC,aAAa,GAAG,QAAQ,CAAC;IAC/C,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {JsonEntityStore} from \"../../domain/JsonEntityStore\";\n\n/**\n * Define generics list. This list is used by @@GenericOf@@ and the @@getJsonSchema@@ function to build the correct JsonSchema.\n *\n * See @@GenericOf@@ decorator for more details.\n *\n * @param generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function Generics(...generics: string[]) {\n return (target: any) => {\n const storedSchema = JsonEntityStore.from(target);\n\n storedSchema.schema.genericLabels = generics;\n };\n}\n"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// class
|
|
2
|
+
export * from "./class/children";
|
|
3
|
+
// collections
|
|
4
|
+
export * from "./collections/collectionContains";
|
|
5
|
+
export * from "./collections/collectionOf";
|
|
6
|
+
export * from "./collections/maxItems";
|
|
7
|
+
export * from "./collections/minItems";
|
|
8
|
+
export * from "./collections/uniqueItems";
|
|
9
|
+
export * from "./collections/maxProperties";
|
|
10
|
+
export * from "./collections/minProperties";
|
|
11
|
+
// generics
|
|
12
|
+
export * from "./generics/generics";
|
|
13
|
+
export * from "./generics/genericOf";
|
|
14
|
+
// operations
|
|
15
|
+
export * from "./operations/deprecated";
|
|
16
|
+
export * from "./operations/consumes";
|
|
17
|
+
export * from "./operations/contentType";
|
|
18
|
+
export * from "./operations/in";
|
|
19
|
+
export * from "./operations/operationId";
|
|
20
|
+
export * from "./operations/operationPath";
|
|
21
|
+
export * from "./operations/path";
|
|
22
|
+
export * from "./operations/produces";
|
|
23
|
+
export * from "./operations/returns";
|
|
24
|
+
export * from "./operations/status";
|
|
25
|
+
export * from "./operations/header";
|
|
26
|
+
export * from "./operations/security";
|
|
27
|
+
export * from "./operations/tags";
|
|
28
|
+
export * from "./operations/summary";
|
|
29
|
+
export * from "./operations/partial";
|
|
30
|
+
export * from "./operations/redirect";
|
|
31
|
+
export * from "./operations/location";
|
|
32
|
+
export * from "./operations/route";
|
|
33
|
+
// common
|
|
34
|
+
export * from "./common/additionalProperties";
|
|
35
|
+
export * from "./common/allow";
|
|
36
|
+
export * from "./common/any";
|
|
37
|
+
export * from "./common/integer";
|
|
38
|
+
export * from "./common/const";
|
|
39
|
+
export * from "./common/default";
|
|
40
|
+
export * from "./common/description";
|
|
41
|
+
export * from "./common/example";
|
|
42
|
+
export * from "./common/examples";
|
|
43
|
+
export * from "./common/enum";
|
|
44
|
+
export * from "./common/exclusiveMaximum";
|
|
45
|
+
export * from "./common/exclusiveMinimum";
|
|
46
|
+
export * from "./common/format";
|
|
47
|
+
export * from "./common/forwardGroups";
|
|
48
|
+
export * from "./common/groups";
|
|
49
|
+
export * from "./common/pattern";
|
|
50
|
+
export * from "./common/ignore";
|
|
51
|
+
export * from "./common/maximum";
|
|
52
|
+
export * from "./common/maxLength";
|
|
53
|
+
export * from "./common/minimum";
|
|
54
|
+
export * from "./common/minLength";
|
|
55
|
+
export * from "./common/multipleOf";
|
|
56
|
+
export * from "./common/name";
|
|
57
|
+
export * from "./common/required";
|
|
58
|
+
export * from "./common/requiredGroups";
|
|
59
|
+
export * from "./common/property";
|
|
60
|
+
export * from "./common/hidden";
|
|
61
|
+
export * from "./common/title";
|
|
62
|
+
export * from "./common/schema";
|
|
63
|
+
export * from "./common/oneOf";
|
|
64
|
+
export * from "./common/allOf";
|
|
65
|
+
export * from "./common/anyOf";
|
|
66
|
+
export * from "./common/jsonEntityFn";
|
|
67
|
+
export * from "./common/optional";
|
|
68
|
+
export * from "./common/writeOnly";
|
|
69
|
+
export * from "./common/readOnly";
|
|
70
|
+
export * from "./common/customKey";
|
|
71
|
+
export * from "./common/nullable";
|
|
72
|
+
export * from "./config/jsonEntityComponent";
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,kBAAkB,CAAC;AAEjC,cAAc;AACd,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAE5C,WAAW;AACX,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AAErC,aAAa;AACb,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AAEnC,SAAS;AACT,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC","sourcesContent":["// class\nexport * from \"./class/children\";\n\n// collections\nexport * from \"./collections/collectionContains\";\nexport * from \"./collections/collectionOf\";\nexport * from \"./collections/maxItems\";\nexport * from \"./collections/minItems\";\nexport * from \"./collections/uniqueItems\";\nexport * from \"./collections/maxProperties\";\nexport * from \"./collections/minProperties\";\n\n// generics\nexport * from \"./generics/generics\";\nexport * from \"./generics/genericOf\";\n\n// operations\nexport * from \"./operations/deprecated\";\nexport * from \"./operations/consumes\";\nexport * from \"./operations/contentType\";\nexport * from \"./operations/in\";\nexport * from \"./operations/operationId\";\nexport * from \"./operations/operationPath\";\nexport * from \"./operations/path\";\nexport * from \"./operations/produces\";\nexport * from \"./operations/returns\";\nexport * from \"./operations/status\";\nexport * from \"./operations/header\";\nexport * from \"./operations/security\";\nexport * from \"./operations/tags\";\nexport * from \"./operations/summary\";\nexport * from \"./operations/partial\";\nexport * from \"./operations/redirect\";\nexport * from \"./operations/location\";\nexport * from \"./operations/route\";\n\n// common\nexport * from \"./common/additionalProperties\";\nexport * from \"./common/allow\";\nexport * from \"./common/any\";\nexport * from \"./common/integer\";\nexport * from \"./common/const\";\nexport * from \"./common/default\";\nexport * from \"./common/description\";\nexport * from \"./common/example\";\nexport * from \"./common/examples\";\nexport * from \"./common/enum\";\nexport * from \"./common/exclusiveMaximum\";\nexport * from \"./common/exclusiveMinimum\";\nexport * from \"./common/format\";\nexport * from \"./common/forwardGroups\";\nexport * from \"./common/groups\";\nexport * from \"./common/pattern\";\nexport * from \"./common/ignore\";\nexport * from \"./common/maximum\";\nexport * from \"./common/maxLength\";\nexport * from \"./common/minimum\";\nexport * from \"./common/minLength\";\nexport * from \"./common/multipleOf\";\nexport * from \"./common/name\";\nexport * from \"./common/required\";\nexport * from \"./common/requiredGroups\";\nexport * from \"./common/property\";\nexport * from \"./common/hidden\";\nexport * from \"./common/title\";\nexport * from \"./common/schema\";\nexport * from \"./common/oneOf\";\nexport * from \"./common/allOf\";\nexport * from \"./common/anyOf\";\nexport * from \"./common/jsonEntityFn\";\nexport * from \"./common/optional\";\nexport * from \"./common/writeOnly\";\nexport * from \"./common/readOnly\";\nexport * from \"./common/customKey\";\nexport * from \"./common/nullable\";\nexport * from \"./config/jsonEntityComponent\";\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from "@tsed/core";
|
|
2
|
+
import { JsonEntityFn } from "../common/jsonEntityFn";
|
|
3
|
+
/**
|
|
4
|
+
* Add consumes metadata on the decorated element.
|
|
5
|
+
*
|
|
6
|
+
* ## Examples
|
|
7
|
+
*
|
|
8
|
+
* ```typescript
|
|
9
|
+
* class Model {
|
|
10
|
+
* @Consumes("application/x-www-form-urlencoded")
|
|
11
|
+
* id: string;
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @param consumes
|
|
16
|
+
* @decorator
|
|
17
|
+
* @swagger
|
|
18
|
+
* @classDecorator
|
|
19
|
+
* @operation
|
|
20
|
+
*/
|
|
21
|
+
export function Consumes(...consumes) {
|
|
22
|
+
return JsonEntityFn((store, args) => {
|
|
23
|
+
switch (store.decoratorType) {
|
|
24
|
+
case DecoratorTypes.METHOD:
|
|
25
|
+
store.operation.consumes(consumes);
|
|
26
|
+
break;
|
|
27
|
+
case DecoratorTypes.CLASS:
|
|
28
|
+
decorateMethodsOf(args[0], Consumes(...consumes));
|
|
29
|
+
break;
|
|
30
|
+
default:
|
|
31
|
+
throw new UnsupportedDecoratorType(Consumes, args);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=consumes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumes.js","sourceRoot":"","sources":["../../../../src/decorators/operations/consumes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACvF,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAG,QAAkB;IAC5C,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,cAAc,CAAC,MAAM;gBACxB,KAAK,CAAC,SAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,cAAc,CAAC,KAAK;gBACvB,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;gBAClD,MAAM;YAER;gBACE,MAAM,IAAI,wBAAwB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACtD;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Add consumes metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n * class Model {\n * @Consumes(\"application/x-www-form-urlencoded\")\n * id: string;\n * }\n * ```\n *\n * @param consumes\n * @decorator\n * @swagger\n * @classDecorator\n * @operation\n */\nexport function Consumes(...consumes: string[]) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation!.consumes(consumes);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Consumes(...consumes));\n break;\n\n default:\n throw new UnsupportedDecoratorType(Consumes, args);\n }\n });\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Returns } from "./returns";
|
|
2
|
+
/**
|
|
3
|
+
* Sets the Content-Type HTTP header to the MIME type as determined by mime.lookup() for the specified type.
|
|
4
|
+
* If type contains the “/” character, then it sets the `Content-Type` to type.
|
|
5
|
+
*
|
|
6
|
+
* ```typescript
|
|
7
|
+
* @ContentType('.html'); // => 'text/html'
|
|
8
|
+
* @ContentType('html'); // => 'text/html'
|
|
9
|
+
* @ContentType('json'); // => 'application/json'
|
|
10
|
+
* @ContentType('application/json'); // => 'application/json'
|
|
11
|
+
* @ContentType('png'); // => image/png
|
|
12
|
+
* private myMethod() {}
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @param type
|
|
16
|
+
* @decorator
|
|
17
|
+
* @operation
|
|
18
|
+
* @response
|
|
19
|
+
* @headers
|
|
20
|
+
*/
|
|
21
|
+
export function ContentType(type) {
|
|
22
|
+
return Returns().ContentType(type);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=contentType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentType.js","sourceRoot":"","sources":["../../../../src/decorators/operations/contentType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,OAAO,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC","sourcesContent":["import {Returns} from \"./returns\";\n\n/**\n * Sets the Content-Type HTTP header to the MIME type as determined by mime.lookup() for the specified type.\n * If type contains the “/” character, then it sets the `Content-Type` to type.\n *\n * ```typescript\n * @ContentType('.html'); // => 'text/html'\n * @ContentType('html'); // => 'text/html'\n * @ContentType('json'); // => 'application/json'\n * @ContentType('application/json'); // => 'application/json'\n * @ContentType('png'); // => image/png\n * private myMethod() {}\n * ```\n *\n * @param type\n * @decorator\n * @operation\n * @response\n * @headers\n */\nexport function ContentType(type: string) {\n return Returns().ContentType(type);\n}\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from "@tsed/core";
|
|
2
|
+
import { JsonEntityFn } from "../common/jsonEntityFn";
|
|
3
|
+
/**
|
|
4
|
+
* Add deprecated metadata on the decorated element.
|
|
5
|
+
*
|
|
6
|
+
* ## Examples
|
|
7
|
+
*
|
|
8
|
+
* ```typescript
|
|
9
|
+
*
|
|
10
|
+
* @Deprecated()
|
|
11
|
+
* class MyCtrl {
|
|
12
|
+
* @Deprecated()
|
|
13
|
+
* @Get("/")
|
|
14
|
+
* method(){
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @param deprecated
|
|
20
|
+
* @decorator
|
|
21
|
+
* @swagger
|
|
22
|
+
* @schema
|
|
23
|
+
* @operation
|
|
24
|
+
*/
|
|
25
|
+
export function Deprecated(deprecated = true) {
|
|
26
|
+
return JsonEntityFn((store, args) => {
|
|
27
|
+
switch (store.decoratorType) {
|
|
28
|
+
case DecoratorTypes.METHOD:
|
|
29
|
+
store.operation.deprecated(deprecated);
|
|
30
|
+
break;
|
|
31
|
+
case DecoratorTypes.CLASS:
|
|
32
|
+
decorateMethodsOf(args[0], Deprecated(deprecated));
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
throw new UnsupportedDecoratorType(Deprecated, args);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=deprecated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../../../src/decorators/operations/deprecated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACvF,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,UAAU,CAAC,aAAsB,IAAI;IACnD,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,cAAc,CAAC,MAAM;gBACxB,KAAK,CAAC,SAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;gBACxC,MAAM;YACR,KAAK,cAAc,CAAC,KAAK;gBACvB,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;gBACnD,MAAM;YAER;gBACE,MAAM,IAAI,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;SACxD;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Add deprecated metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n *\n * @Deprecated()\n * class MyCtrl {\n * @Deprecated()\n * @Get(\"/\")\n * method(){\n * }\n * }\n * ```\n *\n * @param deprecated\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function Deprecated(deprecated: boolean = true) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation!.deprecated(deprecated);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Deprecated(deprecated));\n break;\n\n default:\n throw new UnsupportedDecoratorType(Deprecated, args);\n }\n });\n}\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Returns } from "./returns";
|
|
2
|
+
/**
|
|
3
|
+
* Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object as the parameter.
|
|
4
|
+
*
|
|
5
|
+
* ```typescript
|
|
6
|
+
* @Header('Content-Type', 'text/plain');
|
|
7
|
+
* private myMethod() {}
|
|
8
|
+
*
|
|
9
|
+
* @Status(204)
|
|
10
|
+
* @Header({
|
|
11
|
+
* "Content-Type": "text/plain",
|
|
12
|
+
* "Content-Length": 123,
|
|
13
|
+
* "ETag": {
|
|
14
|
+
* "value": "12345",
|
|
15
|
+
* "description": "header description"
|
|
16
|
+
* }
|
|
17
|
+
* })
|
|
18
|
+
* private myMethod() {}
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* This example will produce the swagger responses object:
|
|
22
|
+
*
|
|
23
|
+
* ```json
|
|
24
|
+
* {
|
|
25
|
+
* "responses": {
|
|
26
|
+
* "204": {
|
|
27
|
+
* "description": "Description",
|
|
28
|
+
* "headers": {
|
|
29
|
+
* "Content-Type": {
|
|
30
|
+
* "type": "string"
|
|
31
|
+
* },
|
|
32
|
+
* "Content-Length": {
|
|
33
|
+
* "type": "number"
|
|
34
|
+
* },
|
|
35
|
+
* "ETag": {
|
|
36
|
+
* "type": "string",
|
|
37
|
+
* "description": "header description"
|
|
38
|
+
* }
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @decorator
|
|
46
|
+
* @operation
|
|
47
|
+
* @response
|
|
48
|
+
*/
|
|
49
|
+
export function Header(headers, value) {
|
|
50
|
+
if (value !== undefined) {
|
|
51
|
+
headers = { [headers]: value };
|
|
52
|
+
}
|
|
53
|
+
return Returns().Headers(headers);
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/decorators/operations/header.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,UAAU,MAAM,CAAC,OAAsC,EAAE,KAAoC;IACjG,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,GAAG,EAAC,CAAC,OAAiB,CAAC,EAAE,KAAK,EAAC,CAAC;KACxC;IAED,OAAO,OAAO,EAAE,CAAC,OAAO,CAAC,OAAsB,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import {JsonHeader, JsonHeaders} from \"../../interfaces/JsonOpenSpec\";\nimport {Returns} from \"./returns\";\n\n/**\n * Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object as the parameter.\n *\n * ```typescript\n * @Header('Content-Type', 'text/plain');\n * private myMethod() {}\n *\n * @Status(204)\n * @Header({\n * \"Content-Type\": \"text/plain\",\n * \"Content-Length\": 123,\n * \"ETag\": {\n * \"value\": \"12345\",\n * \"description\": \"header description\"\n * }\n * })\n * private myMethod() {}\n * ```\n *\n * This example will produce the swagger responses object:\n *\n * ```json\n * {\n * \"responses\": {\n * \"204\": {\n * \"description\": \"Description\",\n * \"headers\": {\n * \"Content-Type\": {\n * \"type\": \"string\"\n * },\n * \"Content-Length\": {\n * \"type\": \"number\"\n * },\n * \"ETag\": {\n * \"type\": \"string\",\n * \"description\": \"header description\"\n * }\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @operation\n * @response\n */\nexport function Header(headers: string | number | JsonHeaders, value?: string | number | JsonHeader): Function {\n if (value !== undefined) {\n headers = {[headers as string]: value};\n }\n\n return Returns().Headers(headers as JsonHeaders);\n}\n"]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from "@tsed/core";
|
|
2
|
+
import { JsonEntityStore, JsonParameter, JsonSchema } from "../../domain";
|
|
3
|
+
/**
|
|
4
|
+
* Add a input parameter.
|
|
5
|
+
*
|
|
6
|
+
* ::: warning
|
|
7
|
+
* Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.
|
|
8
|
+
* But you can use this decorator on Method, to add extra in parameters like Authorization header.
|
|
9
|
+
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* @Controller("/")
|
|
12
|
+
* class MyController {
|
|
13
|
+
* @Get("/")
|
|
14
|
+
* @In("header").Type(String).Name("Authorization").Required()
|
|
15
|
+
* method() {
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
* :::
|
|
20
|
+
*
|
|
21
|
+
* @param inType
|
|
22
|
+
* @decorator
|
|
23
|
+
* @swagger
|
|
24
|
+
* @schema
|
|
25
|
+
* @input
|
|
26
|
+
* @operation
|
|
27
|
+
*/
|
|
28
|
+
export function In(inType) {
|
|
29
|
+
const jsonParameter = new JsonParameter();
|
|
30
|
+
const schema = {};
|
|
31
|
+
const decorator = (target, propertyKey, index) => {
|
|
32
|
+
const store = JsonEntityStore.from(target, propertyKey, index);
|
|
33
|
+
switch (store.decoratorType) {
|
|
34
|
+
case DecoratorTypes.PARAM:
|
|
35
|
+
store.parameter.in(inType);
|
|
36
|
+
break;
|
|
37
|
+
case DecoratorTypes.METHOD:
|
|
38
|
+
jsonParameter.in(inType);
|
|
39
|
+
store.operation.addParameter(-1, jsonParameter);
|
|
40
|
+
jsonParameter.schema(JsonSchema.from(schema));
|
|
41
|
+
break;
|
|
42
|
+
case DecoratorTypes.CLASS:
|
|
43
|
+
decorateMethodsOf(target, decorator);
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
throw new UnsupportedDecoratorType(In, [target, propertyKey, index]);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
decorator.Type = (type) => {
|
|
50
|
+
schema.type = type;
|
|
51
|
+
return decorator;
|
|
52
|
+
};
|
|
53
|
+
decorator.Name = (name) => {
|
|
54
|
+
jsonParameter.name(name);
|
|
55
|
+
return decorator;
|
|
56
|
+
};
|
|
57
|
+
decorator.Description = (description) => {
|
|
58
|
+
jsonParameter.description(description);
|
|
59
|
+
return decorator;
|
|
60
|
+
};
|
|
61
|
+
decorator.Required = (required = true) => {
|
|
62
|
+
jsonParameter.required(required);
|
|
63
|
+
return decorator;
|
|
64
|
+
};
|
|
65
|
+
decorator.Pattern = (pattern) => {
|
|
66
|
+
return decorator.Schema({ pattern: pattern.toString() });
|
|
67
|
+
};
|
|
68
|
+
decorator.Schema = (_schema) => {
|
|
69
|
+
Object.assign(schema, _schema);
|
|
70
|
+
return decorator;
|
|
71
|
+
};
|
|
72
|
+
return decorator;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=in.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"in.js","sourceRoot":"","sources":["../../../../src/decorators/operations/in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAQ,wBAAwB,EAAC,MAAM,YAAY,CAAC;AAC7F,OAAO,EAAC,eAAe,EAAmB,aAAa,EAAsB,UAAU,EAAmB,MAAM,cAAc,CAAC;AA+C/H;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,EAAE,CAAC,MAAmC;IACpD,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;IAC1C,MAAM,MAAM,GAAQ,EAAE,CAAC;IAEvB,MAAM,SAAS,GAAG,CAAC,MAAW,EAAE,WAA6B,EAAE,KAAmC,EAAE,EAAE;QACpG,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QAE/D,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,cAAc,CAAC,KAAK;gBACtB,KAA4B,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;gBACnD,MAAM;YACR,KAAK,cAAc,CAAC,MAAM;gBACxB,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;gBACxB,KAAyB,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;gBAErE,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC9C,MAAM;YAER,KAAK,cAAc,CAAC,KAAK;gBACvB,iBAAiB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;gBACrC,MAAM;YAER;gBACE,MAAM,IAAI,wBAAwB,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;SACxE;IACH,CAAC,CAAC;IAEF,SAAS,CAAC,IAAI,GAAG,CAAC,IAAe,EAAE,EAAE;QACnC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;QAEnB,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,SAAS,CAAC,IAAI,GAAG,CAAC,IAAY,EAAE,EAAE;QAChC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEzB,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,SAAS,CAAC,WAAW,GAAG,CAAC,WAAmB,EAAE,EAAE;QAC9C,aAAa,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAEvC,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,SAAS,CAAC,QAAQ,GAAG,CAAC,WAAoB,IAAI,EAAE,EAAE;QAChD,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEjC,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,SAAS,CAAC,OAAO,GAAG,CAAC,OAAwB,EAAE,EAAE;QAC/C,OAAO,SAAS,CAAC,MAAM,CAAC,EAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAC,CAAC,CAAC;IACzD,CAAC,CAAC;IAEF,SAAS,CAAC,MAAM,GAAG,CAAC,OAAY,EAAE,EAAE;QAClC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAE/B,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import {decorateMethodsOf, DecoratorTypes, Type, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityStore, JsonMethodStore, JsonParameter, JsonParameterStore, JsonSchema, JsonSchemaObject} from \"../../domain\";\nimport {JsonParameterTypes} from \"../../domain/JsonParameterTypes\";\n\nexport interface InChainedDecorators {\n <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;\n\n (target: Object, propertyKey: string | symbol, parameterIndex: number): void;\n\n (target: Function): void;\n\n /**\n * Type of this in parameter\n * @param type\n */\n Type(type: Type<any>): this;\n\n /**\n *\n * @param name\n */\n Name(name: string): this;\n\n /**\n *\n * @param description\n */\n Description(description: string): this;\n\n /**\n *\n * @param required\n */\n Required(required?: boolean): this;\n\n /**\n * Add pattern constraint. Only available for OPENAPI.\n * @param pattern\n */\n Pattern(pattern: string | RegExp): this;\n\n /**\n * Add custom schema.\n * @param schema\n */\n Schema(schema: Partial<JsonSchemaObject>): this;\n}\n\n/**\n * Add a input parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Get(\"/\")\n * @In(\"header\").Type(String).Name(\"Authorization\").Required()\n * method() {\n * }\n * }\n * ```\n * :::\n *\n * @param inType\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n */\nexport function In(inType: JsonParameterTypes | string): InChainedDecorators {\n const jsonParameter = new JsonParameter();\n const schema: any = {};\n\n const decorator = (target: any, propertyKey?: string | symbol, index?: PropertyDescriptor | number) => {\n const store = JsonEntityStore.from(target, propertyKey, index);\n\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n (store as JsonParameterStore).parameter.in(inType);\n break;\n case DecoratorTypes.METHOD:\n jsonParameter.in(inType);\n (store as JsonMethodStore).operation.addParameter(-1, jsonParameter);\n\n jsonParameter.schema(JsonSchema.from(schema));\n break;\n\n case DecoratorTypes.CLASS:\n decorateMethodsOf(target, decorator);\n break;\n\n default:\n throw new UnsupportedDecoratorType(In, [target, propertyKey, index]);\n }\n };\n\n decorator.Type = (type: Type<any>) => {\n schema.type = type;\n\n return decorator;\n };\n\n decorator.Name = (name: string) => {\n jsonParameter.name(name);\n\n return decorator;\n };\n\n decorator.Description = (description: string) => {\n jsonParameter.description(description);\n\n return decorator;\n };\n\n decorator.Required = (required: boolean = true) => {\n jsonParameter.required(required);\n\n return decorator;\n };\n\n decorator.Pattern = (pattern: string | RegExp) => {\n return decorator.Schema({pattern: pattern.toString()});\n };\n\n decorator.Schema = (_schema: any) => {\n Object.assign(schema, _schema);\n\n return decorator;\n };\n\n return decorator;\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Returns } from "./returns";
|
|
2
|
+
/**
|
|
3
|
+
* Sets the response Location HTTP header to the specified path parameter.
|
|
4
|
+
*
|
|
5
|
+
* ```typescript
|
|
6
|
+
* @Location('/foo/bar', {description: 'Location to the next step'})
|
|
7
|
+
* @Location('http://example.com')
|
|
8
|
+
* @Location('back')
|
|
9
|
+
* private myMethod() {
|
|
10
|
+
*
|
|
11
|
+
* }
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* A path value of “back” has a special meaning, it refers to the URL specified in the `Referer` header of the request. If the `Referer` header was not specified, it refers to “/”.
|
|
15
|
+
*
|
|
16
|
+
* @param location
|
|
17
|
+
* @param meta
|
|
18
|
+
* @returns {Function}
|
|
19
|
+
* @decorator
|
|
20
|
+
* @operation
|
|
21
|
+
*/
|
|
22
|
+
export function Location(location, meta) {
|
|
23
|
+
return Returns().Location(location, meta);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=location.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location.js","sourceRoot":"","sources":["../../../../src/decorators/operations/location.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAgB,EAAE,IAAiB;IAC1D,OAAO,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["import {JsonHeader} from \"../../interfaces/JsonOpenSpec\";\nimport {Returns} from \"./returns\";\n\n/**\n * Sets the response Location HTTP header to the specified path parameter.\n *\n * ```typescript\n * @Location('/foo/bar', {description: 'Location to the next step'})\n * @Location('http://example.com')\n * @Location('back')\n * private myMethod() {\n *\n * }\n * ```\n *\n * A path value of “back” has a special meaning, it refers to the URL specified in the `Referer` header of the request. If the `Referer` header was not specified, it refers to “/”.\n *\n * @param location\n * @param meta\n * @returns {Function}\n * @decorator\n * @operation\n */\nexport function Location(location: string, meta?: JsonHeader) {\n return Returns().Location(location, meta);\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DecoratorTypes, UnsupportedDecoratorType } from "@tsed/core";
|
|
2
|
+
import { JsonEntityFn } from "../common/jsonEntityFn";
|
|
3
|
+
/**
|
|
4
|
+
* Set a swagger operationId explicitly.
|
|
5
|
+
*
|
|
6
|
+
* @param operationId
|
|
7
|
+
* @decorator
|
|
8
|
+
* @swagger
|
|
9
|
+
* @schema
|
|
10
|
+
* @operation
|
|
11
|
+
*/
|
|
12
|
+
export function OperationId(operationId) {
|
|
13
|
+
return JsonEntityFn((store, args) => {
|
|
14
|
+
if (store.decoratorType !== DecoratorTypes.METHOD) {
|
|
15
|
+
throw new UnsupportedDecoratorType(OperationId, args);
|
|
16
|
+
}
|
|
17
|
+
store.operation.operationId(operationId);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=operationId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationId.js","sourceRoot":"","sources":["../../../../src/decorators/operations/operationId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC7C,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,cAAc,CAAC,MAAM,EAAE;YACjD,MAAM,IAAI,wBAAwB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;SACvD;QAED,KAAK,CAAC,SAAU,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Set a swagger operationId explicitly.\n *\n * @param operationId\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationId(operationId: string) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationId, args);\n }\n\n store.operation!.operationId(operationId);\n });\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DecoratorTypes, UnsupportedDecoratorType } from "@tsed/core";
|
|
2
|
+
import { JsonEntityFn } from "../common/jsonEntityFn";
|
|
3
|
+
/**
|
|
4
|
+
* Declare new Operation with his path and http method.
|
|
5
|
+
*
|
|
6
|
+
* ::: warning
|
|
7
|
+
* Don't use decorator with Ts.ED application.
|
|
8
|
+
*
|
|
9
|
+
* Use theses decorators instead:
|
|
10
|
+
*
|
|
11
|
+
* <ApiList query="status.includes('decorator') && status.includes('httpMethod')" />
|
|
12
|
+
*
|
|
13
|
+
* :::
|
|
14
|
+
*
|
|
15
|
+
* @param method
|
|
16
|
+
* @param path
|
|
17
|
+
* @decorator
|
|
18
|
+
* @swagger
|
|
19
|
+
* @schema
|
|
20
|
+
* @operation
|
|
21
|
+
*/
|
|
22
|
+
export function OperationPath(method, path = "/") {
|
|
23
|
+
return JsonEntityFn((store, args) => {
|
|
24
|
+
if (store.decoratorType !== DecoratorTypes.METHOD) {
|
|
25
|
+
throw new UnsupportedDecoratorType(OperationPath, args);
|
|
26
|
+
}
|
|
27
|
+
store.operation.addOperationPath(method.toUpperCase(), path);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=operationPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationPath.js","sourceRoot":"","sources":["../../../../src/decorators/operations/operationPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAGpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,aAAa,CAAC,MAAiC,EAAE,OAAwB,GAAG;IAC1F,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,cAAc,CAAC,MAAM,EAAE;YACjD,MAAM,IAAI,wBAAwB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;SACzD;QAED,KAAK,CAAC,SAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\nimport {OperationMethods} from \"../../constants/httpMethods\";\n\n/**\n * Declare new Operation with his path and http method.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application.\n *\n * Use theses decorators instead:\n *\n * <ApiList query=\"status.includes('decorator') && status.includes('httpMethod')\" />\n *\n * :::\n *\n * @param method\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationPath(method: OperationMethods | string, path: string | RegExp = \"/\") {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationPath, args);\n }\n\n store.operation!.addOperationPath(method.toUpperCase(), path);\n });\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Groups } from "../common/groups";
|
|
2
|
+
/**
|
|
3
|
+
* Apply Partial group strategy on the input model
|
|
4
|
+
*
|
|
5
|
+
* @decorator
|
|
6
|
+
* @validation
|
|
7
|
+
* @swagger
|
|
8
|
+
* @schema
|
|
9
|
+
* @input
|
|
10
|
+
*/
|
|
11
|
+
export function Partial() {
|
|
12
|
+
return Groups("partial");
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=partial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial.js","sourceRoot":"","sources":["../../../../src/decorators/operations/partial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAExC;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO;IACrB,OAAO,MAAM,CAAC,SAAS,CAAQ,CAAC;AAClC,CAAC","sourcesContent":["import {Groups} from \"../common/groups\";\n\n/**\n * Apply Partial group strategy on the input model\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Partial(): ParameterDecorator {\n return Groups(\"partial\") as any;\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DecoratorTypes, UnsupportedDecoratorType } from "@tsed/core";
|
|
2
|
+
import { JsonEntityFn } from "../common/jsonEntityFn";
|
|
3
|
+
/**
|
|
4
|
+
* Set class path to expose all endpoints
|
|
5
|
+
*
|
|
6
|
+
* ::: warning
|
|
7
|
+
* Don't use this decorator to change the path if you develop your application with Ts.ED.
|
|
8
|
+
* :::
|
|
9
|
+
*
|
|
10
|
+
* @param path
|
|
11
|
+
* @decorator
|
|
12
|
+
* @swagger
|
|
13
|
+
* @schema
|
|
14
|
+
* @classDecorator
|
|
15
|
+
* @operation
|
|
16
|
+
*/
|
|
17
|
+
export function Path(path) {
|
|
18
|
+
return JsonEntityFn((store, args) => {
|
|
19
|
+
if (store.decoratorType !== DecoratorTypes.CLASS) {
|
|
20
|
+
throw new UnsupportedDecoratorType(Path, args);
|
|
21
|
+
}
|
|
22
|
+
store.path = path;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../../src/decorators/operations/path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,YAAY,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,IAAI,CAAC,IAAY;IAC/B,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,cAAc,CAAC,KAAK,EAAE;YAChD,MAAM,IAAI,wBAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SAChD;QAED,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Set class path to expose all endpoints\n *\n * ::: warning\n * Don't use this decorator to change the path if you develop your application with Ts.ED.\n * :::\n *\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Path(path: string) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.CLASS) {\n throw new UnsupportedDecoratorType(Path, args);\n }\n\n store.path = path;\n });\n}\n"]}
|