@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,105 @@
|
|
|
1
|
+
export const HTTP_STATUS_MESSAGES = {
|
|
2
|
+
"100": { label: "Continue", code: "CONTINUE" },
|
|
3
|
+
"101": { label: "Switching Protocols", code: "SWITCHING_PROTOCOLS" },
|
|
4
|
+
"102": { label: "Processing", code: "PROCESSING" },
|
|
5
|
+
"103": { label: "Early Hints", code: "EARLY_HINTS" },
|
|
6
|
+
"200": { label: "Success", code: "SUCCESS" },
|
|
7
|
+
"201": { label: "Created", code: "CREATED" },
|
|
8
|
+
"202": { label: "Accepted", code: "ACCEPTED" },
|
|
9
|
+
"203": {
|
|
10
|
+
label: "Non-Authoritative Information",
|
|
11
|
+
code: "NON_AUTHORITATIVE_INFORMATION"
|
|
12
|
+
},
|
|
13
|
+
"204": { label: "No Content", code: "NO_CONTENT" },
|
|
14
|
+
"205": { label: "Reset Content", code: "RESET_CONTENT" },
|
|
15
|
+
"206": { label: "Partial Content", code: "PARTIAL_CONTENT" },
|
|
16
|
+
"207": { label: "Multi-Status", code: "MULTI_STATUS" },
|
|
17
|
+
"208": { label: "Already Reported", code: "ALREADY_REPORTED" },
|
|
18
|
+
"226": { label: "IM Used", code: "IM_USED" },
|
|
19
|
+
"300": { label: "Multiple Choices", code: "MULTIPLE_CHOICES" },
|
|
20
|
+
"301": { label: "Moved Permanently", code: "MOVED_PERMANENTLY" },
|
|
21
|
+
"302": { label: "Found", code: "FOUND" },
|
|
22
|
+
"303": { label: "See Other", code: "SEE_OTHER" },
|
|
23
|
+
"304": { label: "Not Modified", code: "NOT_MODIFIED" },
|
|
24
|
+
"305": { label: "Use Proxy", code: "USE_PROXY" },
|
|
25
|
+
"306": { label: "(Unused)", code: "UNUSED" },
|
|
26
|
+
"307": { label: "Temporary Redirect", code: "TEMPORARY_REDIRECT" },
|
|
27
|
+
"308": { label: "Permanent Redirect", code: "PERMANENT_REDIRECT" },
|
|
28
|
+
"310": { label: "Too Many Redirects", code: "TOO_MANY_REDIRECTS" },
|
|
29
|
+
"400": { label: "Bad Request", code: "BAD_REQUEST" },
|
|
30
|
+
"401": { label: "Unauthorized", code: "UNAUTHORIZED" },
|
|
31
|
+
"402": { label: "Payment Required", code: "PAYMENT_REQUIRED" },
|
|
32
|
+
"403": { label: "Forbidden", code: "FORBIDDEN" },
|
|
33
|
+
"404": { label: "Not Found", code: "NOT_FOUND" },
|
|
34
|
+
"405": { label: "Method Not Allowed", code: "METHOD_NOT_ALLOWED" },
|
|
35
|
+
"406": { label: "Not Acceptable", code: "NOT_ACCEPTABLE" },
|
|
36
|
+
"407": {
|
|
37
|
+
label: "Proxy Authentication Required",
|
|
38
|
+
code: "PROXY_AUTHENTICATION_REQUIRED"
|
|
39
|
+
},
|
|
40
|
+
"408": { label: "Request Timeout", code: "REQUEST_TIMEOUT" },
|
|
41
|
+
"409": { label: "Conflict", code: "CONFLICT" },
|
|
42
|
+
"410": { label: "Gone", code: "GONE" },
|
|
43
|
+
"411": { label: "Length Required", code: "LENGTH_REQUIRED" },
|
|
44
|
+
"412": { label: "Precondition Failed", code: "PRECONDITION_FAILED" },
|
|
45
|
+
"413": {
|
|
46
|
+
label: "Request Entity Too Large",
|
|
47
|
+
code: "REQUEST_ENTITY_TOO_LARGE"
|
|
48
|
+
},
|
|
49
|
+
"414": { label: "Request URI Too Long", code: "REQUEST_URI_TOO_LONG" },
|
|
50
|
+
"415": { label: "Unsupported Media Type", code: "UNSUPPORTED_MEDIA_TYPE" },
|
|
51
|
+
"416": {
|
|
52
|
+
label: "Request Range Unsatisfiable",
|
|
53
|
+
code: "REQUEST_RANGE_UNSATISFIABLE"
|
|
54
|
+
},
|
|
55
|
+
"417": { label: "Expectation Failed", code: "EXPECTATION_FAILED" },
|
|
56
|
+
"418": { label: "I'm a Teapot", code: "I_M_A_TEAPOT" },
|
|
57
|
+
"421": { label: "Misdirected Request", code: "MISDIRECTED_REQUEST" },
|
|
58
|
+
"422": { label: "Unprocessable Entity", code: "UNPROCESSABLE_ENTITY" },
|
|
59
|
+
"423": { label: "Locked", code: "LOCKED" },
|
|
60
|
+
"424": { label: "Failed Dependency", code: "FAILED_DEPENDENCY" },
|
|
61
|
+
"425": { label: "Too Early", code: "TOO_EARLY" },
|
|
62
|
+
"426": { label: "Upgrade Required", code: "UPGRADE_REQUIRED" },
|
|
63
|
+
"427": { label: "Unassigned", code: "UNASSIGNED" },
|
|
64
|
+
"428": { label: "Precondition Required", code: "PRECONDITION_REQUIRED" },
|
|
65
|
+
"429": { label: "Too Many Requests", code: "TOO_MANY_REQUESTS" },
|
|
66
|
+
"430": { label: "Unassigned", code: "UNASSIGNED" },
|
|
67
|
+
"431": {
|
|
68
|
+
label: "Request Header Fields Too Large",
|
|
69
|
+
code: "REQUEST_HEADER_FIELDS_TOO_LARGE"
|
|
70
|
+
},
|
|
71
|
+
"451": {
|
|
72
|
+
label: "Unavailable For Legal Reasons",
|
|
73
|
+
code: "UNAVAILABLE_FOR_LEGAL_REASONS"
|
|
74
|
+
},
|
|
75
|
+
"500": { label: "Internal Server Error", code: "INTERNAL_SERVER_ERROR" },
|
|
76
|
+
"501": { label: "Not Implemented", code: "NOT_IMPLEMENTED" },
|
|
77
|
+
"502": { label: "Bad Gateway", code: "BAD_GATEWAY" },
|
|
78
|
+
"503": { label: "Service Unavailable", code: "SERVICE_UNAVAILABLE" },
|
|
79
|
+
"504": { label: "Gateway Timeout", code: "GATEWAY_TIMEOUT" },
|
|
80
|
+
"505": {
|
|
81
|
+
label: "HTTP Version Not Supported",
|
|
82
|
+
code: "HTTP_VERSION_NOT_SUPPORTED"
|
|
83
|
+
},
|
|
84
|
+
"506": { label: "Variant Also Negotiates", code: "VARIANT_ALSO_NEGOTIATES" },
|
|
85
|
+
"507": { label: "Insufficient Storage", code: "INSUFFICIENT_STORAGE" },
|
|
86
|
+
"508": { label: "Loop Detected", code: "LOOP_DETECTED" },
|
|
87
|
+
"509": {
|
|
88
|
+
label: "Bandwidth Limit Exceeded",
|
|
89
|
+
code: "BANDWIDTH_LIMIT_EXCEEDED"
|
|
90
|
+
},
|
|
91
|
+
"510": { label: "Not Extended", code: "NOT_EXTENDED" },
|
|
92
|
+
"511": {
|
|
93
|
+
label: "Network Authentication Required",
|
|
94
|
+
code: "NETWORK_AUTHENTICATION_REQUIRED"
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
export function getStatusConstant(status) {
|
|
98
|
+
var _a;
|
|
99
|
+
return (_a = HTTP_STATUS_MESSAGES[status]) === null || _a === void 0 ? void 0 : _a.code;
|
|
100
|
+
}
|
|
101
|
+
export function getStatusMessage(status) {
|
|
102
|
+
var _a;
|
|
103
|
+
return (_a = HTTP_STATUS_MESSAGES[status]) === null || _a === void 0 ? void 0 : _a.label;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=httpStatusMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpStatusMessages.js","sourceRoot":"","sources":["../../../src/constants/httpStatusMessages.ts"],"names":[],"mappings":"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","sourcesContent":["export const HTTP_STATUS_MESSAGES = {\n \"100\": {label: \"Continue\", code: \"CONTINUE\"},\n \"101\": {label: \"Switching Protocols\", code: \"SWITCHING_PROTOCOLS\"},\n \"102\": {label: \"Processing\", code: \"PROCESSING\"},\n \"103\": {label: \"Early Hints\", code: \"EARLY_HINTS\"},\n \"200\": {label: \"Success\", code: \"SUCCESS\"},\n \"201\": {label: \"Created\", code: \"CREATED\"},\n \"202\": {label: \"Accepted\", code: \"ACCEPTED\"},\n \"203\": {\n label: \"Non-Authoritative Information\",\n code: \"NON_AUTHORITATIVE_INFORMATION\"\n },\n \"204\": {label: \"No Content\", code: \"NO_CONTENT\"},\n \"205\": {label: \"Reset Content\", code: \"RESET_CONTENT\"},\n \"206\": {label: \"Partial Content\", code: \"PARTIAL_CONTENT\"},\n \"207\": {label: \"Multi-Status\", code: \"MULTI_STATUS\"},\n \"208\": {label: \"Already Reported\", code: \"ALREADY_REPORTED\"},\n \"226\": {label: \"IM Used\", code: \"IM_USED\"},\n \"300\": {label: \"Multiple Choices\", code: \"MULTIPLE_CHOICES\"},\n \"301\": {label: \"Moved Permanently\", code: \"MOVED_PERMANENTLY\"},\n \"302\": {label: \"Found\", code: \"FOUND\"},\n \"303\": {label: \"See Other\", code: \"SEE_OTHER\"},\n \"304\": {label: \"Not Modified\", code: \"NOT_MODIFIED\"},\n \"305\": {label: \"Use Proxy\", code: \"USE_PROXY\"},\n \"306\": {label: \"(Unused)\", code: \"UNUSED\"},\n \"307\": {label: \"Temporary Redirect\", code: \"TEMPORARY_REDIRECT\"},\n \"308\": {label: \"Permanent Redirect\", code: \"PERMANENT_REDIRECT\"},\n \"310\": {label: \"Too Many Redirects\", code: \"TOO_MANY_REDIRECTS\"},\n \"400\": {label: \"Bad Request\", code: \"BAD_REQUEST\"},\n \"401\": {label: \"Unauthorized\", code: \"UNAUTHORIZED\"},\n \"402\": {label: \"Payment Required\", code: \"PAYMENT_REQUIRED\"},\n \"403\": {label: \"Forbidden\", code: \"FORBIDDEN\"},\n \"404\": {label: \"Not Found\", code: \"NOT_FOUND\"},\n \"405\": {label: \"Method Not Allowed\", code: \"METHOD_NOT_ALLOWED\"},\n \"406\": {label: \"Not Acceptable\", code: \"NOT_ACCEPTABLE\"},\n \"407\": {\n label: \"Proxy Authentication Required\",\n code: \"PROXY_AUTHENTICATION_REQUIRED\"\n },\n \"408\": {label: \"Request Timeout\", code: \"REQUEST_TIMEOUT\"},\n \"409\": {label: \"Conflict\", code: \"CONFLICT\"},\n \"410\": {label: \"Gone\", code: \"GONE\"},\n \"411\": {label: \"Length Required\", code: \"LENGTH_REQUIRED\"},\n \"412\": {label: \"Precondition Failed\", code: \"PRECONDITION_FAILED\"},\n \"413\": {\n label: \"Request Entity Too Large\",\n code: \"REQUEST_ENTITY_TOO_LARGE\"\n },\n \"414\": {label: \"Request URI Too Long\", code: \"REQUEST_URI_TOO_LONG\"},\n \"415\": {label: \"Unsupported Media Type\", code: \"UNSUPPORTED_MEDIA_TYPE\"},\n \"416\": {\n label: \"Request Range Unsatisfiable\",\n code: \"REQUEST_RANGE_UNSATISFIABLE\"\n },\n \"417\": {label: \"Expectation Failed\", code: \"EXPECTATION_FAILED\"},\n \"418\": {label: \"I'm a Teapot\", code: \"I_M_A_TEAPOT\"},\n \"421\": {label: \"Misdirected Request\", code: \"MISDIRECTED_REQUEST\"},\n \"422\": {label: \"Unprocessable Entity\", code: \"UNPROCESSABLE_ENTITY\"},\n \"423\": {label: \"Locked\", code: \"LOCKED\"},\n \"424\": {label: \"Failed Dependency\", code: \"FAILED_DEPENDENCY\"},\n \"425\": {label: \"Too Early\", code: \"TOO_EARLY\"},\n \"426\": {label: \"Upgrade Required\", code: \"UPGRADE_REQUIRED\"},\n \"427\": {label: \"Unassigned\", code: \"UNASSIGNED\"},\n \"428\": {label: \"Precondition Required\", code: \"PRECONDITION_REQUIRED\"},\n \"429\": {label: \"Too Many Requests\", code: \"TOO_MANY_REQUESTS\"},\n \"430\": {label: \"Unassigned\", code: \"UNASSIGNED\"},\n \"431\": {\n label: \"Request Header Fields Too Large\",\n code: \"REQUEST_HEADER_FIELDS_TOO_LARGE\"\n },\n \"451\": {\n label: \"Unavailable For Legal Reasons\",\n code: \"UNAVAILABLE_FOR_LEGAL_REASONS\"\n },\n \"500\": {label: \"Internal Server Error\", code: \"INTERNAL_SERVER_ERROR\"},\n \"501\": {label: \"Not Implemented\", code: \"NOT_IMPLEMENTED\"},\n \"502\": {label: \"Bad Gateway\", code: \"BAD_GATEWAY\"},\n \"503\": {label: \"Service Unavailable\", code: \"SERVICE_UNAVAILABLE\"},\n \"504\": {label: \"Gateway Timeout\", code: \"GATEWAY_TIMEOUT\"},\n \"505\": {\n label: \"HTTP Version Not Supported\",\n code: \"HTTP_VERSION_NOT_SUPPORTED\"\n },\n \"506\": {label: \"Variant Also Negotiates\", code: \"VARIANT_ALSO_NEGOTIATES\"},\n \"507\": {label: \"Insufficient Storage\", code: \"INSUFFICIENT_STORAGE\"},\n \"508\": {label: \"Loop Detected\", code: \"LOOP_DETECTED\"},\n \"509\": {\n label: \"Bandwidth Limit Exceeded\",\n code: \"BANDWIDTH_LIMIT_EXCEEDED\"\n },\n \"510\": {label: \"Not Extended\", code: \"NOT_EXTENDED\"},\n \"511\": {\n label: \"Network Authentication Required\",\n code: \"NETWORK_AUTHENTICATION_REQUIRED\"\n }\n};\n\nexport function getStatusConstant(status: number | string) {\n return (HTTP_STATUS_MESSAGES as any)[status]?.code;\n}\n\nexport function getStatusMessage(status: number | string) {\n return (HTTP_STATUS_MESSAGES as any)[status]?.label;\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Store } from "@tsed/core";
|
|
2
|
+
import { JsonEntityFn } from "../common/jsonEntityFn";
|
|
3
|
+
/**
|
|
4
|
+
* Add Children class to compose routes
|
|
5
|
+
*
|
|
6
|
+
* @decorator
|
|
7
|
+
* @swagger
|
|
8
|
+
* @schema
|
|
9
|
+
* @classDecorator
|
|
10
|
+
* @param children
|
|
11
|
+
*/
|
|
12
|
+
export function Children(...children) {
|
|
13
|
+
return JsonEntityFn((store) => {
|
|
14
|
+
store.store.set("childrenControllers", children);
|
|
15
|
+
children.forEach((childToken) => {
|
|
16
|
+
Store.from(childToken).set("parentController", store.token);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=children.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"children.js","sourceRoot":"","sources":["../../../../src/decorators/class/children.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAO,MAAM,YAAY,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAG,QAAqB;IAC/C,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;QAEjD,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YAC9B,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {Store, Type} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Add Children class to compose routes\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param children\n */\nexport function Children(...children: Type<any>[]): ClassDecorator {\n return JsonEntityFn((store) => {\n store.store.set(\"childrenControllers\", children);\n\n children.forEach((childToken) => {\n Store.from(childToken).set(\"parentController\", store.token);\n });\n });\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CollectionOf } from "./collectionOf";
|
|
2
|
+
/**
|
|
3
|
+
* Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...
|
|
4
|
+
*
|
|
5
|
+
* The array instance will be valid against "contains" if at least one of its elements is valid against the given schema.
|
|
6
|
+
*
|
|
7
|
+
* ```typescript
|
|
8
|
+
* class Model {
|
|
9
|
+
* @CollectionContains(String).MinLength(0).MaxLength(0)
|
|
10
|
+
* property: string[];
|
|
11
|
+
* }
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @param {Type<any>} type
|
|
15
|
+
* @decorator
|
|
16
|
+
* @validation
|
|
17
|
+
* @swagger
|
|
18
|
+
* @schema
|
|
19
|
+
* @input
|
|
20
|
+
* @collections
|
|
21
|
+
*/
|
|
22
|
+
export function CollectionContains(type) {
|
|
23
|
+
return CollectionOf(type).Contains();
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=collectionContains.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collectionContains.js","sourceRoot":"","sources":["../../../../src/decorators/collections/collectionContains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAS;IAC1C,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;AACvC,CAAC","sourcesContent":["import {CollectionOf} from \"./collectionOf\";\n\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * The array instance will be valid against \"contains\" if at least one of its elements is valid against the given schema.\n *\n * ```typescript\n * class Model {\n * @CollectionContains(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n *\n * @param {Type<any>} type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionContains(type: any) {\n return CollectionOf(type).Contains();\n}\n"]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { JsonEntityStore } from "../../domain/JsonEntityStore";
|
|
2
|
+
/**
|
|
3
|
+
* Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...
|
|
4
|
+
*
|
|
5
|
+
* ```typescript
|
|
6
|
+
* class Model {
|
|
7
|
+
* @CollectionOf(String).MinLength(0).MaxLength(0)
|
|
8
|
+
* property: string[];
|
|
9
|
+
* }
|
|
10
|
+
* ```
|
|
11
|
+
* ::: warning
|
|
12
|
+
* You mustn't use the `type Type = string | number` as parameters Type.
|
|
13
|
+
*
|
|
14
|
+
* This example doesn't work:
|
|
15
|
+
*
|
|
16
|
+
* ```typescript
|
|
17
|
+
* type Type = "string" | "number"
|
|
18
|
+
* class Model {
|
|
19
|
+
* @CollectionOf(Type)
|
|
20
|
+
* property: Type[];
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
* :::
|
|
24
|
+
*
|
|
25
|
+
* @param {Type<any>} type
|
|
26
|
+
* @param collectionType
|
|
27
|
+
* @decorator
|
|
28
|
+
* @validation
|
|
29
|
+
* @swagger
|
|
30
|
+
* @schema
|
|
31
|
+
* @input
|
|
32
|
+
* @collections
|
|
33
|
+
*/
|
|
34
|
+
export function CollectionOf(type, collectionType) {
|
|
35
|
+
const schema = {};
|
|
36
|
+
let contains = false;
|
|
37
|
+
const decorator = (...args) => {
|
|
38
|
+
const store = JsonEntityStore.from(...args);
|
|
39
|
+
// const itemSchema = store.itemSchema.toJSON();
|
|
40
|
+
if (collectionType) {
|
|
41
|
+
store.collectionType = collectionType;
|
|
42
|
+
store.schema.type(collectionType);
|
|
43
|
+
}
|
|
44
|
+
store.type = type;
|
|
45
|
+
// console.log(type);
|
|
46
|
+
store.itemSchema.type(type);
|
|
47
|
+
// console.log(store.itemSchema.getComputedType(), schema);
|
|
48
|
+
// store.itemSchema.assign({...itemSchema, type});
|
|
49
|
+
store.schema.assign(schema);
|
|
50
|
+
if (store.isArray && contains) {
|
|
51
|
+
store.schema.set("contains", store.schema.get("items"));
|
|
52
|
+
store.schema.delete("items");
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
decorator.MinItems = (minItems) => {
|
|
56
|
+
schema.minItems = minItems;
|
|
57
|
+
return decorator;
|
|
58
|
+
};
|
|
59
|
+
decorator.MaxItems = (maxItems) => {
|
|
60
|
+
schema.maxItems = maxItems;
|
|
61
|
+
return decorator;
|
|
62
|
+
};
|
|
63
|
+
decorator.MinProperties = (minProperties) => {
|
|
64
|
+
schema.minProperties = minProperties;
|
|
65
|
+
return decorator;
|
|
66
|
+
};
|
|
67
|
+
decorator.MaxProperties = (maxProperties) => {
|
|
68
|
+
schema.maxProperties = maxProperties;
|
|
69
|
+
return decorator;
|
|
70
|
+
};
|
|
71
|
+
decorator.Contains = () => {
|
|
72
|
+
contains = true;
|
|
73
|
+
return decorator;
|
|
74
|
+
};
|
|
75
|
+
decorator.UniqueItems = (uniqueItems = true) => {
|
|
76
|
+
schema.uniqueItems = uniqueItems;
|
|
77
|
+
return decorator;
|
|
78
|
+
};
|
|
79
|
+
return decorator;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Alias of @@GenericOf@@ decorator.
|
|
83
|
+
* @param type
|
|
84
|
+
* @decorator
|
|
85
|
+
*/
|
|
86
|
+
export function ArrayOf(type) {
|
|
87
|
+
return CollectionOf(type, Array);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Alias of @@GenericOf@@ decorator.
|
|
91
|
+
* @param type
|
|
92
|
+
* @decorator
|
|
93
|
+
*/
|
|
94
|
+
export function MapOf(type) {
|
|
95
|
+
return CollectionOf(type, Map);
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=collectionOf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collectionOf.js","sourceRoot":"","sources":["../../../../src/decorators/collections/collectionOf.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAkE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,UAAU,YAAY,CAAC,IAAS,EAAE,cAAoB;IAC1D,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,IAAI,QAAQ,GAAY,KAAK,CAAC;IAE9B,MAAM,SAAS,GAAG,CAAC,GAAG,IAAS,EAAE,EAAE;QACjC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QAC5C,gDAAgD;QAEhD,IAAI,cAAc,EAAE;YAClB,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;YACtC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SACnC;QAED,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,qBAAqB;QACrB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,2DAA2D;QAC3D,kDAAkD;QAClD,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE5B,IAAI,KAAK,CAAC,OAAO,IAAI,QAAQ,EAAE;YAC7B,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;YACxD,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SAC9B;IACH,CAAC,CAAC;IAEF,SAAS,CAAC,QAAQ,GAAG,CAAC,QAAgB,EAAE,EAAE;QACxC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAE3B,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,SAAS,CAAC,QAAQ,GAAG,CAAC,QAAgB,EAAE,EAAE;QACxC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAE3B,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IACF,SAAS,CAAC,aAAa,GAAG,CAAC,aAAqB,EAAE,EAAE;QAClD,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;QAErC,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,SAAS,CAAC,aAAa,GAAG,CAAC,aAAqB,EAAE,EAAE;QAClD,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;QAErC,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,SAAS,CAAC,QAAQ,GAAG,GAAG,EAAE;QACxB,QAAQ,GAAG,IAAI,CAAC;QAEhB,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,SAAS,CAAC,WAAW,GAAG,CAAC,WAAW,GAAG,IAAI,EAAE,EAAE;QAC7C,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;QAEjC,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,IAAS;IAC/B,OAAO,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACnC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,IAAS;IAC7B,OAAO,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACjC,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore\";\n\nexport interface ArrayOfChainedDecorators {\n (...args: any): any;\n\n /**\n * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value `minItems` MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n */\n MinItems(minItems: number): this;\n\n /**\n * The value `maxItems` MUST be a non-negative integer.\n *\n * An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.\n *\n * :: warning\n * The value `maxItems` MUST be a non-negative integer.\n * :::\n */\n MaxItems(maxItems: number): this;\n\n /**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * The array instance will be valid against \"contains\" if at least one of its elements is valid against the given schema.\n */\n Contains(): this;\n\n /**\n * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.\n */\n UniqueItems(uniqueItems?: boolean): this;\n}\n\nexport interface MapOfChainedDecorators {\n (...args: any): any;\n\n /**\n * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n */\n MinProperties(minProperties: number): this;\n\n /**\n * An object instance is valid against `maxProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n */\n MaxProperties(maxProperties: number): this;\n}\n\nexport interface CollectionOfChainedDecorators extends MapOfChainedDecorators, ArrayOfChainedDecorators {}\n\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n * ::: warning\n * You mustn't use the `type Type = string | number` as parameters Type.\n *\n * This example doesn't work:\n *\n * ```typescript\n * type Type = \"string\" | \"number\"\n * class Model {\n * @CollectionOf(Type)\n * property: Type[];\n * }\n * ```\n * :::\n *\n * @param {Type<any>} type\n * @param collectionType\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionOf(type: any, collectionType?: any): CollectionOfChainedDecorators {\n const schema: any = {};\n let contains: boolean = false;\n\n const decorator = (...args: any) => {\n const store = JsonEntityStore.from(...args);\n // const itemSchema = store.itemSchema.toJSON();\n\n if (collectionType) {\n store.collectionType = collectionType;\n store.schema.type(collectionType);\n }\n\n store.type = type;\n // console.log(type);\n store.itemSchema.type(type);\n // console.log(store.itemSchema.getComputedType(), schema);\n // store.itemSchema.assign({...itemSchema, type});\n store.schema.assign(schema);\n\n if (store.isArray && contains) {\n store.schema.set(\"contains\", store.schema.get(\"items\"));\n store.schema.delete(\"items\");\n }\n };\n\n decorator.MinItems = (minItems: number) => {\n schema.minItems = minItems;\n\n return decorator;\n };\n\n decorator.MaxItems = (maxItems: number) => {\n schema.maxItems = maxItems;\n\n return decorator;\n };\n decorator.MinProperties = (minProperties: number) => {\n schema.minProperties = minProperties;\n\n return decorator;\n };\n\n decorator.MaxProperties = (maxProperties: number) => {\n schema.maxProperties = maxProperties;\n\n return decorator;\n };\n\n decorator.Contains = () => {\n contains = true;\n\n return decorator;\n };\n\n decorator.UniqueItems = (uniqueItems = true) => {\n schema.uniqueItems = uniqueItems;\n\n return decorator;\n };\n\n return decorator;\n}\n\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function ArrayOf(type: any): ArrayOfChainedDecorators {\n return CollectionOf(type, Array);\n}\n\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function MapOf(type: any): MapOfChainedDecorators {\n return CollectionOf(type, Map);\n}\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { JsonEntityFn } from "../common/jsonEntityFn";
|
|
2
|
+
/**
|
|
3
|
+
* The value `maxItems` MUST be a non-negative integer.
|
|
4
|
+
*
|
|
5
|
+
* An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.
|
|
6
|
+
*
|
|
7
|
+
* :: warning
|
|
8
|
+
* The value `maxItems` MUST be a non-negative integer.
|
|
9
|
+
* :::
|
|
10
|
+
*
|
|
11
|
+
* :: warning
|
|
12
|
+
* This decorator will be removed in v7.
|
|
13
|
+
* For v6 user, use @@MaxItems@@ from @tsed/schema instead of @tsed/common.
|
|
14
|
+
* :::
|
|
15
|
+
*
|
|
16
|
+
* ## Example
|
|
17
|
+
*
|
|
18
|
+
* ```typescript
|
|
19
|
+
* class Model {
|
|
20
|
+
* @CollectionOf(String)
|
|
21
|
+
* @MaxItems(10)
|
|
22
|
+
* property: string[];
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* Will produce:
|
|
27
|
+
*
|
|
28
|
+
* ```json
|
|
29
|
+
* {
|
|
30
|
+
* "type": "object",
|
|
31
|
+
* "properties": {
|
|
32
|
+
* "property": {
|
|
33
|
+
* "type": "number",
|
|
34
|
+
* "maxItems": 10
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @param {number} maxItems
|
|
41
|
+
* @decorator
|
|
42
|
+
* @validation
|
|
43
|
+
* @swagger
|
|
44
|
+
* @schema
|
|
45
|
+
* @input
|
|
46
|
+
* @collections
|
|
47
|
+
*/
|
|
48
|
+
export function MaxItems(maxItems) {
|
|
49
|
+
if (maxItems < 0) {
|
|
50
|
+
throw new Error("The value of maxItems MUST be a non-negative integer.");
|
|
51
|
+
}
|
|
52
|
+
return JsonEntityFn((storedJson) => {
|
|
53
|
+
storedJson.schema.maxItems(maxItems);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=maxItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maxItems.js","sourceRoot":"","sources":["../../../../src/decorators/collections/maxItems.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAgB;IACvC,IAAI,QAAQ,GAAG,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;IAED,OAAO,YAAY,CAAC,CAAC,UAAU,EAAE,EAAE;QACjC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * The value `maxItems` MUST be a non-negative integer.\n *\n * An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.\n *\n * :: warning\n * The value `maxItems` MUST be a non-negative integer.\n * :::\n *\n * :: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxItems@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MaxItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maxItems\": 10\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function MaxItems(maxItems: number) {\n if (maxItems < 0) {\n throw new Error(\"The value of maxItems MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((storedJson) => {\n storedJson.schema.maxItems(maxItems);\n });\n}\n"]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { JsonEntityFn } from "../common/jsonEntityFn";
|
|
2
|
+
/**
|
|
3
|
+
* An object instance is valid against `maxProperties` if its number of properties is less than, or equal to, the value of this keyword.
|
|
4
|
+
*
|
|
5
|
+
* ::: warning
|
|
6
|
+
* The value of this keyword MUST be a non-negative integer.
|
|
7
|
+
* :::
|
|
8
|
+
*
|
|
9
|
+
* ::: warning
|
|
10
|
+
* This decorator will be removed in v7.
|
|
11
|
+
* For v6 user, use @@MaxProperties@@ from @tsed/schema instead of @tsed/common.
|
|
12
|
+
* :::
|
|
13
|
+
*
|
|
14
|
+
* ## Example
|
|
15
|
+
* ### On prop
|
|
16
|
+
* ```typescript
|
|
17
|
+
* class Model {
|
|
18
|
+
* @MaxProperties(10)
|
|
19
|
+
* property: any;
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* Will produce:
|
|
24
|
+
*
|
|
25
|
+
* ```json
|
|
26
|
+
* {
|
|
27
|
+
* "type": "object",
|
|
28
|
+
* "properties": {
|
|
29
|
+
* "property": {
|
|
30
|
+
* "type": "any",
|
|
31
|
+
* "maxProperties": 10
|
|
32
|
+
* }
|
|
33
|
+
* }
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* ### On class
|
|
38
|
+
*
|
|
39
|
+
* ```typescript
|
|
40
|
+
* @MaxProperties(10)
|
|
41
|
+
* class Model {
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* Will produce:
|
|
46
|
+
*
|
|
47
|
+
* ```json
|
|
48
|
+
* {
|
|
49
|
+
* "type": "object",
|
|
50
|
+
* "maxProperties": 10
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* ### On Parameter
|
|
55
|
+
*
|
|
56
|
+
* ```typescript
|
|
57
|
+
*
|
|
58
|
+
* class Model {
|
|
59
|
+
* method(@Any() @MaxProperties(10) obj: any){}
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param {number} maxProperties The maximum properties allowed on the given object
|
|
64
|
+
* @decorator
|
|
65
|
+
* @validation
|
|
66
|
+
* @swagger
|
|
67
|
+
* @schema
|
|
68
|
+
* @input
|
|
69
|
+
* @collections
|
|
70
|
+
*/
|
|
71
|
+
export function MaxProperties(maxProperties) {
|
|
72
|
+
if (maxProperties < 0) {
|
|
73
|
+
throw new Error("The value of maxProperties MUST be a non-negative integer.");
|
|
74
|
+
}
|
|
75
|
+
return JsonEntityFn((store) => {
|
|
76
|
+
store.isCollection ? store.schema.maxProperties(maxProperties) : store.itemSchema.maxProperties(maxProperties);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=maxProperties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maxProperties.js","sourceRoot":"","sources":["../../../../src/decorators/collections/maxProperties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,MAAM,UAAU,aAAa,CAAC,aAAqB;IACjD,IAAI,aAAa,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;KAC/E;IAED,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IACjH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * An object instance is valid against `maxProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxProperties@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MaxProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"maxProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MaxProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"maxProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MaxProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} maxProperties The maximum properties allowed on the given object\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function MaxProperties(maxProperties: number) {\n if (maxProperties < 0) {\n throw new Error(\"The value of maxProperties MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.maxProperties(maxProperties) : store.itemSchema.maxProperties(maxProperties);\n });\n}\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { JsonEntityFn } from "../common/jsonEntityFn";
|
|
2
|
+
/**
|
|
3
|
+
* An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.
|
|
4
|
+
*
|
|
5
|
+
* ::: warning
|
|
6
|
+
* The value `minItems` MUST be a non-negative integer.
|
|
7
|
+
* :::
|
|
8
|
+
*
|
|
9
|
+
* ::: tip
|
|
10
|
+
* Omitting this keyword has the same behavior as a value of 0.
|
|
11
|
+
* :::
|
|
12
|
+
*
|
|
13
|
+
* ::: warning
|
|
14
|
+
* For v6 user, use @@MinItems@@ from @tsed/schema instead of @tsed/common.
|
|
15
|
+
* :::
|
|
16
|
+
*
|
|
17
|
+
* ## Example
|
|
18
|
+
*
|
|
19
|
+
* ```typescript
|
|
20
|
+
* class Model {
|
|
21
|
+
* @CollectionOf(String)
|
|
22
|
+
* @MinItems(10)
|
|
23
|
+
* property: string[];
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Will produce:
|
|
28
|
+
*
|
|
29
|
+
* ```json
|
|
30
|
+
* {
|
|
31
|
+
* "type": "object",
|
|
32
|
+
* "properties": {
|
|
33
|
+
* "property": {
|
|
34
|
+
* "type": "array",
|
|
35
|
+
* "minItems": 10,
|
|
36
|
+
* "items": {
|
|
37
|
+
* "type": "string"
|
|
38
|
+
* }
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @param {number} minItems
|
|
45
|
+
* @decorator
|
|
46
|
+
* @validation
|
|
47
|
+
* @swagger
|
|
48
|
+
* @schema
|
|
49
|
+
* @input
|
|
50
|
+
* @collections
|
|
51
|
+
*/
|
|
52
|
+
export function MinItems(minItems) {
|
|
53
|
+
if (minItems < 0) {
|
|
54
|
+
throw new Error("The value of minItems MUST be a non-negative integer.");
|
|
55
|
+
}
|
|
56
|
+
return JsonEntityFn((storedJson) => {
|
|
57
|
+
storedJson.schema.minItems(minItems);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=minItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minItems.js","sourceRoot":"","sources":["../../../../src/decorators/collections/minItems.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAgB;IACvC,IAAI,QAAQ,GAAG,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;IAED,OAAO,YAAY,CAAC,CAAC,UAAU,EAAE,EAAE;QACjC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value `minItems` MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinItems@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MinItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"minItems\": 10,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function MinItems(minItems: number) {\n if (minItems < 0) {\n throw new Error(\"The value of minItems MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((storedJson) => {\n storedJson.schema.minItems(minItems);\n });\n}\n"]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { JsonEntityFn } from "../common/jsonEntityFn";
|
|
2
|
+
/**
|
|
3
|
+
* An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.
|
|
4
|
+
*
|
|
5
|
+
* ::: warning
|
|
6
|
+
* The value of this keyword MUST be a non-negative integer.
|
|
7
|
+
* :::
|
|
8
|
+
*
|
|
9
|
+
* ::: warning
|
|
10
|
+
* For v6 user, use @@MinProperties@@ from @tsed/schema instead of @tsed/common.
|
|
11
|
+
* :::
|
|
12
|
+
*
|
|
13
|
+
* ## Example
|
|
14
|
+
* ### On prop
|
|
15
|
+
* ```typescript
|
|
16
|
+
* class Model {
|
|
17
|
+
* @MinProperties(10)
|
|
18
|
+
* property: any;
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* Will produce:
|
|
23
|
+
*
|
|
24
|
+
* ```json
|
|
25
|
+
* {
|
|
26
|
+
* "type": "object",
|
|
27
|
+
* "properties": {
|
|
28
|
+
* "property": {
|
|
29
|
+
* "type": "any",
|
|
30
|
+
* "minProperties": 10
|
|
31
|
+
* }
|
|
32
|
+
* }
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* ### On class
|
|
37
|
+
*
|
|
38
|
+
* ```typescript
|
|
39
|
+
* @MinProperties(10)
|
|
40
|
+
* class Model {
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* Will produce:
|
|
45
|
+
*
|
|
46
|
+
* ```json
|
|
47
|
+
* {
|
|
48
|
+
* "type": "object",
|
|
49
|
+
* "minProperties": 10
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* ### On Parameter
|
|
54
|
+
*
|
|
55
|
+
* ```typescript
|
|
56
|
+
*
|
|
57
|
+
* class Model {
|
|
58
|
+
* method(@Any() @MinProperties(10) obj: any){}
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @param {number} minProperties The minimum properties allowed on the object.
|
|
63
|
+
* @decorator
|
|
64
|
+
* @validation
|
|
65
|
+
* @swagger
|
|
66
|
+
* @schema
|
|
67
|
+
* @input
|
|
68
|
+
* @collections
|
|
69
|
+
*/
|
|
70
|
+
export function MinProperties(minProperties) {
|
|
71
|
+
if (minProperties < 0) {
|
|
72
|
+
throw new Error("The value of minProperties MUST be a non-negative integer.");
|
|
73
|
+
}
|
|
74
|
+
return JsonEntityFn((store) => {
|
|
75
|
+
store.isCollection ? store.schema.minProperties(minProperties) : store.itemSchema.minProperties(minProperties);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=minProperties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minProperties.js","sourceRoot":"","sources":["../../../../src/decorators/collections/minProperties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,MAAM,UAAU,aAAa,CAAC,aAAqB;IACjD,IAAI,aAAa,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;KAC/E;IAED,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IACjH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinProperties@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MinProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"minProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MinProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"minProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MinProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} minProperties The minimum properties allowed on the object.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function MinProperties(minProperties: number) {\n if (minProperties < 0) {\n throw new Error(\"The value of minProperties MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.minProperties(minProperties) : store.itemSchema.minProperties(minProperties);\n });\n}\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { JsonEntityFn } from "../common/jsonEntityFn";
|
|
2
|
+
/**
|
|
3
|
+
* If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.
|
|
4
|
+
*
|
|
5
|
+
* ::: warning
|
|
6
|
+
* For v6 user, use @@UniqueItems@@ from @tsed/schema instead of @tsed/common.
|
|
7
|
+
* :::
|
|
8
|
+
*
|
|
9
|
+
* ## Example
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* class Model {
|
|
13
|
+
* @UniqueItems() // default true
|
|
14
|
+
* property: number[];
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* * ```typescript
|
|
19
|
+
* class Model {
|
|
20
|
+
* @CollectionOf(String)
|
|
21
|
+
* @UniqueItems()
|
|
22
|
+
* property: string[];
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* Will produce:
|
|
27
|
+
*
|
|
28
|
+
* ```json
|
|
29
|
+
* {
|
|
30
|
+
* "type": "object",
|
|
31
|
+
* "properties": {
|
|
32
|
+
* "property": {
|
|
33
|
+
* "type": "array",
|
|
34
|
+
* "uniqueItems": true,
|
|
35
|
+
* "items": {
|
|
36
|
+
* "type": "string"
|
|
37
|
+
* }
|
|
38
|
+
* }
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @param {boolean} uniqueItems
|
|
44
|
+
* @decorator
|
|
45
|
+
* @validation
|
|
46
|
+
* @swagger
|
|
47
|
+
* @schema
|
|
48
|
+
* @input
|
|
49
|
+
* @collections
|
|
50
|
+
*/
|
|
51
|
+
export function UniqueItems(uniqueItems = true) {
|
|
52
|
+
return JsonEntityFn((store) => {
|
|
53
|
+
store.schema.uniqueItems(uniqueItems);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=uniqueItems.js.map
|