@tsed/schema 6.87.2 → 6.90.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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +17 -12
- package/tsconfig.compile.esm.json +23 -0
- package/lib/index.js +0 -8379
- package/lib/index.js.map +0 -1
- package/lib/index.modern.js +0 -8230
- package/lib/index.modern.js.map +0 -1
- package/lib/utils/mergeSpec.benchmark.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSuccessStatus.js","sourceRoot":"","sources":["../../../src/utils/isSuccessStatus.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAiC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;AAChI,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAiC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC","sourcesContent":["export const isSuccessStatus = (code: string | number | undefined) => Number(code) && 200 <= Number(code) && Number(code) < 300;\nexport const isRedirectionStatus = (code: string | number | undefined) => Number(code) && 300 <= Number(code) && Number(code) < 400;\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cleanObject } from "@tsed/core";
|
|
2
|
+
/**
|
|
3
|
+
* Map input header to a standard open spec header
|
|
4
|
+
* @param headers
|
|
5
|
+
* @ignore
|
|
6
|
+
*/
|
|
7
|
+
export function mapHeaders(headers) {
|
|
8
|
+
return Object.keys(headers).reduce((newHeaders, key) => {
|
|
9
|
+
const value = headers[key];
|
|
10
|
+
let type = typeof value;
|
|
11
|
+
let options = {
|
|
12
|
+
example: value
|
|
13
|
+
};
|
|
14
|
+
if (type === "object") {
|
|
15
|
+
options = value;
|
|
16
|
+
options.example = options.value === undefined ? options.example : options.value;
|
|
17
|
+
delete options.value;
|
|
18
|
+
type = typeof options.example;
|
|
19
|
+
}
|
|
20
|
+
options.type = options.type || type;
|
|
21
|
+
newHeaders[key] = cleanObject(options);
|
|
22
|
+
return newHeaders;
|
|
23
|
+
}, {});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=mapHeaders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapHeaders.js","sourceRoot":"","sources":["../../../src/utils/mapHeaders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AAGvC;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,OAAoB;IAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,UAAuC,EAAE,GAAW,EAAE,EAAE;QAC1F,MAAM,KAAK,GAAQ,OAAO,CAAC,GAAG,CAAC,CAAC;QAEhC,IAAI,IAAI,GAAG,OAAO,KAAK,CAAC;QAExB,IAAI,OAAO,GAAQ;YACjB,OAAO,EAAE,KAAK;SACf,CAAC;QAEF,IAAI,IAAI,KAAK,QAAQ,EAAE;YACrB,OAAO,GAAG,KAAK,CAAC;YAChB,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;YAChF,OAAO,OAAO,CAAC,KAAK,CAAC;YACrB,IAAI,GAAG,OAAO,OAAO,CAAC,OAAO,CAAC;SAC/B;QAED,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC;QAEpC,UAAU,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;QAEvC,OAAO,UAAU,CAAC;IACpB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC","sourcesContent":["import {cleanObject} from \"@tsed/core\";\nimport {JsonHeader, JsonHeaders} from \"../interfaces/JsonOpenSpec\";\n\n/**\n * Map input header to a standard open spec header\n * @param headers\n * @ignore\n */\nexport function mapHeaders(headers: JsonHeaders): {[key: string]: JsonHeader} {\n return Object.keys(headers).reduce((newHeaders: {[key: string]: JsonHeader}, key: string) => {\n const value: any = headers[key];\n\n let type = typeof value;\n\n let options: any = {\n example: value\n };\n\n if (type === \"object\") {\n options = value;\n options.example = options.value === undefined ? options.example : options.value;\n delete options.value;\n type = typeof options.example;\n }\n\n options.type = options.type || type;\n\n newHeaders[key] = cleanObject(options);\n\n return newHeaders;\n }, {});\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cleanObject } from "@tsed/core";
|
|
2
|
+
import { SpecTypes } from "../domain/SpecTypes";
|
|
3
|
+
export function mapNullableType(obj, schema, options) {
|
|
4
|
+
if (!schema.nullable) {
|
|
5
|
+
return obj;
|
|
6
|
+
}
|
|
7
|
+
let types = [].concat(obj.type).filter((type) => type !== "null");
|
|
8
|
+
switch (options.specType) {
|
|
9
|
+
case SpecTypes.SWAGGER:
|
|
10
|
+
case SpecTypes.JSON:
|
|
11
|
+
obj.type = ["null", ...types];
|
|
12
|
+
break;
|
|
13
|
+
case SpecTypes.OPENAPI:
|
|
14
|
+
if (types.length > 1) {
|
|
15
|
+
obj.oneOf = types.map((type) => {
|
|
16
|
+
return cleanObject({ type, nullable: true });
|
|
17
|
+
}, []);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
obj.type = types[0];
|
|
21
|
+
obj.nullable = true;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return obj;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=mapNullableType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapNullableType.js","sourceRoot":"","sources":["../../../src/utils/mapNullableType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAG9C,MAAM,UAAU,eAAe,CAAC,GAAQ,EAAE,MAAkB,EAAE,OAA0B;IACtF,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpB,OAAO,GAAG,CAAC;KACZ;IAED,IAAI,KAAK,GAAa,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;IAEpF,QAAQ,OAAO,CAAC,QAAQ,EAAE;QACxB,KAAK,SAAS,CAAC,OAAO,CAAC;QACvB,KAAK,SAAS,CAAC,IAAI;YACjB,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC;YAC9B,MAAM;QAER,KAAK,SAAS,CAAC,OAAO;YACpB,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;gBACpB,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE;oBACrC,OAAO,WAAW,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;gBAC7C,CAAC,EAAE,EAAE,CAAC,CAAC;aACR;iBAAM;gBACL,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gBACpB,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC;aACrB;KACJ;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import {cleanObject} from \"@tsed/core\";\nimport type {JsonSchema} from \"../domain/JsonSchema\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\nimport type {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\n\nexport function mapNullableType(obj: any, schema: JsonSchema, options: JsonSchemaOptions) {\n if (!schema.nullable) {\n return obj;\n }\n\n let types: string[] = [].concat(obj.type).filter((type: string) => type !== \"null\");\n\n switch (options.specType) {\n case SpecTypes.SWAGGER:\n case SpecTypes.JSON:\n obj.type = [\"null\", ...types];\n break;\n\n case SpecTypes.OPENAPI:\n if (types.length > 1) {\n obj.oneOf = types.map((type: string) => {\n return cleanObject({type, nullable: true});\n }, []);\n } else {\n obj.type = types[0];\n obj.nullable = true;\n }\n }\n\n return obj;\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HTTP_METHODS } from "../constants/httpMethods";
|
|
2
|
+
export function mapRouteOptions(args) {
|
|
3
|
+
let method = undefined;
|
|
4
|
+
let path = undefined;
|
|
5
|
+
const handlers = args.filter((arg) => {
|
|
6
|
+
if (typeof arg === "string" && HTTP_METHODS.includes(arg.toLowerCase())) {
|
|
7
|
+
method = arg.toLocaleUpperCase();
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
if (typeof arg === "string" || arg instanceof RegExp) {
|
|
11
|
+
path = arg || "/";
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
return !!arg;
|
|
15
|
+
});
|
|
16
|
+
return {
|
|
17
|
+
path,
|
|
18
|
+
method,
|
|
19
|
+
handlers
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=mapRouteOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapRouteOptions.js","sourceRoot":"","sources":["../../../src/utils/mapRouteOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAEtD,MAAM,UAAU,eAAe,CAAC,IAAW;IACzC,IAAI,MAAM,GAAuB,SAAS,CAAC;IAC3C,IAAI,IAAI,GAAgC,SAAS,CAAC;IAElD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAQ,EAAE,EAAE;QACxC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,EAAE;YACvE,MAAM,GAAG,GAAG,CAAC,iBAAiB,EAAE,CAAC;YAEjC,OAAO,KAAK,CAAC;SACd;QAED,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,YAAY,MAAM,EAAE;YACpD,IAAI,GAAG,GAAG,IAAI,GAAG,CAAC;YAElB,OAAO,KAAK,CAAC;SACd;QAED,OAAO,CAAC,CAAC,GAAG,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,IAAI;QACJ,MAAM;QACN,QAAQ;KACT,CAAC;AACJ,CAAC","sourcesContent":["import {HTTP_METHODS} from \"../constants/httpMethods\";\n\nexport function mapRouteOptions(args: any[]) {\n let method: string | undefined = undefined;\n let path: string | RegExp | undefined = undefined;\n\n const handlers = args.filter((arg: any) => {\n if (typeof arg === \"string\" && HTTP_METHODS.includes(arg.toLowerCase())) {\n method = arg.toLocaleUpperCase();\n\n return false;\n }\n\n if (typeof arg === \"string\" || arg instanceof RegExp) {\n path = arg || \"/\";\n\n return false;\n }\n\n return !!arg;\n });\n\n return {\n path,\n method,\n handlers\n };\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import micromatch from "micromatch";
|
|
2
|
+
/**
|
|
3
|
+
* @ignore
|
|
4
|
+
*/
|
|
5
|
+
export function matchGroups(groups, compareWith = []) {
|
|
6
|
+
const groupsExcludes = groups.filter((group) => group.startsWith("!")).map((group) => group.replace("!", ""));
|
|
7
|
+
const groupsIncludes = groups.filter((group) => !group.startsWith("!"));
|
|
8
|
+
if (groupsExcludes.length) {
|
|
9
|
+
if (compareWith.length && micromatch(groupsExcludes, compareWith).length) {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
if (groupsIncludes.length) {
|
|
14
|
+
return !micromatch(groups.filter((group) => !group.startsWith("!")), compareWith).length;
|
|
15
|
+
}
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=matchGroups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchGroups.js","sourceRoot":"","sources":["../../../src/utils/matchGroups.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAAgB,EAAE,cAAwB,EAAE;IACtE,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IAC9G,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAExE,IAAI,cAAc,CAAC,MAAM,EAAE;QACzB,IAAI,WAAW,CAAC,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC,MAAM,EAAE;YACxE,OAAO,IAAI,CAAC;SACb;KACF;IAED,IAAI,cAAc,CAAC,MAAM,EAAE;QACzB,OAAO,CAAC,UAAU,CAChB,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAChD,WAAW,CACZ,CAAC,MAAM,CAAC;KACV;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import micromatch from \"micromatch\";\n\n/**\n * @ignore\n */\nexport function matchGroups(groups: string[], compareWith: string[] = []) {\n const groupsExcludes = groups.filter((group) => group.startsWith(\"!\")).map((group) => group.replace(\"!\", \"\"));\n const groupsIncludes = groups.filter((group) => !group.startsWith(\"!\"));\n\n if (groupsExcludes.length) {\n if (compareWith.length && micromatch(groupsExcludes, compareWith).length) {\n return true;\n }\n }\n\n if (groupsIncludes.length) {\n return !micromatch(\n groups.filter((group) => !group.startsWith(\"!\")),\n compareWith\n ).length;\n }\n\n return false;\n}\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { SpecTypes } from "../domain/SpecTypes";
|
|
2
|
+
import { concatParameters } from "./concatParameters";
|
|
3
|
+
import { getJsonPathParameters } from "./getJsonPathParameters";
|
|
4
|
+
/**
|
|
5
|
+
* @ignore
|
|
6
|
+
*/
|
|
7
|
+
export function mergeOperation(obj, operation, { rootPath, specType, operationId, defaultTags, tags, path, method }) {
|
|
8
|
+
const pathParameters = getJsonPathParameters(rootPath, path).map(({ path, parameters }) => {
|
|
9
|
+
path = path ? path : "/";
|
|
10
|
+
if (specType === SpecTypes.OPENAPI) {
|
|
11
|
+
parameters = parameters.map(({ type, ...param }) => {
|
|
12
|
+
return {
|
|
13
|
+
...param,
|
|
14
|
+
schema: {
|
|
15
|
+
type
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return { path, parameters };
|
|
21
|
+
});
|
|
22
|
+
return pathParameters.reduce((obj, { path, parameters }) => {
|
|
23
|
+
var _a;
|
|
24
|
+
parameters = concatParameters(parameters, operation);
|
|
25
|
+
path = path ? path : "/";
|
|
26
|
+
const operationTags = ((_a = operation.tags) === null || _a === void 0 ? void 0 : _a.length) ? operation.tags : [defaultTags];
|
|
27
|
+
obj.paths[path] = {
|
|
28
|
+
...obj.paths[path],
|
|
29
|
+
[method.toLowerCase()]: {
|
|
30
|
+
operationId: operation.operationId || operationId(path),
|
|
31
|
+
...operation,
|
|
32
|
+
tags: operationTags.map(({ name }) => name),
|
|
33
|
+
parameters
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
tags.push(...operationTags);
|
|
37
|
+
return obj;
|
|
38
|
+
}, obj);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=mergeOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeOperation.js","sourceRoot":"","sources":["../../../src/utils/mergeOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAe9D;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,GAAQ,EACR,SAAc,EACd,EAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAwB;IAEzF,MAAM,cAAc,GAAG,qBAAqB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,UAAU,EAAC,EAAE,EAAE;QACtF,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QAEzB,IAAI,QAAQ,KAAK,SAAS,CAAC,OAAO,EAAE;YAClC,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,GAAG,KAAK,EAAC,EAAE,EAAE;gBAC/C,OAAO;oBACL,GAAG,KAAK;oBACR,MAAM,EAAE;wBACN,IAAI;qBACL;iBACF,CAAC;YACJ,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC,EAAE,EAAE;;QACvD,UAAU,GAAG,gBAAgB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QACrD,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QAEzB,MAAM,aAAa,GAAG,CAAA,MAAA,SAAS,CAAC,IAAI,0CAAE,MAAM,EAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QAE9E,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG;YAChB,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAClB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE;gBACtB,WAAW,EAAE,SAAS,CAAC,WAAW,IAAI,WAAW,CAAC,IAAI,CAAC;gBACvD,GAAG,SAAS;gBACZ,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAM,EAAE,EAAE,CAAC,IAAI,CAAC;gBAC9C,UAAU;aACX;SACF,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;QAE5B,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,GAAG,CAAC,CAAC;AACV,CAAC","sourcesContent":["import {SpecTypes} from \"../domain/SpecTypes\";\nimport {concatParameters} from \"./concatParameters\";\nimport {getJsonPathParameters} from \"./getJsonPathParameters\";\n\n/**\n * @ignore\n */\nexport interface MergeOperationOptions {\n rootPath: string;\n specType: SpecTypes;\n operationId: (path: string) => string | undefined;\n defaultTags: string[];\n tags: string[];\n path: string;\n method: string;\n}\n\n/**\n * @ignore\n */\nexport function mergeOperation(\n obj: any,\n operation: any,\n {rootPath, specType, operationId, defaultTags, tags, path, method}: MergeOperationOptions\n) {\n const pathParameters = getJsonPathParameters(rootPath, path).map(({path, parameters}) => {\n path = path ? path : \"/\";\n\n if (specType === SpecTypes.OPENAPI) {\n parameters = parameters.map(({type, ...param}) => {\n return {\n ...param,\n schema: {\n type\n }\n };\n });\n }\n\n return {path, parameters};\n });\n\n return pathParameters.reduce((obj, {path, parameters}) => {\n parameters = concatParameters(parameters, operation);\n path = path ? path : \"/\";\n\n const operationTags = operation.tags?.length ? operation.tags : [defaultTags];\n\n obj.paths[path] = {\n ...obj.paths[path],\n [method.toLowerCase()]: {\n operationId: operation.operationId || operationId(path),\n ...operation,\n tags: operationTags.map(({name}: any) => name),\n parameters\n }\n };\n\n tags.push(...operationTags);\n\n return obj;\n }, obj);\n}\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { deepMerge, mergeReducerBuilder } from "@tsed/core";
|
|
2
|
+
/**
|
|
3
|
+
* @ignore
|
|
4
|
+
*/
|
|
5
|
+
export const schemesReducer = mergeReducerBuilder((current, value) => (current.type && current.type === value.type) || (current.$ref && current.$ref === value.$ref));
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
export const parameters = mergeReducerBuilder((current, value) => current.in === value.in && current.name === value.name);
|
|
10
|
+
/**
|
|
11
|
+
* @ignore
|
|
12
|
+
*/
|
|
13
|
+
export const security = mergeReducerBuilder((current, value) => {
|
|
14
|
+
return !!Object.keys(value).find((key) => !!current[key]);
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* @ignore
|
|
18
|
+
*/
|
|
19
|
+
export const tagsReducer = mergeReducerBuilder((current, value) => current.name === value.name);
|
|
20
|
+
/**
|
|
21
|
+
* @ignore
|
|
22
|
+
*/
|
|
23
|
+
const SPEC_REDUCERS = {
|
|
24
|
+
security,
|
|
25
|
+
parameters,
|
|
26
|
+
oneOf: schemesReducer,
|
|
27
|
+
anyOf: schemesReducer,
|
|
28
|
+
allOf: schemesReducer,
|
|
29
|
+
tags: tagsReducer
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Merge two spec
|
|
33
|
+
* @param spec
|
|
34
|
+
* @param input
|
|
35
|
+
*/
|
|
36
|
+
export function mergeSpec(spec, input) {
|
|
37
|
+
return deepMerge(spec, input, {
|
|
38
|
+
reducers: SPEC_REDUCERS,
|
|
39
|
+
cleanUndefinedProps: true
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=mergeSpec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeSpec.js","sourceRoot":"","sources":["../../../src/utils/mergeSpec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,mBAAmB,EAAC,MAAM,YAAY,CAAC;AAGvE;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAC/C,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,CACnH,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC;AAE1H;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,mBAAmB,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;IAC7D,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5D,CAAC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC;AAEhG;;GAEG;AACH,MAAM,aAAa,GAAG;IACpB,QAAQ;IACR,UAAU;IACV,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,WAAW;CAClB,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAA+B,IAAmB,EAAE,KAAoB;IAC/F,OAAO,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE;QAC5B,QAAQ,EAAE,aAAa;QACvB,mBAAmB,EAAE,IAAI;KAC1B,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {cleanObject, deepMerge, mergeReducerBuilder} from \"@tsed/core\";\nimport {OpenSpec2, OpenSpec3} from \"@tsed/openspec\";\n\n/**\n * @ignore\n */\nexport const schemesReducer = mergeReducerBuilder(\n (current, value) => (current.type && current.type === value.type) || (current.$ref && current.$ref === value.$ref)\n);\n\n/**\n * @ignore\n */\nexport const parameters = mergeReducerBuilder((current, value) => current.in === value.in && current.name === value.name);\n\n/**\n * @ignore\n */\nexport const security = mergeReducerBuilder((current, value) => {\n return !!Object.keys(value).find((key) => !!current[key]);\n});\n\n/**\n * @ignore\n */\nexport const tagsReducer = mergeReducerBuilder((current, value) => current.name === value.name);\n\n/**\n * @ignore\n */\nconst SPEC_REDUCERS = {\n security,\n parameters,\n oneOf: schemesReducer,\n anyOf: schemesReducer,\n allOf: schemesReducer,\n tags: tagsReducer\n};\n\n/**\n * Merge two spec\n * @param spec\n * @param input\n */\nexport function mergeSpec<Spec = OpenSpec2 | OpenSpec3>(spec: Partial<Spec>, input: Partial<Spec>): Partial<Spec> {\n return deepMerge(spec, input, {\n reducers: SPEC_REDUCERS,\n cleanUndefinedProps: true\n });\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { camelCase } from "camel-case";
|
|
2
|
+
const DEFAULT_PATTERN = "%c.%m";
|
|
3
|
+
/**
|
|
4
|
+
* @ignore
|
|
5
|
+
*/
|
|
6
|
+
export function operationIdFormatter(pattern = "") {
|
|
7
|
+
const OPERATION_IDS = new Map();
|
|
8
|
+
const transform = (name, propertyKey) => {
|
|
9
|
+
const str = (pattern || DEFAULT_PATTERN).replace(/%c/, name).replace(/%m/, propertyKey);
|
|
10
|
+
return pattern === "" ? camelCase(str) : str;
|
|
11
|
+
};
|
|
12
|
+
return (name, propertyKey, path = "") => {
|
|
13
|
+
const operationId = transform(name, propertyKey);
|
|
14
|
+
const operationKey = name + propertyKey;
|
|
15
|
+
if (!OPERATION_IDS.has(operationKey)) {
|
|
16
|
+
OPERATION_IDS.set(operationKey, 0);
|
|
17
|
+
return operationId;
|
|
18
|
+
}
|
|
19
|
+
// try with paths
|
|
20
|
+
const result = path.match(/{(\w+)}/gi);
|
|
21
|
+
if (result) {
|
|
22
|
+
const operationKey = name + propertyKey + result[0];
|
|
23
|
+
if (!OPERATION_IDS.has(operationKey)) {
|
|
24
|
+
OPERATION_IDS.set(operationKey, 0);
|
|
25
|
+
return camelCase(`${operationId} By ${result}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const id = OPERATION_IDS.get(operationKey) + 1;
|
|
29
|
+
OPERATION_IDS.set(operationKey, id);
|
|
30
|
+
return `${operationId}_${id}`;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=operationIdFormatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationIdFormatter.js","sourceRoot":"","sources":["../../../src/utils/operationIdFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAErC,MAAM,eAAe,GAAG,OAAO,CAAC;AAEhC;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAkB,EAAE;IACvD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEhD,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,WAAmB,EAAE,EAAE;QACtD,MAAM,GAAG,GAAG,CAAC,OAAO,IAAI,eAAe,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACxF,OAAO,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAC/C,CAAC,CAAC;IAEF,OAAO,CAAC,IAAY,EAAE,WAAmB,EAAE,OAAe,EAAE,EAAE,EAAE;QAC9D,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACjD,MAAM,YAAY,GAAG,IAAI,GAAG,WAAW,CAAC;QAExC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE;YACpC,aAAa,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;YAEnC,OAAO,WAAW,CAAC;SACpB;QAED,iBAAiB;QACjB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACvC,IAAI,MAAM,EAAE;YACV,MAAM,YAAY,GAAG,IAAI,GAAG,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAEpD,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE;gBACpC,aAAa,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;gBAEnC,OAAO,SAAS,CAAC,GAAG,WAAW,OAAO,MAAM,EAAE,CAAC,CAAC;aACjD;SACF;QAED,MAAM,EAAE,GAAG,aAAa,CAAC,GAAG,CAAC,YAAY,CAAE,GAAG,CAAC,CAAC;QAChD,aAAa,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;QAEpC,OAAO,GAAG,WAAW,IAAI,EAAE,EAAE,CAAC;IAChC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import {camelCase} from \"camel-case\";\n\nconst DEFAULT_PATTERN = \"%c.%m\";\n\n/**\n * @ignore\n */\nexport function operationIdFormatter(pattern: string = \"\") {\n const OPERATION_IDS = new Map<string, number>();\n\n const transform = (name: string, propertyKey: string) => {\n const str = (pattern || DEFAULT_PATTERN).replace(/%c/, name).replace(/%m/, propertyKey);\n return pattern === \"\" ? camelCase(str) : str;\n };\n\n return (name: string, propertyKey: string, path: string = \"\") => {\n const operationId = transform(name, propertyKey);\n const operationKey = name + propertyKey;\n\n if (!OPERATION_IDS.has(operationKey)) {\n OPERATION_IDS.set(operationKey, 0);\n\n return operationId;\n }\n\n // try with paths\n const result = path.match(/{(\\w+)}/gi);\n if (result) {\n const operationKey = name + propertyKey + result[0];\n\n if (!OPERATION_IDS.has(operationKey)) {\n OPERATION_IDS.set(operationKey, 0);\n\n return camelCase(`${operationId} By ${result}`);\n }\n }\n\n const id = OPERATION_IDS.get(operationKey)! + 1;\n OPERATION_IDS.set(operationKey, id);\n\n return `${operationId}_${id}`;\n };\n}\n"]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { pascalCase } from "pascal-case";
|
|
2
|
+
import { SpecTypes } from "../domain/SpecTypes";
|
|
3
|
+
import { cleanObject } from "@tsed/core";
|
|
4
|
+
/**
|
|
5
|
+
* ignore
|
|
6
|
+
* @param options
|
|
7
|
+
*/
|
|
8
|
+
function getHost(options) {
|
|
9
|
+
const { host = `#/${options.specType === "openapi3" ? "components/schemas" : "definitions"}` } = options;
|
|
10
|
+
return host;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @ignore
|
|
14
|
+
*/
|
|
15
|
+
export function createRefName(name, options) {
|
|
16
|
+
if (options.groups && options.groups.length) {
|
|
17
|
+
return pascalCase(`${name} ${options.groups.join(" ")}`);
|
|
18
|
+
}
|
|
19
|
+
return name;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @ignore
|
|
23
|
+
*/
|
|
24
|
+
export function createRef(name, schema, options) {
|
|
25
|
+
const host = getHost(options);
|
|
26
|
+
const ref = {
|
|
27
|
+
$ref: `${host}/${name}`
|
|
28
|
+
};
|
|
29
|
+
const nullable = schema.nullable;
|
|
30
|
+
const readOnly = schema.get ? schema.get("readOnly") : undefined;
|
|
31
|
+
if (nullable || readOnly) {
|
|
32
|
+
switch (options.specType) {
|
|
33
|
+
case SpecTypes.OPENAPI:
|
|
34
|
+
return cleanObject({
|
|
35
|
+
nullable: nullable ? true : undefined,
|
|
36
|
+
readOnly: readOnly ? true : undefined,
|
|
37
|
+
allOf: [ref]
|
|
38
|
+
});
|
|
39
|
+
case SpecTypes.JSON:
|
|
40
|
+
return cleanObject({
|
|
41
|
+
readOnly,
|
|
42
|
+
oneOf: [nullable && { type: "null" }, ref].filter(Boolean)
|
|
43
|
+
});
|
|
44
|
+
case SpecTypes.SWAGGER: // unsupported
|
|
45
|
+
if (readOnly) {
|
|
46
|
+
return {
|
|
47
|
+
readOnly,
|
|
48
|
+
allOf: [ref]
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return ref;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @ignore
|
|
58
|
+
*/
|
|
59
|
+
export function toRef(value, schema, options) {
|
|
60
|
+
const name = createRefName(value.getName(), options);
|
|
61
|
+
options.schemas[value.getName()] = schema;
|
|
62
|
+
return createRef(name, value, options);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=ref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ref.js","sourceRoot":"","sources":["../../../src/utils/ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AAEvC;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA0B;IACzC,MAAM,EAAC,IAAI,GAAG,KAAK,OAAO,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,aAAa,EAAE,EAAC,GAAG,OAAO,CAAC;IAEvG,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,OAA0B;IACpE,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE;QAC3C,OAAO,UAAU,CAAC,GAAG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;KAC1D;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,MAAkB,EAAE,OAA0B;IACpF,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,MAAM,GAAG,GAAG;QACV,IAAI,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE;KACxB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEjE,IAAI,QAAQ,IAAI,QAAQ,EAAE;QACxB,QAAQ,OAAO,CAAC,QAAQ,EAAE;YACxB,KAAK,SAAS,CAAC,OAAO;gBACpB,OAAO,WAAW,CAAC;oBACjB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;oBACrC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;oBACrC,KAAK,EAAE,CAAC,GAAG,CAAC;iBACb,CAAC,CAAC;YACL,KAAK,SAAS,CAAC,IAAI;gBACjB,OAAO,WAAW,CAAC;oBACjB,QAAQ;oBACR,KAAK,EAAE,CAAC,QAAQ,IAAI,EAAC,IAAI,EAAE,MAAM,EAAC,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;iBACzD,CAAC,CAAC;YACL,KAAK,SAAS,CAAC,OAAO,EAAE,cAAc;gBACpC,IAAI,QAAQ,EAAE;oBACZ,OAAO;wBACL,QAAQ;wBACR,KAAK,EAAE,CAAC,GAAG,CAAC;qBACb,CAAC;iBACH;gBACD,MAAM;SACT;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,KAAiB,EAAE,MAAW,EAAE,OAA0B;IAC9E,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAErD,OAAO,CAAC,OAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,MAAM,CAAC;IAE3C,OAAO,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC","sourcesContent":["import {pascalCase} from \"pascal-case\";\nimport type {JsonSchema} from \"../domain/JsonSchema\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {cleanObject} from \"@tsed/core\";\n\n/**\n * ignore\n * @param options\n */\nfunction getHost(options: JsonSchemaOptions) {\n const {host = `#/${options.specType === \"openapi3\" ? \"components/schemas\" : \"definitions\"}`} = options;\n\n return host;\n}\n\n/**\n * @ignore\n */\nexport function createRefName(name: string, options: JsonSchemaOptions) {\n if (options.groups && options.groups.length) {\n return pascalCase(`${name} ${options.groups.join(\" \")}`);\n }\n\n return name;\n}\n\n/**\n * @ignore\n */\nexport function createRef(name: string, schema: JsonSchema, options: JsonSchemaOptions) {\n const host = getHost(options);\n const ref = {\n $ref: `${host}/${name}`\n };\n\n const nullable = schema.nullable;\n const readOnly = schema.get ? schema.get(\"readOnly\") : undefined;\n\n if (nullable || readOnly) {\n switch (options.specType) {\n case SpecTypes.OPENAPI:\n return cleanObject({\n nullable: nullable ? true : undefined,\n readOnly: readOnly ? true : undefined,\n allOf: [ref]\n });\n case SpecTypes.JSON:\n return cleanObject({\n readOnly,\n oneOf: [nullable && {type: \"null\"}, ref].filter(Boolean)\n });\n case SpecTypes.SWAGGER: // unsupported\n if (readOnly) {\n return {\n readOnly,\n allOf: [ref]\n };\n }\n break;\n }\n }\n\n return ref;\n}\n\n/**\n * @ignore\n */\nexport function toRef(value: JsonSchema, schema: any, options: JsonSchemaOptions) {\n const name = createRefName(value.getName(), options);\n\n options.schemas![value.getName()] = schema;\n\n return createRef(name, value, options);\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JsonMap } from "../domain/JsonMap";
|
|
2
|
+
/**
|
|
3
|
+
* @ignore
|
|
4
|
+
*/
|
|
5
|
+
export function toJsonMapCollection(content, klass = JsonMap) {
|
|
6
|
+
return Object.entries(content).reduce((content, [key, value]) => {
|
|
7
|
+
content.set(key, new klass(value));
|
|
8
|
+
return content;
|
|
9
|
+
}, new JsonMap());
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=toJsonMapCollection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toJsonMapCollection.js","sourceRoot":"","sources":["../../../src/utils/toJsonMapCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAE1C;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAA6B,EAAE,KAAK,GAAG,OAAO;IAChF,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9D,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QAEnC,OAAO,OAAO,CAAC;IACjB,CAAC,EAAE,IAAI,OAAO,EAAO,CAAC,CAAC;AACzB,CAAC","sourcesContent":["import {JsonMap} from \"../domain/JsonMap\";\n\n/**\n * @ignore\n */\nexport function toJsonMapCollection(content: {[key: string]: any}, klass = JsonMap) {\n return Object.entries(content).reduce((content, [key, value]) => {\n content.set(key, new klass(value));\n\n return content;\n }, new JsonMap<any>());\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toJsonRegex.js","sourceRoot":"","sources":["../../../src/utils/toJsonRegex.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,OAAwB;IAClD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;AACzD,CAAC","sourcesContent":["/**\n * @ignore\n * @param pattern\n */\nexport function toJsonRegex(pattern: string | RegExp) {\n return String(pattern).replace(/^(\\/)(.*)(\\/)$/, \"$2\");\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./anyMapper";
|
|
2
|
+
export * from "./classMapper";
|
|
3
|
+
export * from "./genericsMapper";
|
|
4
|
+
export * from "./inheritedClassMapper";
|
|
5
|
+
export * from "./itemMapper";
|
|
6
|
+
export * from "./lazyRefMapper";
|
|
7
|
+
export * from "./mapMapper";
|
|
8
|
+
export * from "./objectMapper";
|
|
9
|
+
export * from "./schemaMapper";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions";
|
|
2
|
+
/**
|
|
3
|
+
* Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.
|
|
4
|
+
* @param input
|
|
5
|
+
* @param ignore
|
|
6
|
+
* @param options
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
export declare function mapMapper(input: Map<string, any>, { ignore, ...options }?: JsonSchemaOptions): any;
|