@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
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.anyMapper = void 0;
|
|
4
|
+
const JsonLazyRef_1 = require("../domain/JsonLazyRef");
|
|
5
|
+
const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
|
|
6
|
+
const generics_1 = require("../utils/generics");
|
|
7
|
+
const ref_1 = require("../utils/ref");
|
|
8
|
+
function anyMapper(input, options = {}) {
|
|
9
|
+
options.schemas = options.schemas || {};
|
|
10
|
+
if (typeof input !== "object" || input === null) {
|
|
11
|
+
return input;
|
|
12
|
+
}
|
|
13
|
+
if (input instanceof JsonLazyRef_1.JsonLazyRef) {
|
|
14
|
+
return (0, JsonSchemaMapperContainer_1.execMapper)("lazyRef", input, options);
|
|
15
|
+
}
|
|
16
|
+
if ("toJSON" in input) {
|
|
17
|
+
const schema = input.toJSON((0, generics_1.mapGenericsOptions)(options));
|
|
18
|
+
return input.canRef ? (0, ref_1.toRef)(input, schema, options) : schema;
|
|
19
|
+
}
|
|
20
|
+
return (0, JsonSchemaMapperContainer_1.execMapper)("object", input, options);
|
|
21
|
+
}
|
|
22
|
+
exports.anyMapper = anyMapper;
|
|
23
|
+
(0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("any", anyMapper);
|
|
24
|
+
//# sourceMappingURL=anyMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anyMapper.js","sourceRoot":"","sources":["../../../src/components/anyMapper.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAElD,uFAA6F;AAC7F,gDAAqD;AACrD,sCAAmC;AAEnC,SAAgB,SAAS,CAAC,KAAU,EAAE,UAA6B,EAAE;IACnE,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;IAExC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;QAC/C,OAAO,KAAK,CAAC;KACd;IAED,IAAI,KAAK,YAAY,yBAAW,EAAE;QAChC,OAAO,IAAA,sCAAU,EAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;KAC9C;IAED,IAAI,QAAQ,IAAI,KAAK,EAAE;QACrB,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAA,6BAAkB,EAAC,OAAO,CAAC,CAAC,CAAC;QAEzD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,WAAK,EAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;KAC9D;IAED,OAAO,IAAA,sCAAU,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAlBD,8BAkBC;AAED,IAAA,oDAAwB,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC","sourcesContent":["import {JsonLazyRef} from \"../domain/JsonLazyRef\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {mapGenericsOptions} from \"../utils/generics\";\nimport {toRef} from \"../utils/ref\";\n\nexport function anyMapper(input: any, options: JsonSchemaOptions = {}): any {\n options.schemas = options.schemas || {};\n\n if (typeof input !== \"object\" || input === null) {\n return input;\n }\n\n if (input instanceof JsonLazyRef) {\n return execMapper(\"lazyRef\", input, options);\n }\n\n if (\"toJSON\" in input) {\n const schema = input.toJSON(mapGenericsOptions(options));\n\n return input.canRef ? toRef(input, schema, options) : schema;\n }\n\n return execMapper(\"object\", input, options);\n}\n\nregisterJsonSchemaMapper(\"any\", anyMapper);\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.classMapper = void 0;
|
|
4
|
+
const JsonEntityStore_1 = require("../domain/JsonEntityStore");
|
|
5
|
+
const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
|
|
6
|
+
const generics_1 = require("../utils/generics");
|
|
7
|
+
const ref_1 = require("../utils/ref");
|
|
8
|
+
function classMapper(value, options = {}) {
|
|
9
|
+
const store = JsonEntityStore_1.JsonEntityStore.from(value.class);
|
|
10
|
+
const name = (0, ref_1.createRefName)(store.schema.getName() || value.getName(), options);
|
|
11
|
+
if (value.hasGenerics) {
|
|
12
|
+
// Inline generic
|
|
13
|
+
const { type, properties, additionalProperties, items, ...props } = value.toJSON(options);
|
|
14
|
+
const schema = {
|
|
15
|
+
...(0, JsonSchemaMapperContainer_1.execMapper)("any", store.schema, {
|
|
16
|
+
...options,
|
|
17
|
+
...(0, generics_1.popGenerics)(value),
|
|
18
|
+
root: false
|
|
19
|
+
}),
|
|
20
|
+
...props
|
|
21
|
+
};
|
|
22
|
+
if (schema.title) {
|
|
23
|
+
const name = (0, ref_1.createRefName)(schema.title, options);
|
|
24
|
+
options.schemas[name] = schema;
|
|
25
|
+
delete schema.title;
|
|
26
|
+
return (0, ref_1.createRef)(name, value, options);
|
|
27
|
+
}
|
|
28
|
+
return schema;
|
|
29
|
+
}
|
|
30
|
+
if (options.schemas && !options.schemas[name]) {
|
|
31
|
+
options.schemas[name] = {}; // avoid infinite calls
|
|
32
|
+
options.schemas[name] = (0, JsonSchemaMapperContainer_1.execMapper)("any", store.schema, (0, generics_1.mapGenericsOptions)({
|
|
33
|
+
...options,
|
|
34
|
+
root: false
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
return (0, ref_1.createRef)(name, value, options);
|
|
38
|
+
}
|
|
39
|
+
exports.classMapper = classMapper;
|
|
40
|
+
(0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("class", classMapper);
|
|
41
|
+
//# sourceMappingURL=classMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classMapper.js","sourceRoot":"","sources":["../../../src/components/classMapper.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAG1D,uFAA6F;AAC7F,gDAAkE;AAClE,sCAAsD;AAEtD,SAAgB,WAAW,CAAC,KAAiB,EAAE,UAA6B,EAAE;IAC5E,MAAM,KAAK,GAAG,iCAAe,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,IAAI,GAAG,IAAA,mBAAa,EAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAE/E,IAAI,KAAK,CAAC,WAAW,EAAE;QACrB,iBAAiB;QACjB,MAAM,EAAC,IAAI,EAAE,UAAU,EAAE,oBAAoB,EAAE,KAAK,EAAE,GAAG,KAAK,EAAC,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACxF,MAAM,MAAM,GAAG;YACb,GAAG,IAAA,sCAAU,EAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;gBACjC,GAAG,OAAO;gBACV,GAAG,IAAA,sBAAW,EAAC,KAAK,CAAC;gBACrB,IAAI,EAAE,KAAK;aACZ,CAAC;YACF,GAAG,KAAK;SACT,CAAC;QAEF,IAAI,MAAM,CAAC,KAAK,EAAE;YAChB,MAAM,IAAI,GAAG,IAAA,mBAAa,EAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YAClD,OAAO,CAAC,OAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;YAChC,OAAO,MAAM,CAAC,KAAK,CAAC;YAEpB,OAAO,IAAA,eAAS,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;SACxC;QAED,OAAO,MAAM,CAAC;KACf;IAED,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAC7C,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,uBAAuB;QACnD,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAA,sCAAU,EAChC,KAAK,EACL,KAAK,CAAC,MAAM,EACZ,IAAA,6BAAkB,EAAC;YACjB,GAAG,OAAO;YACV,IAAI,EAAE,KAAK;SACZ,CAAC,CACH,CAAC;KACH;IAED,OAAO,IAAA,eAAS,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AAxCD,kCAwCC;AAED,IAAA,oDAAwB,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import {JsonEntityStore} from \"../domain/JsonEntityStore\";\nimport {JsonSchema} from \"../domain/JsonSchema\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {mapGenericsOptions, popGenerics} from \"../utils/generics\";\nimport {createRef, createRefName} from \"../utils/ref\";\n\nexport function classMapper(value: JsonSchema, options: JsonSchemaOptions = {}) {\n const store = JsonEntityStore.from(value.class);\n const name = createRefName(store.schema.getName() || value.getName(), options);\n\n if (value.hasGenerics) {\n // Inline generic\n const {type, properties, additionalProperties, items, ...props} = value.toJSON(options);\n const schema = {\n ...execMapper(\"any\", store.schema, {\n ...options,\n ...popGenerics(value),\n root: false\n }),\n ...props\n };\n\n if (schema.title) {\n const name = createRefName(schema.title, options);\n options.schemas![name] = schema;\n delete schema.title;\n\n return createRef(name, value, options);\n }\n\n return schema;\n }\n\n if (options.schemas && !options.schemas[name]) {\n options.schemas[name] = {}; // avoid infinite calls\n options.schemas[name] = execMapper(\n \"any\",\n store.schema,\n mapGenericsOptions({\n ...options,\n root: false\n })\n );\n }\n\n return createRef(name, value, options);\n}\n\nregisterJsonSchemaMapper(\"class\", classMapper);\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.genericsMapper = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const JsonEntityStore_1 = require("../domain/JsonEntityStore");
|
|
6
|
+
const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
|
|
7
|
+
const generics_1 = require("../utils/generics");
|
|
8
|
+
const getJsonType_1 = require("../utils/getJsonType");
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
function genericsMapper(obj, options) {
|
|
13
|
+
const { generics } = options;
|
|
14
|
+
if (generics && obj.$ref) {
|
|
15
|
+
if (generics.has(obj.$ref)) {
|
|
16
|
+
let type = generics.get(obj.$ref);
|
|
17
|
+
if ((0, core_1.isPrimitiveClass)(type)) {
|
|
18
|
+
return {
|
|
19
|
+
type: (0, getJsonType_1.getJsonType)(type)
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
if (type === Date) {
|
|
23
|
+
return {
|
|
24
|
+
type: "string",
|
|
25
|
+
format: "date-time"
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
if (type.toJSON) {
|
|
29
|
+
return type.toJSON({
|
|
30
|
+
...options,
|
|
31
|
+
generics: undefined
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
if (type === Object) {
|
|
35
|
+
return {
|
|
36
|
+
type: "object"
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if ((0, core_1.isClass)(type)) {
|
|
40
|
+
const model = {
|
|
41
|
+
class: type
|
|
42
|
+
};
|
|
43
|
+
if (options.nestedGenerics.length === 0) {
|
|
44
|
+
return (0, JsonSchemaMapperContainer_1.execMapper)("class", model, {
|
|
45
|
+
...options,
|
|
46
|
+
generics: undefined
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
const store = JsonEntityStore_1.JsonEntityStore.from(model.class);
|
|
50
|
+
return (0, JsonSchemaMapperContainer_1.execMapper)("schema", store.schema, {
|
|
51
|
+
...options,
|
|
52
|
+
...(0, generics_1.popGenerics)(options),
|
|
53
|
+
root: false
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return obj;
|
|
59
|
+
}
|
|
60
|
+
exports.genericsMapper = genericsMapper;
|
|
61
|
+
(0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("generics", genericsMapper);
|
|
62
|
+
//# sourceMappingURL=genericsMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genericsMapper.js","sourceRoot":"","sources":["../../../src/components/genericsMapper.ts"],"names":[],"mappings":";;;AAAA,qCAAqD;AACrD,+DAA0D;AAC1D,uFAA6F;AAC7F,gDAA+D;AAC/D,sDAAiD;AAEjD;;GAEG;AACH,SAAgB,cAAc,CAAC,GAAQ,EAAE,OAAwB;IAC/D,MAAM,EAAC,QAAQ,EAAC,GAAG,OAAO,CAAC;IAE3B,IAAI,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE;QACxB,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC1B,IAAI,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAElC,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;gBAC1B,OAAO;oBACL,IAAI,EAAE,IAAA,yBAAW,EAAC,IAAI,CAAC;iBACxB,CAAC;aACH;YAED,IAAI,IAAI,KAAK,IAAI,EAAE;gBACjB,OAAO;oBACL,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,WAAW;iBACpB,CAAC;aACH;YAED,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,OAAO,IAAI,CAAC,MAAM,CAAC;oBACjB,GAAG,OAAO;oBACV,QAAQ,EAAE,SAAS;iBACpB,CAAC,CAAC;aACJ;YAED,IAAI,IAAI,KAAK,MAAM,EAAE;gBACnB,OAAO;oBACL,IAAI,EAAE,QAAQ;iBACf,CAAC;aACH;YAED,IAAI,IAAA,cAAO,EAAC,IAAI,CAAC,EAAE;gBACjB,MAAM,KAAK,GAAG;oBACZ,KAAK,EAAE,IAAI;iBACZ,CAAC;gBAEF,IAAI,OAAO,CAAC,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE;oBACvC,OAAO,IAAA,sCAAU,EAAC,OAAO,EAAE,KAAY,EAAE;wBACvC,GAAG,OAAO;wBACV,QAAQ,EAAE,SAAS;qBACpB,CAAC,CAAC;iBACJ;gBAED,MAAM,KAAK,GAAG,iCAAe,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAEhD,OAAO,IAAA,sCAAU,EAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE;oBACxC,GAAG,OAAO;oBACV,GAAG,IAAA,sBAAW,EAAC,OAAO,CAAC;oBACvB,IAAI,EAAE,KAAK;iBACZ,CAAC,CAAC;aACJ;SACF;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAzDD,wCAyDC;AAED,IAAA,oDAAwB,EAAC,UAAU,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {isClass, isPrimitiveClass} from \"@tsed/core\";\nimport {JsonEntityStore} from \"../domain/JsonEntityStore\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {GenericsContext, popGenerics} from \"../utils/generics\";\nimport {getJsonType} from \"../utils/getJsonType\";\n\n/**\n * @ignore\n */\nexport function genericsMapper(obj: any, options: GenericsContext) {\n const {generics} = options;\n\n if (generics && obj.$ref) {\n if (generics.has(obj.$ref)) {\n let type = generics.get(obj.$ref);\n\n if (isPrimitiveClass(type)) {\n return {\n type: getJsonType(type)\n };\n }\n\n if (type === Date) {\n return {\n type: \"string\",\n format: \"date-time\"\n };\n }\n\n if (type.toJSON) {\n return type.toJSON({\n ...options,\n generics: undefined\n });\n }\n\n if (type === Object) {\n return {\n type: \"object\"\n };\n }\n\n if (isClass(type)) {\n const model = {\n class: type\n };\n\n if (options.nestedGenerics.length === 0) {\n return execMapper(\"class\", model as any, {\n ...options,\n generics: undefined\n });\n }\n\n const store = JsonEntityStore.from(model.class);\n\n return execMapper(\"schema\", store.schema, {\n ...options,\n ...popGenerics(options),\n root: false\n });\n }\n }\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"generics\", genericsMapper);\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
(0, tslib_1.__exportStar)(require("./anyMapper"), exports);
|
|
5
|
+
(0, tslib_1.__exportStar)(require("./classMapper"), exports);
|
|
6
|
+
(0, tslib_1.__exportStar)(require("./genericsMapper"), exports);
|
|
7
|
+
(0, tslib_1.__exportStar)(require("./inheritedClassMapper"), exports);
|
|
8
|
+
(0, tslib_1.__exportStar)(require("./itemMapper"), exports);
|
|
9
|
+
(0, tslib_1.__exportStar)(require("./lazyRefMapper"), exports);
|
|
10
|
+
(0, tslib_1.__exportStar)(require("./mapMapper"), exports);
|
|
11
|
+
(0, tslib_1.__exportStar)(require("./objectMapper"), exports);
|
|
12
|
+
(0, tslib_1.__exportStar)(require("./schemaMapper"), exports);
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,2DAA4B;AAC5B,6DAA8B;AAC9B,gEAAiC;AACjC,sEAAuC;AACvC,4DAA6B;AAC7B,+DAAgC;AAChC,2DAA4B;AAC5B,8DAA+B;AAC/B,8DAA+B","sourcesContent":["export * from \"./anyMapper\";\nexport * from \"./classMapper\";\nexport * from \"./genericsMapper\";\nexport * from \"./inheritedClassMapper\";\nexport * from \"./itemMapper\";\nexport * from \"./lazyRefMapper\";\nexport * from \"./mapMapper\";\nexport * from \"./objectMapper\";\nexport * from \"./schemaMapper\";\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inheritedClassMapper = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
|
|
6
|
+
const getInheritedStores_1 = require("../utils/getInheritedStores");
|
|
7
|
+
/**
|
|
8
|
+
* @ignore
|
|
9
|
+
*/
|
|
10
|
+
function inheritedClassMapper(obj, { target, ...options } = {}) {
|
|
11
|
+
const stores = Array.from((0, getInheritedStores_1.getInheritedStores)(target).entries()).filter(([model]) => (0, core_1.classOf)(model) !== (0, core_1.classOf)(target));
|
|
12
|
+
if (stores.length) {
|
|
13
|
+
const schema = stores.reduce((obj, [, store]) => {
|
|
14
|
+
return (0, core_1.deepMerge)(obj, (0, JsonSchemaMapperContainer_1.execMapper)("schema", store.schema, options));
|
|
15
|
+
}, {});
|
|
16
|
+
obj = (0, core_1.deepMerge)(schema, obj);
|
|
17
|
+
}
|
|
18
|
+
return obj;
|
|
19
|
+
}
|
|
20
|
+
exports.inheritedClassMapper = inheritedClassMapper;
|
|
21
|
+
(0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("inheritedClass", inheritedClassMapper);
|
|
22
|
+
//# sourceMappingURL=inheritedClassMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inheritedClassMapper.js","sourceRoot":"","sources":["../../../src/components/inheritedClassMapper.ts"],"names":[],"mappings":";;;AAAA,qCAA8C;AAE9C,uFAA6F;AAC7F,oEAA+D;AAE/D;;GAEG;AACH,SAAgB,oBAAoB,CAAC,GAAQ,EAAE,EAAC,MAAM,EAAE,GAAG,OAAO,KAAuB,EAAE;IACzF,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,IAAA,uCAAkB,EAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAA,cAAO,EAAC,KAAK,CAAC,KAAK,IAAA,cAAO,EAAC,MAAM,CAAC,CAAC,CAAC;IAExH,IAAI,MAAM,CAAC,MAAM,EAAE;QACjB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE;YAC9C,OAAO,IAAA,gBAAS,EAAC,GAAG,EAAE,IAAA,sCAAU,EAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QACrE,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,GAAG,GAAG,IAAA,gBAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC9B;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAZD,oDAYC;AAED,IAAA,oDAAwB,EAAC,gBAAgB,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import {classOf, deepMerge} from \"@tsed/core\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {getInheritedStores} from \"../utils/getInheritedStores\";\n\n/**\n * @ignore\n */\nexport function inheritedClassMapper(obj: any, {target, ...options}: JsonSchemaOptions = {}) {\n const stores = Array.from(getInheritedStores(target).entries()).filter(([model]) => classOf(model) !== classOf(target));\n\n if (stores.length) {\n const schema = stores.reduce((obj, [, store]) => {\n return deepMerge(obj, execMapper(\"schema\", store.schema, options));\n }, {});\n\n obj = deepMerge(schema, obj);\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"inheritedClass\", inheritedClassMapper);\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.itemMapper = void 0;
|
|
4
|
+
const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
|
|
5
|
+
function itemMapper(value, options) {
|
|
6
|
+
return value && value.isClass ? (0, JsonSchemaMapperContainer_1.execMapper)("class", value, options) : (0, JsonSchemaMapperContainer_1.execMapper)("any", value, options);
|
|
7
|
+
}
|
|
8
|
+
exports.itemMapper = itemMapper;
|
|
9
|
+
(0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("item", itemMapper);
|
|
10
|
+
//# sourceMappingURL=itemMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itemMapper.js","sourceRoot":"","sources":["../../../src/components/itemMapper.ts"],"names":[],"mappings":";;;AACA,uFAA6F;AAE7F,SAAgB,UAAU,CAAC,KAAU,EAAE,OAA0B;IAC/D,OAAO,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,sCAAU,EAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAA,sCAAU,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC1G,CAAC;AAFD,gCAEC;AAED,IAAA,oDAAwB,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC","sourcesContent":["import {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\n\nexport function itemMapper(value: any, options: JsonSchemaOptions) {\n return value && value.isClass ? execMapper(\"class\", value, options) : execMapper(\"any\", value, options);\n}\n\nregisterJsonSchemaMapper(\"item\", itemMapper);\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lazyRefMapper = void 0;
|
|
4
|
+
const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
|
|
5
|
+
const generics_1 = require("../utils/generics");
|
|
6
|
+
const ref_1 = require("../utils/ref");
|
|
7
|
+
function lazyRefMapper(input, options) {
|
|
8
|
+
var _a;
|
|
9
|
+
const name = input.name;
|
|
10
|
+
if ((_a = options.$refs) === null || _a === void 0 ? void 0 : _a.find((t) => t === input.target)) {
|
|
11
|
+
return (0, ref_1.createRef)(name, input.schema, options);
|
|
12
|
+
}
|
|
13
|
+
options.$refs = [...(options.$refs || []), input.target];
|
|
14
|
+
const schema = input.toJSON((0, generics_1.mapGenericsOptions)(options));
|
|
15
|
+
return (0, ref_1.toRef)(input.schema, schema, options);
|
|
16
|
+
}
|
|
17
|
+
exports.lazyRefMapper = lazyRefMapper;
|
|
18
|
+
(0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("lazyRef", lazyRefMapper);
|
|
19
|
+
//# sourceMappingURL=lazyRefMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazyRefMapper.js","sourceRoot":"","sources":["../../../src/components/lazyRefMapper.ts"],"names":[],"mappings":";;;AAEA,uFAAiF;AACjF,gDAAqD;AACrD,sCAA8C;AAE9C,SAAgB,aAAa,CAAC,KAAkB,EAAE,OAA0B;;IAC1E,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IAExB,IAAI,MAAA,OAAO,CAAC,KAAK,0CAAE,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,EAAE;QACvD,OAAO,IAAA,eAAS,EAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/C;IAED,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAA,6BAAkB,EAAC,OAAO,CAAC,CAAC,CAAC;IAEzD,OAAO,IAAA,WAAK,EAAC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAZD,sCAYC;AAED,IAAA,oDAAwB,EAAC,SAAS,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import {JsonLazyRef} from \"../domain/JsonLazyRef\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {mapGenericsOptions} from \"../utils/generics\";\nimport {createRef, toRef} from \"../utils/ref\";\n\nexport function lazyRefMapper(input: JsonLazyRef, options: JsonSchemaOptions) {\n const name = input.name;\n\n if (options.$refs?.find((t: any) => t === input.target)) {\n return createRef(name, input.schema, options);\n }\n\n options.$refs = [...(options.$refs || []), input.target];\n\n const schema = input.toJSON(mapGenericsOptions(options));\n\n return toRef(input.schema, schema, options);\n}\n\nregisterJsonSchemaMapper(\"lazyRef\", lazyRefMapper);\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapMapper = void 0;
|
|
4
|
+
const generics_1 = require("../utils/generics");
|
|
5
|
+
const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
|
|
6
|
+
/**
|
|
7
|
+
* Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.
|
|
8
|
+
* @param input
|
|
9
|
+
* @param ignore
|
|
10
|
+
* @param options
|
|
11
|
+
* @ignore
|
|
12
|
+
*/
|
|
13
|
+
function mapMapper(input, { ignore = [], ...options } = {}) {
|
|
14
|
+
options = (0, generics_1.mapGenericsOptions)(options);
|
|
15
|
+
return Array.from(input.entries()).reduce((obj, [key, value]) => {
|
|
16
|
+
if (ignore.includes(key)) {
|
|
17
|
+
return obj;
|
|
18
|
+
}
|
|
19
|
+
obj[key] = (0, JsonSchemaMapperContainer_1.execMapper)("item", value, options);
|
|
20
|
+
return obj;
|
|
21
|
+
}, {});
|
|
22
|
+
}
|
|
23
|
+
exports.mapMapper = mapMapper;
|
|
24
|
+
(0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("map", mapMapper);
|
|
25
|
+
//# sourceMappingURL=mapMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapMapper.js","sourceRoot":"","sources":["../../../src/components/mapMapper.ts"],"names":[],"mappings":";;;AAAA,gDAAqD;AAErD,uFAA6F;AAE7F;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,KAAuB,EAAE,EAAC,MAAM,GAAG,EAAE,EAAE,GAAG,OAAO,KAAuB,EAAE;IAClG,OAAO,GAAG,IAAA,6BAAkB,EAAC,OAAO,CAAC,CAAC;IAEtC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACnE,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACxB,OAAO,GAAG,CAAC;SACZ;QAED,GAAG,CAAC,GAAG,CAAC,GAAG,IAAA,sCAAU,EAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAC9C,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAXD,8BAWC;AAED,IAAA,oDAAwB,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC","sourcesContent":["import {mapGenericsOptions} from \"../utils/generics\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\n\n/**\n * Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.\n * @param input\n * @param ignore\n * @param options\n * @ignore\n */\nexport function mapMapper(input: Map<string, any>, {ignore = [], ...options}: JsonSchemaOptions = {}): any {\n options = mapGenericsOptions(options);\n\n return Array.from(input.entries()).reduce((obj: any, [key, value]) => {\n if (ignore.includes(key)) {\n return obj;\n }\n\n obj[key] = execMapper(\"item\", value, options);\n return obj;\n }, {});\n}\n\nregisterJsonSchemaMapper(\"map\", mapMapper);\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.objectMapper = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const alterIgnore_1 = require("../hooks/alterIgnore");
|
|
6
|
+
const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
|
|
7
|
+
/**
|
|
8
|
+
* Serialize Any object to a json schema
|
|
9
|
+
* @param input
|
|
10
|
+
* @param options
|
|
11
|
+
* @ignore
|
|
12
|
+
*/
|
|
13
|
+
function objectMapper(input, options) {
|
|
14
|
+
const { specType, operationIdFormatter, root, schemas, genericTypes, nestedGenerics, useAlias, genericLabels, ...ctx } = options;
|
|
15
|
+
return Object.entries(input).reduce((obj, [key, value]) => {
|
|
16
|
+
if (options.withIgnoredProps !== false && !(0, alterIgnore_1.alterIgnore)(value, ctx)) {
|
|
17
|
+
// remove groups to avoid bad schema generation over children models
|
|
18
|
+
obj[key] = (0, JsonSchemaMapperContainer_1.execMapper)("item", value, { ...options, groups: (value === null || value === void 0 ? void 0 : value.$forwardGroups) ? options.groups : undefined });
|
|
19
|
+
}
|
|
20
|
+
return obj;
|
|
21
|
+
}, (0, core_1.isArray)(input) ? [] : {});
|
|
22
|
+
}
|
|
23
|
+
exports.objectMapper = objectMapper;
|
|
24
|
+
(0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("object", objectMapper);
|
|
25
|
+
//# sourceMappingURL=objectMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectMapper.js","sourceRoot":"","sources":["../../../src/components/objectMapper.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AAEnC,sDAAiD;AAEjD,uFAA6F;AAE7F;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,KAAU,EAAE,OAA0B;IACjE,MAAM,EAAC,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,GAAG,EAAC,GAAG,OAAO,CAAC;IAE/H,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CACjC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAA6B,EAAE,EAAE;QAChD,IAAI,OAAO,CAAC,gBAAgB,KAAK,KAAK,IAAI,CAAC,IAAA,yBAAW,EAAC,KAAK,EAAE,GAAG,CAAC,EAAE;YAClE,oEAAoE;YACpE,GAAG,CAAC,GAAG,CAAC,GAAG,IAAA,sCAAU,EAAC,MAAM,EAAE,KAAK,EAAE,EAAC,GAAG,OAAO,EAAE,MAAM,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,EAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAAC,CAAC,CAAC;SAChH;QAED,OAAO,GAAG,CAAC;IACb,CAAC,EACD,IAAA,cAAO,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CACzB,CAAC;AACJ,CAAC;AAdD,oCAcC;AAED,IAAA,oDAAwB,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import {isArray} from \"@tsed/core\";\nimport {JsonSchema} from \"../domain/JsonSchema\";\nimport {alterIgnore} from \"../hooks/alterIgnore\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\n\n/**\n * Serialize Any object to a json schema\n * @param input\n * @param options\n * @ignore\n */\nexport function objectMapper(input: any, options: JsonSchemaOptions) {\n const {specType, operationIdFormatter, root, schemas, genericTypes, nestedGenerics, useAlias, genericLabels, ...ctx} = options;\n\n return Object.entries(input).reduce<any>(\n (obj, [key, value]: [string, any | JsonSchema]) => {\n if (options.withIgnoredProps !== false && !alterIgnore(value, ctx)) {\n // remove groups to avoid bad schema generation over children models\n obj[key] = execMapper(\"item\", value, {...options, groups: value?.$forwardGroups ? options.groups : undefined});\n }\n\n return obj;\n },\n isArray(input) ? [] : {}\n );\n}\n\nregisterJsonSchemaMapper(\"object\", objectMapper);\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schemaMapper = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const JsonAliasMap_1 = require("../domain/JsonAliasMap");
|
|
6
|
+
const SpecTypes_1 = require("../domain/SpecTypes");
|
|
7
|
+
const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
|
|
8
|
+
const getRequiredProperties_1 = require("../utils/getRequiredProperties");
|
|
9
|
+
const mapNullableType_1 = require("../utils/mapNullableType");
|
|
10
|
+
/**
|
|
11
|
+
* @ignore
|
|
12
|
+
*/
|
|
13
|
+
const IGNORES = ["name", "$required", "$hooks", "_nestedGenerics", SpecTypes_1.SpecTypes.OPENAPI, SpecTypes_1.SpecTypes.SWAGGER, SpecTypes_1.SpecTypes.JSON];
|
|
14
|
+
/**
|
|
15
|
+
* @ignore
|
|
16
|
+
*/
|
|
17
|
+
const IGNORES_OPENSPEC = ["const"];
|
|
18
|
+
const IGNORES_OS2 = ["writeOnly", "readOnly"];
|
|
19
|
+
/**
|
|
20
|
+
* @ignore
|
|
21
|
+
*/
|
|
22
|
+
function isEmptyProperties(key, value) {
|
|
23
|
+
return typeof value === "object" && ["items", "properties", "additionalProperties"].includes(key) && Object.keys(value).length === 0;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @ignore
|
|
27
|
+
*/
|
|
28
|
+
function shouldMapAlias(key, value, useAlias) {
|
|
29
|
+
return typeof value === "object" && useAlias && ["properties", "additionalProperties"].includes(key);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @ignore
|
|
33
|
+
*/
|
|
34
|
+
function shouldSkipKey(key, { specType = SpecTypes_1.SpecTypes.JSON, customKeys = false }) {
|
|
35
|
+
return (IGNORES.includes(key) ||
|
|
36
|
+
(key.startsWith("#") && (customKeys === false || specType !== SpecTypes_1.SpecTypes.JSON)) ||
|
|
37
|
+
(specType === SpecTypes_1.SpecTypes.SWAGGER && IGNORES_OS2.includes(key)) ||
|
|
38
|
+
(specType !== SpecTypes_1.SpecTypes.JSON && IGNORES_OPENSPEC.includes(key)));
|
|
39
|
+
}
|
|
40
|
+
function schemaMapper(schema, options = {}) {
|
|
41
|
+
const { useAlias = true, schemas = {}, genericTypes } = options;
|
|
42
|
+
let obj = [...schema.entries()].reduce((item, [key, value]) => {
|
|
43
|
+
if (shouldSkipKey(key, options)) {
|
|
44
|
+
return item;
|
|
45
|
+
}
|
|
46
|
+
key = key.replace(/^#/, "");
|
|
47
|
+
if (key === "type") {
|
|
48
|
+
value = schema.getJsonType();
|
|
49
|
+
}
|
|
50
|
+
if (key === "examples" && (0, core_1.isObject)(value) && [SpecTypes_1.SpecTypes.OPENAPI, SpecTypes_1.SpecTypes.SWAGGER].includes(options.specType)) {
|
|
51
|
+
key = "example";
|
|
52
|
+
value = Object.values(value)[0];
|
|
53
|
+
}
|
|
54
|
+
if (value) {
|
|
55
|
+
if (value.isClass) {
|
|
56
|
+
value = (0, JsonSchemaMapperContainer_1.execMapper)("class", value, {
|
|
57
|
+
...options,
|
|
58
|
+
useAlias,
|
|
59
|
+
schemas
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
value = (0, JsonSchemaMapperContainer_1.execMapper)("any", value, {
|
|
64
|
+
...options,
|
|
65
|
+
useAlias,
|
|
66
|
+
schemas,
|
|
67
|
+
genericTypes,
|
|
68
|
+
genericLabels: schema.genericLabels
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (isEmptyProperties(key, value)) {
|
|
73
|
+
return item;
|
|
74
|
+
}
|
|
75
|
+
if (shouldMapAlias(key, value, useAlias)) {
|
|
76
|
+
value = (0, JsonAliasMap_1.mapAliasedProperties)(value, schema.alias);
|
|
77
|
+
}
|
|
78
|
+
item[key] = value;
|
|
79
|
+
return item;
|
|
80
|
+
}, {});
|
|
81
|
+
if (schema.isClass) {
|
|
82
|
+
obj = (0, JsonSchemaMapperContainer_1.execMapper)("inheritedClass", obj, { ...options, root: false, schemas, target: schema.getComputedType() });
|
|
83
|
+
}
|
|
84
|
+
obj = (0, JsonSchemaMapperContainer_1.execMapper)("generics", obj, { ...options, root: false, schemas });
|
|
85
|
+
if (schema.has(options.specType)) {
|
|
86
|
+
obj = {
|
|
87
|
+
...obj,
|
|
88
|
+
...schema.get(options.specType).toJSON(options)
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
obj = (0, getRequiredProperties_1.getRequiredProperties)(obj, schema, { ...options, useAlias });
|
|
92
|
+
obj = (0, mapNullableType_1.mapNullableType)(obj, schema, options);
|
|
93
|
+
if ((obj.oneOf || obj.allOf || obj.anyOf) && !(obj.items || obj.properties)) {
|
|
94
|
+
delete obj.type;
|
|
95
|
+
}
|
|
96
|
+
return obj;
|
|
97
|
+
}
|
|
98
|
+
exports.schemaMapper = schemaMapper;
|
|
99
|
+
(0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("schema", schemaMapper);
|
|
100
|
+
//# sourceMappingURL=schemaMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaMapper.js","sourceRoot":"","sources":["../../../src/components/schemaMapper.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AACpC,yDAA4D;AAE5D,mDAA8C;AAE9C,uFAA6F;AAC7F,0EAAqE;AACrE,8DAAyD;AAEzD;;GAEG;AACH,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,iBAAiB,EAAE,qBAAS,CAAC,OAAO,EAAE,qBAAS,CAAC,OAAO,EAAE,qBAAS,CAAC,IAAI,CAAC,CAAC;AACzH;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,OAAO,CAAC,CAAC;AACnC,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;AAE9C;;GAEG;AACH,SAAS,iBAAiB,CAAC,GAAW,EAAE,KAAU;IAChD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACvI,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,GAAW,EAAE,KAAU,EAAE,QAAiB;IAChE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,IAAI,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACvG,CAAC;AAED;;GAEG;AACH,SAAS,aAAa,CAAC,GAAW,EAAE,EAAC,QAAQ,GAAG,qBAAS,CAAC,IAAI,EAAE,UAAU,GAAG,KAAK,EAAoB;IACpG,OAAO,CACL,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;QACrB,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,KAAK,KAAK,IAAI,QAAQ,KAAK,qBAAS,CAAC,IAAI,CAAC,CAAC;QAC9E,CAAC,QAAQ,KAAK,qBAAS,CAAC,OAAO,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC7D,CAAC,QAAQ,KAAK,qBAAS,CAAC,IAAI,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAChE,CAAC;AACJ,CAAC;AAED,SAAgB,YAAY,CAAC,MAAkB,EAAE,UAA6B,EAAE;IAC9E,MAAM,EAAC,QAAQ,GAAG,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE,YAAY,EAAC,GAAG,OAAO,CAAC;IAE9D,IAAI,GAAG,GAAQ,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAS,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACtE,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE;YAC/B,OAAO,IAAI,CAAC;SACb;QAED,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAE5B,IAAI,GAAG,KAAK,MAAM,EAAE;YAClB,KAAK,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;SAC9B;QAED,IAAI,GAAG,KAAK,UAAU,IAAI,IAAA,eAAQ,EAAC,KAAK,CAAC,IAAI,CAAC,qBAAS,CAAC,OAAO,EAAE,qBAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAS,CAAC,EAAE;YAC/G,GAAG,GAAG,SAAS,CAAC;YAChB,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACjC;QAED,IAAI,KAAK,EAAE;YACT,IAAI,KAAK,CAAC,OAAO,EAAE;gBACjB,KAAK,GAAG,IAAA,sCAAU,EAAC,OAAO,EAAE,KAAK,EAAE;oBACjC,GAAG,OAAO;oBACV,QAAQ;oBACR,OAAO;iBACR,CAAC,CAAC;aACJ;iBAAM;gBACL,KAAK,GAAG,IAAA,sCAAU,EAAC,KAAK,EAAE,KAAK,EAAE;oBAC/B,GAAG,OAAO;oBACV,QAAQ;oBACR,OAAO;oBACP,YAAY;oBACZ,aAAa,EAAE,MAAM,CAAC,aAAa;iBACpC,CAAC,CAAC;aACJ;SACF;QAED,IAAI,iBAAiB,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE;YACjC,OAAO,IAAI,CAAC;SACb;QAED,IAAI,cAAc,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE;YACxC,KAAK,GAAG,IAAA,mCAAoB,EAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;SACnD;QAED,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAElB,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,MAAM,CAAC,OAAO,EAAE;QAClB,GAAG,GAAG,IAAA,sCAAU,EAAC,gBAAgB,EAAE,GAAG,EAAE,EAAC,GAAG,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,EAAC,CAAC,CAAC;KAC/G;IAED,GAAG,GAAG,IAAA,sCAAU,EAAC,UAAU,EAAE,GAAG,EAAE,EAAC,GAAG,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAQ,CAAC,CAAC;IAE7E,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,QAAkB,CAAC,EAAE;QAC1C,GAAG,GAAG;YACJ,GAAG,GAAG;YACN,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,QAAkB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;SAC1D,CAAC;KACH;IAED,GAAG,GAAG,IAAA,6CAAqB,EAAC,GAAG,EAAE,MAAM,EAAE,EAAC,GAAG,OAAO,EAAE,QAAQ,EAAC,CAAC,CAAC;IACjE,GAAG,GAAG,IAAA,iCAAe,EAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAE5C,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,UAAU,CAAC,EAAE;QAC3E,OAAO,GAAG,CAAC,IAAI,CAAC;KACjB;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAvED,oCAuEC;AAED,IAAA,oDAAwB,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import {isObject} from \"@tsed/core\";\nimport {mapAliasedProperties} from \"../domain/JsonAliasMap\";\nimport {JsonSchema} from \"../domain/JsonSchema\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {getRequiredProperties} from \"../utils/getRequiredProperties\";\nimport {mapNullableType} from \"../utils/mapNullableType\";\n\n/**\n * @ignore\n */\nconst IGNORES = [\"name\", \"$required\", \"$hooks\", \"_nestedGenerics\", SpecTypes.OPENAPI, SpecTypes.SWAGGER, SpecTypes.JSON];\n/**\n * @ignore\n */\nconst IGNORES_OPENSPEC = [\"const\"];\nconst IGNORES_OS2 = [\"writeOnly\", \"readOnly\"];\n\n/**\n * @ignore\n */\nfunction isEmptyProperties(key: string, value: any) {\n return typeof value === \"object\" && [\"items\", \"properties\", \"additionalProperties\"].includes(key) && Object.keys(value).length === 0;\n}\n\n/**\n * @ignore\n */\nfunction shouldMapAlias(key: string, value: any, useAlias: boolean) {\n return typeof value === \"object\" && useAlias && [\"properties\", \"additionalProperties\"].includes(key);\n}\n\n/**\n * @ignore\n */\nfunction shouldSkipKey(key: string, {specType = SpecTypes.JSON, customKeys = false}: JsonSchemaOptions) {\n return (\n IGNORES.includes(key) ||\n (key.startsWith(\"#\") && (customKeys === false || specType !== SpecTypes.JSON)) ||\n (specType === SpecTypes.SWAGGER && IGNORES_OS2.includes(key)) ||\n (specType !== SpecTypes.JSON && IGNORES_OPENSPEC.includes(key))\n );\n}\n\nexport function schemaMapper(schema: JsonSchema, options: JsonSchemaOptions = {}): any {\n const {useAlias = true, schemas = {}, genericTypes} = options;\n\n let obj: any = [...schema.entries()].reduce((item: any, [key, value]) => {\n if (shouldSkipKey(key, options)) {\n return item;\n }\n\n key = key.replace(/^#/, \"\");\n\n if (key === \"type\") {\n value = schema.getJsonType();\n }\n\n if (key === \"examples\" && isObject(value) && [SpecTypes.OPENAPI, SpecTypes.SWAGGER].includes(options.specType!)) {\n key = \"example\";\n value = Object.values(value)[0];\n }\n\n if (value) {\n if (value.isClass) {\n value = execMapper(\"class\", value, {\n ...options,\n useAlias,\n schemas\n });\n } else {\n value = execMapper(\"any\", value, {\n ...options,\n useAlias,\n schemas,\n genericTypes,\n genericLabels: schema.genericLabels\n });\n }\n }\n\n if (isEmptyProperties(key, value)) {\n return item;\n }\n\n if (shouldMapAlias(key, value, useAlias)) {\n value = mapAliasedProperties(value, schema.alias);\n }\n\n item[key] = value;\n\n return item;\n }, {});\n\n if (schema.isClass) {\n obj = execMapper(\"inheritedClass\", obj, {...options, root: false, schemas, target: schema.getComputedType()});\n }\n\n obj = execMapper(\"generics\", obj, {...options, root: false, schemas} as any);\n\n if (schema.has(options.specType as string)) {\n obj = {\n ...obj,\n ...schema.get(options.specType as string).toJSON(options)\n };\n }\n\n obj = getRequiredProperties(obj, schema, {...options, useAlias});\n obj = mapNullableType(obj, schema, options);\n\n if ((obj.oneOf || obj.allOf || obj.anyOf) && !(obj.items || obj.properties)) {\n delete obj.type;\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"schema\", schemaMapper);\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OperationMethods = exports.HTTP_METHODS = void 0;
|
|
4
|
+
exports.HTTP_METHODS = [
|
|
5
|
+
"all",
|
|
6
|
+
"checkout",
|
|
7
|
+
"connect",
|
|
8
|
+
"copy",
|
|
9
|
+
"delete",
|
|
10
|
+
"get",
|
|
11
|
+
"head",
|
|
12
|
+
"lock",
|
|
13
|
+
"merge",
|
|
14
|
+
"mkactivity",
|
|
15
|
+
"mkcol",
|
|
16
|
+
"move",
|
|
17
|
+
"m-search",
|
|
18
|
+
"notify",
|
|
19
|
+
"options",
|
|
20
|
+
"param",
|
|
21
|
+
"patch",
|
|
22
|
+
"post",
|
|
23
|
+
"propfind",
|
|
24
|
+
"propatch",
|
|
25
|
+
"purge",
|
|
26
|
+
"put",
|
|
27
|
+
"report",
|
|
28
|
+
"search",
|
|
29
|
+
"subscribe",
|
|
30
|
+
"trace",
|
|
31
|
+
"unlock",
|
|
32
|
+
"unsuscribe"
|
|
33
|
+
];
|
|
34
|
+
var OperationMethods;
|
|
35
|
+
(function (OperationMethods) {
|
|
36
|
+
OperationMethods["ALL"] = "ALL";
|
|
37
|
+
OperationMethods["GET"] = "GET";
|
|
38
|
+
OperationMethods["POST"] = "POST";
|
|
39
|
+
OperationMethods["PUT"] = "PUT";
|
|
40
|
+
OperationMethods["PATCH"] = "PATCH";
|
|
41
|
+
OperationMethods["HEAD"] = "HEAD";
|
|
42
|
+
OperationMethods["DELETE"] = "DELETE";
|
|
43
|
+
OperationMethods["OPTIONS"] = "OPTIONS";
|
|
44
|
+
OperationMethods["CUSTOM"] = "CUSTOM";
|
|
45
|
+
})(OperationMethods = exports.OperationMethods || (exports.OperationMethods = {}));
|
|
46
|
+
//# sourceMappingURL=httpMethods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpMethods.js","sourceRoot":"","sources":["../../../src/constants/httpMethods.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,KAAK;IACL,UAAU;IACV,SAAS;IACT,MAAM;IACN,QAAQ;IACR,KAAK;IACL,MAAM;IACN,MAAM;IACN,OAAO;IACP,YAAY;IACZ,OAAO;IACP,MAAM;IACN,UAAU;IACV,QAAQ;IACR,SAAS;IACT,OAAO;IACP,OAAO;IACP,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;IACP,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,OAAO;IACP,QAAQ;IACR,YAAY;CACb,CAAC;AAEF,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,iCAAa,CAAA;IACb,+BAAW,CAAA;IACX,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;AACnB,CAAC,EAVW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAU3B","sourcesContent":["export const HTTP_METHODS = [\n \"all\",\n \"checkout\",\n \"connect\",\n \"copy\",\n \"delete\",\n \"get\",\n \"head\",\n \"lock\",\n \"merge\",\n \"mkactivity\",\n \"mkcol\",\n \"move\",\n \"m-search\",\n \"notify\",\n \"options\",\n \"param\",\n \"patch\",\n \"post\",\n \"propfind\",\n \"propatch\",\n \"purge\",\n \"put\",\n \"report\",\n \"search\",\n \"subscribe\",\n \"trace\",\n \"unlock\",\n \"unsuscribe\"\n];\n\nexport enum OperationMethods {\n ALL = \"ALL\", // special key\n GET = \"GET\",\n POST = \"POST\",\n PUT = \"PUT\",\n PATCH = \"PATCH\",\n HEAD = \"HEAD\",\n DELETE = \"DELETE\",\n OPTIONS = \"OPTIONS\",\n CUSTOM = \"CUSTOM\"\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStatusMessage = exports.getStatusConstant = exports.HTTP_STATUS_MESSAGES = void 0;
|
|
4
|
+
exports.HTTP_STATUS_MESSAGES = {
|
|
5
|
+
"100": { label: "Continue", code: "CONTINUE" },
|
|
6
|
+
"101": { label: "Switching Protocols", code: "SWITCHING_PROTOCOLS" },
|
|
7
|
+
"102": { label: "Processing", code: "PROCESSING" },
|
|
8
|
+
"103": { label: "Early Hints", code: "EARLY_HINTS" },
|
|
9
|
+
"200": { label: "Success", code: "SUCCESS" },
|
|
10
|
+
"201": { label: "Created", code: "CREATED" },
|
|
11
|
+
"202": { label: "Accepted", code: "ACCEPTED" },
|
|
12
|
+
"203": {
|
|
13
|
+
label: "Non-Authoritative Information",
|
|
14
|
+
code: "NON_AUTHORITATIVE_INFORMATION"
|
|
15
|
+
},
|
|
16
|
+
"204": { label: "No Content", code: "NO_CONTENT" },
|
|
17
|
+
"205": { label: "Reset Content", code: "RESET_CONTENT" },
|
|
18
|
+
"206": { label: "Partial Content", code: "PARTIAL_CONTENT" },
|
|
19
|
+
"207": { label: "Multi-Status", code: "MULTI_STATUS" },
|
|
20
|
+
"208": { label: "Already Reported", code: "ALREADY_REPORTED" },
|
|
21
|
+
"226": { label: "IM Used", code: "IM_USED" },
|
|
22
|
+
"300": { label: "Multiple Choices", code: "MULTIPLE_CHOICES" },
|
|
23
|
+
"301": { label: "Moved Permanently", code: "MOVED_PERMANENTLY" },
|
|
24
|
+
"302": { label: "Found", code: "FOUND" },
|
|
25
|
+
"303": { label: "See Other", code: "SEE_OTHER" },
|
|
26
|
+
"304": { label: "Not Modified", code: "NOT_MODIFIED" },
|
|
27
|
+
"305": { label: "Use Proxy", code: "USE_PROXY" },
|
|
28
|
+
"306": { label: "(Unused)", code: "UNUSED" },
|
|
29
|
+
"307": { label: "Temporary Redirect", code: "TEMPORARY_REDIRECT" },
|
|
30
|
+
"308": { label: "Permanent Redirect", code: "PERMANENT_REDIRECT" },
|
|
31
|
+
"310": { label: "Too Many Redirects", code: "TOO_MANY_REDIRECTS" },
|
|
32
|
+
"400": { label: "Bad Request", code: "BAD_REQUEST" },
|
|
33
|
+
"401": { label: "Unauthorized", code: "UNAUTHORIZED" },
|
|
34
|
+
"402": { label: "Payment Required", code: "PAYMENT_REQUIRED" },
|
|
35
|
+
"403": { label: "Forbidden", code: "FORBIDDEN" },
|
|
36
|
+
"404": { label: "Not Found", code: "NOT_FOUND" },
|
|
37
|
+
"405": { label: "Method Not Allowed", code: "METHOD_NOT_ALLOWED" },
|
|
38
|
+
"406": { label: "Not Acceptable", code: "NOT_ACCEPTABLE" },
|
|
39
|
+
"407": {
|
|
40
|
+
label: "Proxy Authentication Required",
|
|
41
|
+
code: "PROXY_AUTHENTICATION_REQUIRED"
|
|
42
|
+
},
|
|
43
|
+
"408": { label: "Request Timeout", code: "REQUEST_TIMEOUT" },
|
|
44
|
+
"409": { label: "Conflict", code: "CONFLICT" },
|
|
45
|
+
"410": { label: "Gone", code: "GONE" },
|
|
46
|
+
"411": { label: "Length Required", code: "LENGTH_REQUIRED" },
|
|
47
|
+
"412": { label: "Precondition Failed", code: "PRECONDITION_FAILED" },
|
|
48
|
+
"413": {
|
|
49
|
+
label: "Request Entity Too Large",
|
|
50
|
+
code: "REQUEST_ENTITY_TOO_LARGE"
|
|
51
|
+
},
|
|
52
|
+
"414": { label: "Request URI Too Long", code: "REQUEST_URI_TOO_LONG" },
|
|
53
|
+
"415": { label: "Unsupported Media Type", code: "UNSUPPORTED_MEDIA_TYPE" },
|
|
54
|
+
"416": {
|
|
55
|
+
label: "Request Range Unsatisfiable",
|
|
56
|
+
code: "REQUEST_RANGE_UNSATISFIABLE"
|
|
57
|
+
},
|
|
58
|
+
"417": { label: "Expectation Failed", code: "EXPECTATION_FAILED" },
|
|
59
|
+
"418": { label: "I'm a Teapot", code: "I_M_A_TEAPOT" },
|
|
60
|
+
"421": { label: "Misdirected Request", code: "MISDIRECTED_REQUEST" },
|
|
61
|
+
"422": { label: "Unprocessable Entity", code: "UNPROCESSABLE_ENTITY" },
|
|
62
|
+
"423": { label: "Locked", code: "LOCKED" },
|
|
63
|
+
"424": { label: "Failed Dependency", code: "FAILED_DEPENDENCY" },
|
|
64
|
+
"425": { label: "Too Early", code: "TOO_EARLY" },
|
|
65
|
+
"426": { label: "Upgrade Required", code: "UPGRADE_REQUIRED" },
|
|
66
|
+
"427": { label: "Unassigned", code: "UNASSIGNED" },
|
|
67
|
+
"428": { label: "Precondition Required", code: "PRECONDITION_REQUIRED" },
|
|
68
|
+
"429": { label: "Too Many Requests", code: "TOO_MANY_REQUESTS" },
|
|
69
|
+
"430": { label: "Unassigned", code: "UNASSIGNED" },
|
|
70
|
+
"431": {
|
|
71
|
+
label: "Request Header Fields Too Large",
|
|
72
|
+
code: "REQUEST_HEADER_FIELDS_TOO_LARGE"
|
|
73
|
+
},
|
|
74
|
+
"451": {
|
|
75
|
+
label: "Unavailable For Legal Reasons",
|
|
76
|
+
code: "UNAVAILABLE_FOR_LEGAL_REASONS"
|
|
77
|
+
},
|
|
78
|
+
"500": { label: "Internal Server Error", code: "INTERNAL_SERVER_ERROR" },
|
|
79
|
+
"501": { label: "Not Implemented", code: "NOT_IMPLEMENTED" },
|
|
80
|
+
"502": { label: "Bad Gateway", code: "BAD_GATEWAY" },
|
|
81
|
+
"503": { label: "Service Unavailable", code: "SERVICE_UNAVAILABLE" },
|
|
82
|
+
"504": { label: "Gateway Timeout", code: "GATEWAY_TIMEOUT" },
|
|
83
|
+
"505": {
|
|
84
|
+
label: "HTTP Version Not Supported",
|
|
85
|
+
code: "HTTP_VERSION_NOT_SUPPORTED"
|
|
86
|
+
},
|
|
87
|
+
"506": { label: "Variant Also Negotiates", code: "VARIANT_ALSO_NEGOTIATES" },
|
|
88
|
+
"507": { label: "Insufficient Storage", code: "INSUFFICIENT_STORAGE" },
|
|
89
|
+
"508": { label: "Loop Detected", code: "LOOP_DETECTED" },
|
|
90
|
+
"509": {
|
|
91
|
+
label: "Bandwidth Limit Exceeded",
|
|
92
|
+
code: "BANDWIDTH_LIMIT_EXCEEDED"
|
|
93
|
+
},
|
|
94
|
+
"510": { label: "Not Extended", code: "NOT_EXTENDED" },
|
|
95
|
+
"511": {
|
|
96
|
+
label: "Network Authentication Required",
|
|
97
|
+
code: "NETWORK_AUTHENTICATION_REQUIRED"
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
function getStatusConstant(status) {
|
|
101
|
+
var _a;
|
|
102
|
+
return (_a = exports.HTTP_STATUS_MESSAGES[status]) === null || _a === void 0 ? void 0 : _a.code;
|
|
103
|
+
}
|
|
104
|
+
exports.getStatusConstant = getStatusConstant;
|
|
105
|
+
function getStatusMessage(status) {
|
|
106
|
+
var _a;
|
|
107
|
+
return (_a = exports.HTTP_STATUS_MESSAGES[status]) === null || _a === void 0 ? void 0 : _a.label;
|
|
108
|
+
}
|
|
109
|
+
exports.getStatusMessage = getStatusMessage;
|
|
110
|
+
//# sourceMappingURL=httpStatusMessages.js.map
|