@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,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Header = void 0;
|
|
4
|
+
const returns_1 = require("./returns");
|
|
5
|
+
/**
|
|
6
|
+
* Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object as the parameter.
|
|
7
|
+
*
|
|
8
|
+
* ```typescript
|
|
9
|
+
* @Header('Content-Type', 'text/plain');
|
|
10
|
+
* private myMethod() {}
|
|
11
|
+
*
|
|
12
|
+
* @Status(204)
|
|
13
|
+
* @Header({
|
|
14
|
+
* "Content-Type": "text/plain",
|
|
15
|
+
* "Content-Length": 123,
|
|
16
|
+
* "ETag": {
|
|
17
|
+
* "value": "12345",
|
|
18
|
+
* "description": "header description"
|
|
19
|
+
* }
|
|
20
|
+
* })
|
|
21
|
+
* private myMethod() {}
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* This example will produce the swagger responses object:
|
|
25
|
+
*
|
|
26
|
+
* ```json
|
|
27
|
+
* {
|
|
28
|
+
* "responses": {
|
|
29
|
+
* "204": {
|
|
30
|
+
* "description": "Description",
|
|
31
|
+
* "headers": {
|
|
32
|
+
* "Content-Type": {
|
|
33
|
+
* "type": "string"
|
|
34
|
+
* },
|
|
35
|
+
* "Content-Length": {
|
|
36
|
+
* "type": "number"
|
|
37
|
+
* },
|
|
38
|
+
* "ETag": {
|
|
39
|
+
* "type": "string",
|
|
40
|
+
* "description": "header description"
|
|
41
|
+
* }
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @decorator
|
|
49
|
+
* @operation
|
|
50
|
+
* @response
|
|
51
|
+
*/
|
|
52
|
+
function Header(headers, value) {
|
|
53
|
+
if (value !== undefined) {
|
|
54
|
+
headers = { [headers]: value };
|
|
55
|
+
}
|
|
56
|
+
return (0, returns_1.Returns)().Headers(headers);
|
|
57
|
+
}
|
|
58
|
+
exports.Header = Header;
|
|
59
|
+
//# sourceMappingURL=header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/decorators/operations/header.ts"],"names":[],"mappings":";;;AACA,uCAAkC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,SAAgB,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,IAAA,iBAAO,GAAE,CAAC,OAAO,CAAC,OAAsB,CAAC,CAAC;AACnD,CAAC;AAND,wBAMC","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.In = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const domain_1 = require("../../domain");
|
|
6
|
+
/**
|
|
7
|
+
* Add a input parameter.
|
|
8
|
+
*
|
|
9
|
+
* ::: warning
|
|
10
|
+
* Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.
|
|
11
|
+
* But you can use this decorator on Method, to add extra in parameters like Authorization header.
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* @Controller("/")
|
|
15
|
+
* class MyController {
|
|
16
|
+
* @Get("/")
|
|
17
|
+
* @In("header").Type(String).Name("Authorization").Required()
|
|
18
|
+
* method() {
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
* :::
|
|
23
|
+
*
|
|
24
|
+
* @param inType
|
|
25
|
+
* @decorator
|
|
26
|
+
* @swagger
|
|
27
|
+
* @schema
|
|
28
|
+
* @input
|
|
29
|
+
* @operation
|
|
30
|
+
*/
|
|
31
|
+
function In(inType) {
|
|
32
|
+
const jsonParameter = new domain_1.JsonParameter();
|
|
33
|
+
const schema = {};
|
|
34
|
+
const decorator = (target, propertyKey, index) => {
|
|
35
|
+
const store = domain_1.JsonEntityStore.from(target, propertyKey, index);
|
|
36
|
+
switch (store.decoratorType) {
|
|
37
|
+
case core_1.DecoratorTypes.PARAM:
|
|
38
|
+
store.parameter.in(inType);
|
|
39
|
+
break;
|
|
40
|
+
case core_1.DecoratorTypes.METHOD:
|
|
41
|
+
jsonParameter.in(inType);
|
|
42
|
+
store.operation.addParameter(-1, jsonParameter);
|
|
43
|
+
jsonParameter.schema(domain_1.JsonSchema.from(schema));
|
|
44
|
+
break;
|
|
45
|
+
case core_1.DecoratorTypes.CLASS:
|
|
46
|
+
(0, core_1.decorateMethodsOf)(target, decorator);
|
|
47
|
+
break;
|
|
48
|
+
default:
|
|
49
|
+
throw new core_1.UnsupportedDecoratorType(In, [target, propertyKey, index]);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
decorator.Type = (type) => {
|
|
53
|
+
schema.type = type;
|
|
54
|
+
return decorator;
|
|
55
|
+
};
|
|
56
|
+
decorator.Name = (name) => {
|
|
57
|
+
jsonParameter.name(name);
|
|
58
|
+
return decorator;
|
|
59
|
+
};
|
|
60
|
+
decorator.Description = (description) => {
|
|
61
|
+
jsonParameter.description(description);
|
|
62
|
+
return decorator;
|
|
63
|
+
};
|
|
64
|
+
decorator.Required = (required = true) => {
|
|
65
|
+
jsonParameter.required(required);
|
|
66
|
+
return decorator;
|
|
67
|
+
};
|
|
68
|
+
decorator.Pattern = (pattern) => {
|
|
69
|
+
return decorator.Schema({ pattern: pattern.toString() });
|
|
70
|
+
};
|
|
71
|
+
decorator.Schema = (_schema) => {
|
|
72
|
+
Object.assign(schema, _schema);
|
|
73
|
+
return decorator;
|
|
74
|
+
};
|
|
75
|
+
return decorator;
|
|
76
|
+
}
|
|
77
|
+
exports.In = In;
|
|
78
|
+
//# sourceMappingURL=in.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"in.js","sourceRoot":"","sources":["../../../../src/decorators/operations/in.ts"],"names":[],"mappings":";;;AAAA,qCAA6F;AAC7F,yCAA+H;AA+C/H;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,EAAE,CAAC,MAAmC;IACpD,MAAM,aAAa,GAAG,IAAI,sBAAa,EAAE,CAAC;IAC1C,MAAM,MAAM,GAAQ,EAAE,CAAC;IAEvB,MAAM,SAAS,GAAG,CAAC,MAAW,EAAE,WAA6B,EAAE,KAAmC,EAAE,EAAE;QACpG,MAAM,KAAK,GAAG,wBAAe,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QAE/D,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,qBAAc,CAAC,KAAK;gBACtB,KAA4B,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;gBACnD,MAAM;YACR,KAAK,qBAAc,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,mBAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC9C,MAAM;YAER,KAAK,qBAAc,CAAC,KAAK;gBACvB,IAAA,wBAAiB,EAAC,MAAM,EAAE,SAAS,CAAC,CAAC;gBACrC,MAAM;YAER;gBACE,MAAM,IAAI,+BAAwB,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;AA9DD,gBA8DC","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Location = void 0;
|
|
4
|
+
const returns_1 = require("./returns");
|
|
5
|
+
/**
|
|
6
|
+
* Sets the response Location HTTP header to the specified path parameter.
|
|
7
|
+
*
|
|
8
|
+
* ```typescript
|
|
9
|
+
* @Location('/foo/bar', {description: 'Location to the next step'})
|
|
10
|
+
* @Location('http://example.com')
|
|
11
|
+
* @Location('back')
|
|
12
|
+
* private myMethod() {
|
|
13
|
+
*
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* 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 “/”.
|
|
18
|
+
*
|
|
19
|
+
* @param location
|
|
20
|
+
* @param meta
|
|
21
|
+
* @returns {Function}
|
|
22
|
+
* @decorator
|
|
23
|
+
* @operation
|
|
24
|
+
*/
|
|
25
|
+
function Location(location, meta) {
|
|
26
|
+
return (0, returns_1.Returns)().Location(location, meta);
|
|
27
|
+
}
|
|
28
|
+
exports.Location = Location;
|
|
29
|
+
//# sourceMappingURL=location.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location.js","sourceRoot":"","sources":["../../../../src/decorators/operations/location.ts"],"names":[],"mappings":";;;AACA,uCAAkC;AAElC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,QAAQ,CAAC,QAAgB,EAAE,IAAiB;IAC1D,OAAO,IAAA,iBAAO,GAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC;AAFD,4BAEC","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OperationId = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const jsonEntityFn_1 = require("../common/jsonEntityFn");
|
|
6
|
+
/**
|
|
7
|
+
* Set a swagger operationId explicitly.
|
|
8
|
+
*
|
|
9
|
+
* @param operationId
|
|
10
|
+
* @decorator
|
|
11
|
+
* @swagger
|
|
12
|
+
* @schema
|
|
13
|
+
* @operation
|
|
14
|
+
*/
|
|
15
|
+
function OperationId(operationId) {
|
|
16
|
+
return (0, jsonEntityFn_1.JsonEntityFn)((store, args) => {
|
|
17
|
+
if (store.decoratorType !== core_1.DecoratorTypes.METHOD) {
|
|
18
|
+
throw new core_1.UnsupportedDecoratorType(OperationId, args);
|
|
19
|
+
}
|
|
20
|
+
store.operation.operationId(operationId);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
exports.OperationId = OperationId;
|
|
24
|
+
//# sourceMappingURL=operationId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationId.js","sourceRoot":"","sources":["../../../../src/decorators/operations/operationId.ts"],"names":[],"mappings":";;;AAAA,qCAAoE;AACpE,yDAAoD;AAEpD;;;;;;;;GAQG;AACH,SAAgB,WAAW,CAAC,WAAmB;IAC7C,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,qBAAc,CAAC,MAAM,EAAE;YACjD,MAAM,IAAI,+BAAwB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;SACvD;QAED,KAAK,CAAC,SAAU,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC;AARD,kCAQC","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OperationPath = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const jsonEntityFn_1 = require("../common/jsonEntityFn");
|
|
6
|
+
/**
|
|
7
|
+
* Declare new Operation with his path and http method.
|
|
8
|
+
*
|
|
9
|
+
* ::: warning
|
|
10
|
+
* Don't use decorator with Ts.ED application.
|
|
11
|
+
*
|
|
12
|
+
* Use theses decorators instead:
|
|
13
|
+
*
|
|
14
|
+
* <ApiList query="status.includes('decorator') && status.includes('httpMethod')" />
|
|
15
|
+
*
|
|
16
|
+
* :::
|
|
17
|
+
*
|
|
18
|
+
* @param method
|
|
19
|
+
* @param path
|
|
20
|
+
* @decorator
|
|
21
|
+
* @swagger
|
|
22
|
+
* @schema
|
|
23
|
+
* @operation
|
|
24
|
+
*/
|
|
25
|
+
function OperationPath(method, path = "/") {
|
|
26
|
+
return (0, jsonEntityFn_1.JsonEntityFn)((store, args) => {
|
|
27
|
+
if (store.decoratorType !== core_1.DecoratorTypes.METHOD) {
|
|
28
|
+
throw new core_1.UnsupportedDecoratorType(OperationPath, args);
|
|
29
|
+
}
|
|
30
|
+
store.operation.addOperationPath(method.toUpperCase(), path);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
exports.OperationPath = OperationPath;
|
|
34
|
+
//# sourceMappingURL=operationPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationPath.js","sourceRoot":"","sources":["../../../../src/decorators/operations/operationPath.ts"],"names":[],"mappings":";;;AAAA,qCAAoE;AACpE,yDAAoD;AAGpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,aAAa,CAAC,MAAiC,EAAE,OAAwB,GAAG;IAC1F,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,qBAAc,CAAC,MAAM,EAAE;YACjD,MAAM,IAAI,+BAAwB,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;AARD,sCAQC","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Partial = void 0;
|
|
4
|
+
const groups_1 = require("../common/groups");
|
|
5
|
+
/**
|
|
6
|
+
* Apply Partial group strategy on the input model
|
|
7
|
+
*
|
|
8
|
+
* @decorator
|
|
9
|
+
* @validation
|
|
10
|
+
* @swagger
|
|
11
|
+
* @schema
|
|
12
|
+
* @input
|
|
13
|
+
*/
|
|
14
|
+
function Partial() {
|
|
15
|
+
return (0, groups_1.Groups)("partial");
|
|
16
|
+
}
|
|
17
|
+
exports.Partial = Partial;
|
|
18
|
+
//# sourceMappingURL=partial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial.js","sourceRoot":"","sources":["../../../../src/decorators/operations/partial.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AAExC;;;;;;;;GAQG;AACH,SAAgB,OAAO;IACrB,OAAO,IAAA,eAAM,EAAC,SAAS,CAAQ,CAAC;AAClC,CAAC;AAFD,0BAEC","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Path = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const jsonEntityFn_1 = require("../common/jsonEntityFn");
|
|
6
|
+
/**
|
|
7
|
+
* Set class path to expose all endpoints
|
|
8
|
+
*
|
|
9
|
+
* ::: warning
|
|
10
|
+
* Don't use this decorator to change the path if you develop your application with Ts.ED.
|
|
11
|
+
* :::
|
|
12
|
+
*
|
|
13
|
+
* @param path
|
|
14
|
+
* @decorator
|
|
15
|
+
* @swagger
|
|
16
|
+
* @schema
|
|
17
|
+
* @classDecorator
|
|
18
|
+
* @operation
|
|
19
|
+
*/
|
|
20
|
+
function Path(path) {
|
|
21
|
+
return (0, jsonEntityFn_1.JsonEntityFn)((store, args) => {
|
|
22
|
+
if (store.decoratorType !== core_1.DecoratorTypes.CLASS) {
|
|
23
|
+
throw new core_1.UnsupportedDecoratorType(Path, args);
|
|
24
|
+
}
|
|
25
|
+
store.path = path;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
exports.Path = Path;
|
|
29
|
+
//# sourceMappingURL=path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../../src/decorators/operations/path.ts"],"names":[],"mappings":";;;AAAA,qCAAoE;AACpE,yDAAoD;AAEpD;;;;;;;;;;;;;GAaG;AACH,SAAgB,IAAI,CAAC,IAAY;IAC/B,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,KAAK,CAAC,aAAa,KAAK,qBAAc,CAAC,KAAK,EAAE;YAChD,MAAM,IAAI,+BAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SAChD;QAED,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC;AARD,oBAQC","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Produces = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const jsonEntityFn_1 = require("../common/jsonEntityFn");
|
|
6
|
+
/**
|
|
7
|
+
* Add produces metadata on the decorated element.
|
|
8
|
+
*
|
|
9
|
+
* ## Examples
|
|
10
|
+
* ### On method
|
|
11
|
+
*
|
|
12
|
+
* ```typescript
|
|
13
|
+
* class Model {
|
|
14
|
+
* @Produces("text/html")
|
|
15
|
+
* id: string;
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* ::: warning
|
|
20
|
+
* For openspec v3 prefer `@Returns().ContentType()` usage (see @@Returns@@).
|
|
21
|
+
* :::
|
|
22
|
+
*
|
|
23
|
+
* @param produces
|
|
24
|
+
* @decorator
|
|
25
|
+
* @swagger
|
|
26
|
+
* @methodDecorator
|
|
27
|
+
* @classDecorator
|
|
28
|
+
* @operation
|
|
29
|
+
* @response
|
|
30
|
+
*/
|
|
31
|
+
function Produces(...produces) {
|
|
32
|
+
return (0, jsonEntityFn_1.JsonEntityFn)((store, args) => {
|
|
33
|
+
switch (store.decoratorType) {
|
|
34
|
+
case core_1.DecoratorTypes.METHOD:
|
|
35
|
+
store.operation.produces(produces);
|
|
36
|
+
break;
|
|
37
|
+
case core_1.DecoratorTypes.CLASS:
|
|
38
|
+
(0, core_1.decorateMethodsOf)(args[0], Produces(...produces));
|
|
39
|
+
break;
|
|
40
|
+
default:
|
|
41
|
+
throw new core_1.UnsupportedDecoratorType(Produces, args);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
exports.Produces = Produces;
|
|
46
|
+
//# sourceMappingURL=produces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"produces.js","sourceRoot":"","sources":["../../../../src/decorators/operations/produces.ts"],"names":[],"mappings":";;;AAAA,qCAAuF;AACvF,yDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,QAAQ,CAAC,GAAG,QAAkB;IAC5C,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAClC,QAAQ,KAAK,CAAC,aAAa,EAAE;YAC3B,KAAK,qBAAc,CAAC,MAAM;gBACxB,KAAK,CAAC,SAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,qBAAc,CAAC,KAAK;gBACvB,IAAA,wBAAiB,EAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;gBAClD,MAAM;YAER;gBACE,MAAM,IAAI,+BAAwB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACtD;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,4BAcC","sourcesContent":["import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Add produces metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * class Model {\n * @Produces(\"text/html\")\n * id: string;\n * }\n * ```\n *\n * ::: warning\n * For openspec v3 prefer `@Returns().ContentType()` usage (see @@Returns@@).\n * :::\n *\n * @param produces\n * @decorator\n * @swagger\n * @methodDecorator\n * @classDecorator\n * @operation\n * @response\n */\nexport function Produces(...produces: string[]) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation!.produces(produces);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Produces(...produces));\n break;\n\n default:\n throw new UnsupportedDecoratorType(Produces, args);\n }\n });\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Redirect = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const jsonEntityFn_1 = require("../common/jsonEntityFn");
|
|
6
|
+
const returns_1 = require("./returns");
|
|
7
|
+
function Redirect(...args) {
|
|
8
|
+
const { status, url, meta } = args.reduce((options, value) => {
|
|
9
|
+
if ((0, core_1.isNumber)(value)) {
|
|
10
|
+
options.status = value;
|
|
11
|
+
return options;
|
|
12
|
+
}
|
|
13
|
+
if ((0, core_1.isString)(value)) {
|
|
14
|
+
options.url = value;
|
|
15
|
+
return options;
|
|
16
|
+
}
|
|
17
|
+
options.meta = value;
|
|
18
|
+
return options;
|
|
19
|
+
}, { status: 302, url: "", meta: {} });
|
|
20
|
+
return (0, core_1.useDecorators)((0, returns_1.Returns)(status).Location(url, meta), (0, jsonEntityFn_1.JsonEntityFn)((entity) => {
|
|
21
|
+
var _a;
|
|
22
|
+
(_a = entity.operation) === null || _a === void 0 ? void 0 : _a.setRedirection(status);
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
exports.Redirect = Redirect;
|
|
26
|
+
//# sourceMappingURL=redirect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redirect.js","sourceRoot":"","sources":["../../../../src/decorators/operations/redirect.ts"],"names":[],"mappings":";;;AAAA,qCAA6D;AAE7D,yDAAoD;AACpD,uCAAkC;AAqDlC,SAAgB,QAAQ,CAAC,GAAG,IAAW;IACrC,MAAM,EAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC,MAAM,CACrC,CAAC,OAAY,EAAE,KAAU,EAAE,EAAE;QAC3B,IAAI,IAAA,eAAQ,EAAC,KAAK,CAAC,EAAE;YACnB,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC;YACvB,OAAO,OAAO,CAAC;SAChB;QAED,IAAI,IAAA,eAAQ,EAAC,KAAK,CAAC,EAAE;YACnB,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC;YACpB,OAAO,OAAO,CAAC;SAChB;QAED,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;QACrB,OAAO,OAAO,CAAC;IACjB,CAAC,EACD,EAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAC,CACjC,CAAC;IACF,OAAO,IAAA,oBAAa,EAClB,IAAA,iBAAO,EAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,EACnC,IAAA,2BAAY,EAAC,CAAC,MAAM,EAAE,EAAE;;QACtB,MAAA,MAAM,CAAC,SAAS,0CAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC,CAAC,CACH,CAAC;AACJ,CAAC;AAxBD,4BAwBC","sourcesContent":["import {isNumber, isString, useDecorators} from \"@tsed/core\";\nimport {JsonHeader} from \"../../interfaces/JsonOpenSpec\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\nimport {Returns} from \"./returns\";\n\n/**\n * Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code . If not specified, status defaults to “302 “Found”.\n *\n * ```typescript\n * @Redirect('/foo/bar')\n * @Redirect(301, 'http://example.com').Type(Model)\n * private myMethod() {}\n * ```\n * Redirects can be a fully-qualified URL for redirecting to a different site:\n *\n * ```typescript\n * @Redirect('http://google.com');\n * private myMethod() {}\n * ```\n *\n * Redirects can be relative to the root of the host name. For example, if the application is on http://example.com/admin/post/new, the following would redirect to the URL http://example.com/admin:\n *\n * ```typescript\n * @Redirect('/admin');\n * ```\n * Redirects can be relative to the current URL. For example, from http://example.com/blog/admin/ (notice the trailing slash), the following would redirect to the URL http://example.com/blog/admin/post/new.\n *\n * ```typescript\n * @Redirect('post/new');\n * ```\n *\n * Redirecting to post/new from http://example.com/blog/admin (no trailing slash), will redirect to http://example.com/blog/post/new.\n *\n * If you found the above behavior confusing, think of path segments as directories (with trailing slashes) and files, it will start to make sense.\n *\n * Path-relative redirects are also possible. If you were on http://example.com/admin/post/new, the following would redirect to http//example.com/admin/post:\n *\n * ```typescript\n * @Redirect('..');\n * ``\n *\n * A back redirection redirects the request back to the referer, defaulting to / when the referer is missing.\n *\n * ```typescript\n * @Redirect('back');\n * ```\n *\n * @param url\n * @param meta\n * @decorator\n * @operation\n * @response\n * @headers\n */\nexport function Redirect(url: string, meta?: JsonHeader): Function;\nexport function Redirect(status: number, url: string, meta?: JsonHeader): Function;\nexport function Redirect(...args: any[]): Function {\n const {status, url, meta} = args.reduce(\n (options: any, value: any) => {\n if (isNumber(value)) {\n options.status = value;\n return options;\n }\n\n if (isString(value)) {\n options.url = value;\n return options;\n }\n\n options.meta = value;\n return options;\n },\n {status: 302, url: \"\", meta: {}}\n );\n return useDecorators(\n Returns(status).Location(url, meta),\n JsonEntityFn((entity) => {\n entity.operation?.setRedirection(status);\n })\n );\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Returns = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const httpStatusMessages_1 = require("../../constants/httpStatusMessages");
|
|
6
|
+
const DecoratorContext_1 = require("../../domain/DecoratorContext");
|
|
7
|
+
const JsonEntityStore_1 = require("../../domain/JsonEntityStore");
|
|
8
|
+
const JsonSchema_1 = require("../../domain/JsonSchema");
|
|
9
|
+
const defineStatusModel_1 = require("../../utils/defineStatusModel");
|
|
10
|
+
const from_1 = require("../../utils/from");
|
|
11
|
+
const isSuccessStatus_1 = require("../../utils/isSuccessStatus");
|
|
12
|
+
const mapHeaders_1 = require("../../utils/mapHeaders");
|
|
13
|
+
/**
|
|
14
|
+
* @ignore
|
|
15
|
+
*/
|
|
16
|
+
function isEnum(type) {
|
|
17
|
+
return (0, core_1.isObject)(type) && !("toJSON" in type);
|
|
18
|
+
}
|
|
19
|
+
function mapGenerics(types) {
|
|
20
|
+
return types.map((type) => {
|
|
21
|
+
if (isEnum(type)) {
|
|
22
|
+
return (0, from_1.string)().enum(Object.values(type));
|
|
23
|
+
}
|
|
24
|
+
return type;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @ignore
|
|
29
|
+
*/
|
|
30
|
+
class ReturnDecoratorContext extends DecoratorContext_1.DecoratorContext {
|
|
31
|
+
constructor({ status, model }) {
|
|
32
|
+
super();
|
|
33
|
+
this.methods = [
|
|
34
|
+
"contentType",
|
|
35
|
+
"description",
|
|
36
|
+
"examples",
|
|
37
|
+
"type",
|
|
38
|
+
"status",
|
|
39
|
+
"of",
|
|
40
|
+
"nested",
|
|
41
|
+
"header",
|
|
42
|
+
"headers",
|
|
43
|
+
"schema",
|
|
44
|
+
"title",
|
|
45
|
+
"groups",
|
|
46
|
+
"location"
|
|
47
|
+
];
|
|
48
|
+
this.model(model);
|
|
49
|
+
this.status(status);
|
|
50
|
+
}
|
|
51
|
+
type(model) {
|
|
52
|
+
return this.model(model);
|
|
53
|
+
}
|
|
54
|
+
model(model) {
|
|
55
|
+
model && this.set("model", model);
|
|
56
|
+
return this;
|
|
57
|
+
}
|
|
58
|
+
status(status) {
|
|
59
|
+
this.set("status", status);
|
|
60
|
+
if (status && (0, httpStatusMessages_1.getStatusMessage)(status) && !this.get("description")) {
|
|
61
|
+
this.set("description", (0, httpStatusMessages_1.getStatusMessage)(status));
|
|
62
|
+
if (!this.get("model")) {
|
|
63
|
+
this.model((0, defineStatusModel_1.getStatusModel)(+status));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
68
|
+
headers(headers) {
|
|
69
|
+
this.set("headers", {
|
|
70
|
+
...(this.get("headers") || {}),
|
|
71
|
+
...(0, mapHeaders_1.mapHeaders)(headers)
|
|
72
|
+
});
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
header(key, value) {
|
|
76
|
+
return this.headers({ [key]: value });
|
|
77
|
+
}
|
|
78
|
+
location(path, meta = {}) {
|
|
79
|
+
this.headers({
|
|
80
|
+
Location: {
|
|
81
|
+
...meta,
|
|
82
|
+
value: path
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
return this;
|
|
86
|
+
}
|
|
87
|
+
groups(...groups) {
|
|
88
|
+
this.set("groups", groups);
|
|
89
|
+
return this;
|
|
90
|
+
}
|
|
91
|
+
nested(...generics) {
|
|
92
|
+
const model = this.get("model");
|
|
93
|
+
this.checkPrimitive(model);
|
|
94
|
+
this.checkCollection(model);
|
|
95
|
+
this.addAction((ctx) => {
|
|
96
|
+
this.get("schema").nestedGenerics.push(mapGenerics(generics));
|
|
97
|
+
});
|
|
98
|
+
return this;
|
|
99
|
+
}
|
|
100
|
+
of(...types) {
|
|
101
|
+
const model = this.get("model");
|
|
102
|
+
this.checkPrimitive(model);
|
|
103
|
+
this.addAction(() => {
|
|
104
|
+
const schema = this.get("schema");
|
|
105
|
+
if ((0, core_1.isCollection)(model)) {
|
|
106
|
+
schema === null || schema === void 0 ? void 0 : schema.itemSchema({ type: types[0] });
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
schema === null || schema === void 0 ? void 0 : schema.nestedGenerics.push(mapGenerics(types));
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
return this;
|
|
113
|
+
}
|
|
114
|
+
schema(partial) {
|
|
115
|
+
this.addAction(() => {
|
|
116
|
+
const schema = this.get("schema");
|
|
117
|
+
schema.assign(partial);
|
|
118
|
+
});
|
|
119
|
+
return this;
|
|
120
|
+
}
|
|
121
|
+
examples(examples) {
|
|
122
|
+
this.set("examples", (0, core_1.isString)(examples) ? [examples] : examples);
|
|
123
|
+
return this;
|
|
124
|
+
}
|
|
125
|
+
title(title) {
|
|
126
|
+
return this.schema({ title });
|
|
127
|
+
}
|
|
128
|
+
checkPrimitive(model) {
|
|
129
|
+
if ((0, core_1.isPrimitiveOrPrimitiveClass)(model)) {
|
|
130
|
+
throw new Error("Returns.Of cannot be used with the following primitive classes: String, Number, Boolean");
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
checkCollection(model) {
|
|
134
|
+
if ((0, core_1.isCollection)(model)) {
|
|
135
|
+
throw new Error("Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean");
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
getContentType() {
|
|
139
|
+
const model = this.get("model");
|
|
140
|
+
let contentType = this.get("contentType");
|
|
141
|
+
if (model && !(0, core_1.isPlainObject)(model) && !(0, core_1.isPrimitiveOrPrimitiveClass)(model)) {
|
|
142
|
+
contentType = contentType || "application/json";
|
|
143
|
+
}
|
|
144
|
+
return contentType;
|
|
145
|
+
}
|
|
146
|
+
getStatus() {
|
|
147
|
+
return this.get("status") || "default";
|
|
148
|
+
}
|
|
149
|
+
onInit(args, decorator) {
|
|
150
|
+
const type = (0, core_1.decoratorTypeOf)(args);
|
|
151
|
+
switch (type) {
|
|
152
|
+
case core_1.DecoratorTypes.METHOD:
|
|
153
|
+
this.entity = JsonEntityStore_1.JsonEntityStore.from(...args);
|
|
154
|
+
if (this.entity.operation) {
|
|
155
|
+
this.map();
|
|
156
|
+
}
|
|
157
|
+
break;
|
|
158
|
+
case core_1.DecoratorTypes.CLASS:
|
|
159
|
+
this.decoratorType = core_1.DecoratorTypes.CLASS;
|
|
160
|
+
(0, core_1.decorateMethodsOf)(args[0], decorator);
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
map() {
|
|
165
|
+
const model = this.get("model");
|
|
166
|
+
const { entity, decoratorType } = this;
|
|
167
|
+
const operation = this.entity.operation;
|
|
168
|
+
const currentStatus = this.getStatus();
|
|
169
|
+
const response = operation.ensureResponseOf(currentStatus);
|
|
170
|
+
const contentType = this.getContentType();
|
|
171
|
+
let { description = response.get("description") } = this.toObject();
|
|
172
|
+
if (description) {
|
|
173
|
+
description = decoratorType === core_1.DecoratorTypes.CLASS ? response.get("description") || description : description;
|
|
174
|
+
response.description(description);
|
|
175
|
+
}
|
|
176
|
+
const headers = this.getMergedKey("headers", response.get("headers"));
|
|
177
|
+
if (headers) {
|
|
178
|
+
response.headers(headers);
|
|
179
|
+
}
|
|
180
|
+
this.mapMedia(response);
|
|
181
|
+
if ((0, isSuccessStatus_1.isSuccessStatus)(this.get("status")) || currentStatus === "default") {
|
|
182
|
+
if (model) {
|
|
183
|
+
entity.type = model;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// additional info for OS2
|
|
187
|
+
contentType && operation.addProduce(contentType);
|
|
188
|
+
// run additional actions
|
|
189
|
+
return this.runActions();
|
|
190
|
+
}
|
|
191
|
+
mapMedia(response) {
|
|
192
|
+
const contentType = this.getContentType();
|
|
193
|
+
const model = this.get("model");
|
|
194
|
+
const media = response.getMedia(contentType || "*/*");
|
|
195
|
+
const schema = media.get("schema") || new JsonSchema_1.JsonSchema({ type: model });
|
|
196
|
+
model && schema.type(model);
|
|
197
|
+
this.set("schema", schema);
|
|
198
|
+
media.schema(schema);
|
|
199
|
+
media.groups = this.get("groups");
|
|
200
|
+
const examples = this.get("examples");
|
|
201
|
+
if (examples) {
|
|
202
|
+
media.examples(examples);
|
|
203
|
+
}
|
|
204
|
+
return media;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function Returns(status, model) {
|
|
208
|
+
const context = new ReturnDecoratorContext({
|
|
209
|
+
status,
|
|
210
|
+
model
|
|
211
|
+
});
|
|
212
|
+
return context.build();
|
|
213
|
+
}
|
|
214
|
+
exports.Returns = Returns;
|
|
215
|
+
//# sourceMappingURL=returns.js.map
|