@tsed/schema 6.87.1 → 6.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{components → cjs/components}/anyMapper.d.ts +0 -0
- package/lib/cjs/components/anyMapper.js +24 -0
- package/lib/cjs/components/anyMapper.js.map +1 -0
- package/lib/{components → cjs/components}/classMapper.d.ts +0 -0
- package/lib/cjs/components/classMapper.js +41 -0
- package/lib/cjs/components/classMapper.js.map +1 -0
- package/lib/{components → cjs/components}/genericsMapper.d.ts +0 -0
- package/lib/cjs/components/genericsMapper.js +62 -0
- package/lib/cjs/components/genericsMapper.js.map +1 -0
- package/lib/{components → cjs/components}/index.d.ts +0 -0
- package/lib/cjs/components/index.js +13 -0
- package/lib/cjs/components/index.js.map +1 -0
- package/lib/{components → cjs/components}/inheritedClassMapper.d.ts +0 -0
- package/lib/cjs/components/inheritedClassMapper.js +22 -0
- package/lib/cjs/components/inheritedClassMapper.js.map +1 -0
- package/lib/{components → cjs/components}/itemMapper.d.ts +0 -0
- package/lib/cjs/components/itemMapper.js +10 -0
- package/lib/cjs/components/itemMapper.js.map +1 -0
- package/lib/{components → cjs/components}/lazyRefMapper.d.ts +0 -0
- package/lib/cjs/components/lazyRefMapper.js +19 -0
- package/lib/cjs/components/lazyRefMapper.js.map +1 -0
- package/lib/{components → cjs/components}/mapMapper.d.ts +0 -0
- package/lib/cjs/components/mapMapper.js +25 -0
- package/lib/cjs/components/mapMapper.js.map +1 -0
- package/lib/{components → cjs/components}/objectMapper.d.ts +0 -0
- package/lib/cjs/components/objectMapper.js +25 -0
- package/lib/cjs/components/objectMapper.js.map +1 -0
- package/lib/{components → cjs/components}/schemaMapper.d.ts +0 -0
- package/lib/cjs/components/schemaMapper.js +100 -0
- package/lib/cjs/components/schemaMapper.js.map +1 -0
- package/lib/{constants → cjs/constants}/httpMethods.d.ts +0 -0
- package/lib/cjs/constants/httpMethods.js +46 -0
- package/lib/cjs/constants/httpMethods.js.map +1 -0
- package/lib/{constants → cjs/constants}/httpStatusMessages.d.ts +0 -0
- package/lib/cjs/constants/httpStatusMessages.js +110 -0
- package/lib/cjs/constants/httpStatusMessages.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/class/children.d.ts +0 -0
- package/lib/cjs/decorators/class/children.js +24 -0
- package/lib/cjs/decorators/class/children.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/collectionContains.d.ts +0 -0
- package/lib/cjs/decorators/collections/collectionContains.js +29 -0
- package/lib/cjs/decorators/collections/collectionContains.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/collectionOf.d.ts +0 -0
- package/lib/cjs/decorators/collections/collectionOf.js +103 -0
- package/lib/cjs/decorators/collections/collectionOf.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/maxItems.d.ts +0 -0
- package/lib/cjs/decorators/collections/maxItems.js +60 -0
- package/lib/cjs/decorators/collections/maxItems.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/maxProperties.d.ts +0 -0
- package/lib/cjs/decorators/collections/maxProperties.js +83 -0
- package/lib/cjs/decorators/collections/maxProperties.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/minItems.d.ts +0 -0
- package/lib/cjs/decorators/collections/minItems.js +64 -0
- package/lib/cjs/decorators/collections/minItems.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/minProperties.d.ts +0 -0
- package/lib/cjs/decorators/collections/minProperties.js +82 -0
- package/lib/cjs/decorators/collections/minProperties.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/collections/uniqueItems.d.ts +0 -0
- package/lib/cjs/decorators/collections/uniqueItems.js +60 -0
- package/lib/cjs/decorators/collections/uniqueItems.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/additionalProperties.d.ts +0 -0
- package/lib/cjs/decorators/common/additionalProperties.js +20 -0
- package/lib/cjs/decorators/common/additionalProperties.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/allOf.d.ts +0 -0
- package/lib/cjs/decorators/common/allOf.js +22 -0
- package/lib/cjs/decorators/common/allOf.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/allow.d.ts +0 -0
- package/lib/cjs/decorators/common/allow.js +47 -0
- package/lib/cjs/decorators/common/allow.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/any.d.ts +0 -0
- package/lib/cjs/decorators/common/any.js +46 -0
- package/lib/cjs/decorators/common/any.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/anyOf.d.ts +0 -0
- package/lib/cjs/decorators/common/anyOf.js +26 -0
- package/lib/cjs/decorators/common/anyOf.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/const.d.ts +0 -0
- package/lib/cjs/decorators/common/const.js +70 -0
- package/lib/cjs/decorators/common/const.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/customKey.d.ts +0 -0
- package/lib/cjs/decorators/common/customKey.js +43 -0
- package/lib/cjs/decorators/common/customKey.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/default.d.ts +0 -0
- package/lib/cjs/decorators/common/default.js +51 -0
- package/lib/cjs/decorators/common/default.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/description.d.ts +0 -0
- package/lib/cjs/decorators/common/description.js +76 -0
- package/lib/cjs/decorators/common/description.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/enum.d.ts +0 -0
- package/lib/cjs/decorators/common/enum.js +30 -0
- package/lib/cjs/decorators/common/enum.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/example.d.ts +0 -0
- package/lib/cjs/decorators/common/example.js +21 -0
- package/lib/cjs/decorators/common/example.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/examples.d.ts +0 -0
- package/lib/cjs/decorators/common/examples.js +21 -0
- package/lib/cjs/decorators/common/examples.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/exclusiveMaximum.d.ts +0 -0
- package/lib/cjs/decorators/common/exclusiveMaximum.js +77 -0
- package/lib/cjs/decorators/common/exclusiveMaximum.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/exclusiveMinimum.d.ts +0 -0
- package/lib/cjs/decorators/common/exclusiveMinimum.js +77 -0
- package/lib/cjs/decorators/common/exclusiveMinimum.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/format.d.ts +0 -0
- package/lib/cjs/decorators/common/format.js +486 -0
- package/lib/cjs/decorators/common/format.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/forwardGroups.d.ts +0 -0
- package/lib/cjs/decorators/common/forwardGroups.js +20 -0
- package/lib/cjs/decorators/common/forwardGroups.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/groups.d.ts +0 -0
- package/lib/cjs/decorators/common/groups.js +41 -0
- package/lib/cjs/decorators/common/groups.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/hidden.d.ts +0 -0
- package/lib/cjs/decorators/common/hidden.js +40 -0
- package/lib/cjs/decorators/common/hidden.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/ignore.d.ts +0 -0
- package/lib/cjs/decorators/common/ignore.js +71 -0
- package/lib/cjs/decorators/common/ignore.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/integer.d.ts +0 -0
- package/lib/cjs/decorators/common/integer.js +71 -0
- package/lib/cjs/decorators/common/integer.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/jsonEntityFn.d.ts +0 -0
- package/lib/cjs/decorators/common/jsonEntityFn.js +32 -0
- package/lib/cjs/decorators/common/jsonEntityFn.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/maxLength.d.ts +0 -0
- package/lib/cjs/decorators/common/maxLength.js +89 -0
- package/lib/cjs/decorators/common/maxLength.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/maximum.d.ts +0 -0
- package/lib/cjs/decorators/common/maximum.js +151 -0
- package/lib/cjs/decorators/common/maximum.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/minLength.d.ts +0 -0
- package/lib/cjs/decorators/common/minLength.js +90 -0
- package/lib/cjs/decorators/common/minLength.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/minimum.d.ts +0 -0
- package/lib/cjs/decorators/common/minimum.js +149 -0
- package/lib/cjs/decorators/common/minimum.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/multipleOf.d.ts +0 -0
- package/lib/cjs/decorators/common/multipleOf.js +81 -0
- package/lib/cjs/decorators/common/multipleOf.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/name.d.ts +0 -0
- package/lib/cjs/decorators/common/name.js +52 -0
- package/lib/cjs/decorators/common/name.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/nullable.d.ts +0 -0
- package/lib/cjs/decorators/common/nullable.js +34 -0
- package/lib/cjs/decorators/common/nullable.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/oneOf.d.ts +0 -0
- package/lib/cjs/decorators/common/oneOf.js +26 -0
- package/lib/cjs/decorators/common/oneOf.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/optional.d.ts +0 -0
- package/lib/cjs/decorators/common/optional.js +28 -0
- package/lib/cjs/decorators/common/optional.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/pattern.d.ts +0 -0
- package/lib/cjs/decorators/common/pattern.js +103 -0
- package/lib/cjs/decorators/common/pattern.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/property.d.ts +0 -0
- package/lib/cjs/decorators/common/property.js +27 -0
- package/lib/cjs/decorators/common/property.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/readOnly.d.ts +0 -0
- package/lib/cjs/decorators/common/readOnly.js +21 -0
- package/lib/cjs/decorators/common/readOnly.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/required.d.ts +0 -0
- package/lib/cjs/decorators/common/required.js +53 -0
- package/lib/cjs/decorators/common/required.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/requiredGroups.d.ts +0 -0
- package/lib/cjs/decorators/common/requiredGroups.js +29 -0
- package/lib/cjs/decorators/common/requiredGroups.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/schema.d.ts +0 -0
- package/lib/cjs/decorators/common/schema.js +68 -0
- package/lib/cjs/decorators/common/schema.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/title.d.ts +0 -0
- package/lib/cjs/decorators/common/title.js +49 -0
- package/lib/cjs/decorators/common/title.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/common/writeOnly.d.ts +0 -0
- package/lib/cjs/decorators/common/writeOnly.js +21 -0
- package/lib/cjs/decorators/common/writeOnly.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/config/jsonEntityComponent.d.ts +0 -0
- package/lib/cjs/decorators/config/jsonEntityComponent.js +18 -0
- package/lib/cjs/decorators/config/jsonEntityComponent.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/generics/genericOf.d.ts +0 -0
- package/lib/cjs/decorators/generics/genericOf.js +99 -0
- package/lib/cjs/decorators/generics/genericOf.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/generics/generics.d.ts +0 -0
- package/lib/cjs/decorators/generics/generics.js +25 -0
- package/lib/cjs/decorators/generics/generics.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/index.d.ts +0 -0
- package/lib/cjs/decorators/index.js +76 -0
- package/lib/cjs/decorators/index.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/consumes.d.ts +0 -0
- package/lib/cjs/decorators/operations/consumes.js +39 -0
- package/lib/cjs/decorators/operations/consumes.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/contentType.d.ts +0 -0
- package/lib/cjs/decorators/operations/contentType.js +28 -0
- package/lib/cjs/decorators/operations/contentType.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/deprecated.d.ts +0 -0
- package/lib/cjs/decorators/operations/deprecated.js +43 -0
- package/lib/cjs/decorators/operations/deprecated.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/header.d.ts +0 -0
- package/lib/cjs/decorators/operations/header.js +59 -0
- package/lib/cjs/decorators/operations/header.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/in.d.ts +0 -0
- package/lib/cjs/decorators/operations/in.js +78 -0
- package/lib/cjs/decorators/operations/in.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/location.d.ts +0 -0
- package/lib/cjs/decorators/operations/location.js +29 -0
- package/lib/cjs/decorators/operations/location.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/operationId.d.ts +0 -0
- package/lib/cjs/decorators/operations/operationId.js +24 -0
- package/lib/cjs/decorators/operations/operationId.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/operationPath.d.ts +0 -0
- package/lib/cjs/decorators/operations/operationPath.js +34 -0
- package/lib/cjs/decorators/operations/operationPath.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/partial.d.ts +0 -0
- package/lib/cjs/decorators/operations/partial.js +18 -0
- package/lib/cjs/decorators/operations/partial.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/path.d.ts +0 -0
- package/lib/cjs/decorators/operations/path.js +29 -0
- package/lib/cjs/decorators/operations/path.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/produces.d.ts +0 -0
- package/lib/cjs/decorators/operations/produces.js +46 -0
- package/lib/cjs/decorators/operations/produces.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/redirect.d.ts +0 -0
- package/lib/cjs/decorators/operations/redirect.js +26 -0
- package/lib/cjs/decorators/operations/redirect.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/returns.d.ts +0 -0
- package/lib/cjs/decorators/operations/returns.js +215 -0
- package/lib/cjs/decorators/operations/returns.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/route.d.ts +0 -0
- package/lib/cjs/decorators/operations/route.js +198 -0
- package/lib/cjs/decorators/operations/route.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/security.d.ts +0 -0
- package/lib/cjs/decorators/operations/security.js +43 -0
- package/lib/cjs/decorators/operations/security.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/status.d.ts +0 -0
- package/lib/cjs/decorators/operations/status.js +133 -0
- package/lib/cjs/decorators/operations/status.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/summary.d.ts +0 -0
- package/lib/cjs/decorators/operations/summary.js +34 -0
- package/lib/cjs/decorators/operations/summary.js.map +1 -0
- package/lib/{decorators → cjs/decorators}/operations/tags.d.ts +0 -0
- package/lib/cjs/decorators/operations/tags.js +52 -0
- package/lib/cjs/decorators/operations/tags.js.map +1 -0
- package/lib/{domain → cjs/domain}/DecoratorContext.d.ts +0 -0
- package/lib/cjs/domain/DecoratorContext.js +88 -0
- package/lib/cjs/domain/DecoratorContext.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonAliasMap.d.ts +0 -0
- package/lib/cjs/domain/JsonAliasMap.js +15 -0
- package/lib/cjs/domain/JsonAliasMap.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonClassStore.d.ts +0 -0
- package/lib/cjs/domain/JsonClassStore.js +37 -0
- package/lib/cjs/domain/JsonClassStore.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonEntityStore.d.ts +0 -0
- package/lib/cjs/domain/JsonEntityStore.js +163 -0
- package/lib/cjs/domain/JsonEntityStore.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonFormatTypes.d.ts +0 -0
- package/lib/cjs/domain/JsonFormatTypes.js +22 -0
- package/lib/cjs/domain/JsonFormatTypes.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonLazyRef.d.ts +0 -0
- package/lib/cjs/domain/JsonLazyRef.js +26 -0
- package/lib/cjs/domain/JsonLazyRef.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonMap.d.ts +0 -0
- package/lib/cjs/domain/JsonMap.js +27 -0
- package/lib/cjs/domain/JsonMap.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonMethodStore.d.ts +0 -0
- package/lib/cjs/domain/JsonMethodStore.js +64 -0
- package/lib/cjs/domain/JsonMethodStore.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonOperation.d.ts +0 -0
- package/lib/cjs/domain/JsonOperation.js +254 -0
- package/lib/cjs/domain/JsonOperation.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonOperationPathsMap.d.ts +0 -0
- package/lib/cjs/domain/JsonOperationPathsMap.js +29 -0
- package/lib/cjs/domain/JsonOperationPathsMap.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonOperationRoute.d.ts +0 -0
- package/lib/cjs/domain/JsonOperationRoute.js +56 -0
- package/lib/cjs/domain/JsonOperationRoute.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonParameter.d.ts +0 -0
- package/lib/cjs/domain/JsonParameter.js +157 -0
- package/lib/cjs/domain/JsonParameter.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonParameterStore.d.ts +0 -0
- package/lib/cjs/domain/JsonParameterStore.js +90 -0
- package/lib/cjs/domain/JsonParameterStore.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonParameterTypes.d.ts +0 -0
- package/lib/cjs/domain/JsonParameterTypes.js +27 -0
- package/lib/cjs/domain/JsonParameterTypes.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonPropertyStore.d.ts +0 -0
- package/lib/cjs/domain/JsonPropertyStore.js +68 -0
- package/lib/cjs/domain/JsonPropertyStore.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonRequestBody.d.ts +0 -0
- package/lib/cjs/domain/JsonRequestBody.js +32 -0
- package/lib/cjs/domain/JsonRequestBody.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonResponse.d.ts +0 -0
- package/lib/cjs/domain/JsonResponse.js +86 -0
- package/lib/cjs/domain/JsonResponse.js.map +1 -0
- package/lib/{domain → cjs/domain}/JsonSchema.d.ts +0 -0
- package/lib/cjs/domain/JsonSchema.js +692 -0
- package/lib/cjs/domain/JsonSchema.js.map +1 -0
- package/lib/{domain → cjs/domain}/SpecTypes.d.ts +0 -0
- package/lib/cjs/domain/SpecTypes.js +10 -0
- package/lib/cjs/domain/SpecTypes.js.map +1 -0
- package/lib/{domain → cjs/domain}/index.d.ts +0 -0
- package/lib/cjs/domain/index.js +20 -0
- package/lib/cjs/domain/index.js.map +1 -0
- package/lib/{hooks → cjs/hooks}/alterIgnore.d.ts +0 -0
- package/lib/cjs/hooks/alterIgnore.js +21 -0
- package/lib/cjs/hooks/alterIgnore.js.map +1 -0
- package/lib/{hooks → cjs/hooks}/alterRequiredGroups.d.ts +0 -0
- package/lib/cjs/hooks/alterRequiredGroups.js +15 -0
- package/lib/cjs/hooks/alterRequiredGroups.js.map +1 -0
- package/lib/{index.d.ts → cjs/index.d.ts} +0 -0
- package/lib/cjs/index.js +23 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/IgnoreCallback.d.ts +0 -0
- package/lib/cjs/interfaces/IgnoreCallback.js +3 -0
- package/lib/cjs/interfaces/IgnoreCallback.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/JsonHookContext.d.ts +0 -0
- package/lib/cjs/interfaces/JsonHookContext.js +3 -0
- package/lib/cjs/interfaces/JsonHookContext.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/JsonOpenSpec.d.ts +0 -0
- package/lib/cjs/interfaces/JsonOpenSpec.js +3 -0
- package/lib/cjs/interfaces/JsonOpenSpec.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/JsonSchemaOptions.d.ts +0 -0
- package/lib/cjs/interfaces/JsonSchemaOptions.js +3 -0
- package/lib/cjs/interfaces/JsonSchemaOptions.js.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/index.d.ts +0 -0
- package/lib/cjs/interfaces/index.js +8 -0
- package/lib/cjs/interfaces/index.js.map +1 -0
- package/lib/{registries → cjs/registries}/JsonSchemaMapperContainer.d.ts +0 -0
- package/lib/cjs/registries/JsonSchemaMapperContainer.js +33 -0
- package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +1 -0
- package/lib/{utils → cjs/utils}/buildPath.d.ts +0 -0
- package/lib/cjs/utils/buildPath.js +13 -0
- package/lib/cjs/utils/buildPath.js.map +1 -0
- package/lib/{utils → cjs/utils}/concatParameters.d.ts +0 -0
- package/lib/cjs/utils/concatParameters.js +16 -0
- package/lib/cjs/utils/concatParameters.js.map +1 -0
- package/lib/{utils → cjs/utils}/concatPath.d.ts +0 -0
- package/lib/cjs/utils/concatPath.js +8 -0
- package/lib/cjs/utils/concatPath.js.map +1 -0
- package/lib/{utils → cjs/utils}/defineStatusModel.d.ts +0 -0
- package/lib/cjs/utils/defineStatusModel.js +13 -0
- package/lib/cjs/utils/defineStatusModel.js.map +1 -0
- package/lib/{utils → cjs/utils}/from.d.ts +0 -0
- package/lib/cjs/utils/from.js +272 -0
- package/lib/cjs/utils/from.js.map +1 -0
- package/lib/{utils → cjs/utils}/generics.d.ts +0 -0
- package/lib/cjs/utils/generics.js +40 -0
- package/lib/cjs/utils/generics.js.map +1 -0
- package/lib/{utils → cjs/utils}/getComputedType.d.ts +0 -0
- package/lib/cjs/utils/getComputedType.js +26 -0
- package/lib/cjs/utils/getComputedType.js.map +1 -0
- package/lib/{utils → cjs/utils}/getInheritedStores.d.ts +0 -0
- package/lib/cjs/utils/getInheritedStores.js +23 -0
- package/lib/cjs/utils/getInheritedStores.js.map +1 -0
- package/lib/{utils → cjs/utils}/getJsonEntityStore.d.ts +0 -0
- package/lib/cjs/utils/getJsonEntityStore.js +25 -0
- package/lib/cjs/utils/getJsonEntityStore.js.map +1 -0
- package/lib/{utils → cjs/utils}/getJsonPathParameters.d.ts +0 -0
- package/lib/cjs/utils/getJsonPathParameters.js +73 -0
- package/lib/cjs/utils/getJsonPathParameters.js.map +1 -0
- package/lib/{utils → cjs/utils}/getJsonSchema.d.ts +0 -0
- package/lib/cjs/utils/getJsonSchema.js +55 -0
- package/lib/cjs/utils/getJsonSchema.js.map +1 -0
- package/lib/{utils → cjs/utils}/getJsonType.d.ts +0 -0
- package/lib/cjs/utils/getJsonType.js +40 -0
- package/lib/cjs/utils/getJsonType.js.map +1 -0
- package/lib/{utils → cjs/utils}/getOperationsRoutes.d.ts +0 -0
- package/lib/cjs/utils/getOperationsRoutes.js +36 -0
- package/lib/cjs/utils/getOperationsRoutes.js.map +1 -0
- package/lib/{utils → cjs/utils}/getOperationsStores.d.ts +0 -0
- package/lib/cjs/utils/getOperationsStores.js +33 -0
- package/lib/cjs/utils/getOperationsStores.js.map +1 -0
- package/lib/{utils → cjs/utils}/getPropertiesStores.d.ts +0 -0
- package/lib/cjs/utils/getPropertiesStores.js +45 -0
- package/lib/cjs/utils/getPropertiesStores.js.map +1 -0
- package/lib/{utils → cjs/utils}/getRequiredProperties.d.ts +0 -0
- package/lib/cjs/utils/getRequiredProperties.js +67 -0
- package/lib/cjs/utils/getRequiredProperties.js.map +1 -0
- package/lib/{utils → cjs/utils}/getSpec.d.ts +0 -0
- package/lib/cjs/utils/getSpec.js +87 -0
- package/lib/cjs/utils/getSpec.js.map +1 -0
- package/lib/{utils → cjs/utils}/isJsonClass.d.ts +0 -0
- package/lib/cjs/utils/isJsonClass.js +12 -0
- package/lib/cjs/utils/isJsonClass.js.map +1 -0
- package/lib/{utils → cjs/utils}/isSuccessStatus.d.ts +0 -0
- package/lib/cjs/utils/isSuccessStatus.js +8 -0
- package/lib/cjs/utils/isSuccessStatus.js.map +1 -0
- package/lib/{utils → cjs/utils}/mapHeaders.d.ts +0 -0
- package/lib/cjs/utils/mapHeaders.js +29 -0
- package/lib/cjs/utils/mapHeaders.js.map +1 -0
- package/lib/{utils → cjs/utils}/mapNullableType.d.ts +0 -0
- package/lib/cjs/utils/mapNullableType.js +30 -0
- package/lib/cjs/utils/mapNullableType.js.map +1 -0
- package/lib/{utils → cjs/utils}/mapRouteOptions.d.ts +0 -0
- package/lib/cjs/utils/mapRouteOptions.js +26 -0
- package/lib/cjs/utils/mapRouteOptions.js.map +1 -0
- package/lib/{utils → cjs/utils}/matchGroups.d.ts +0 -0
- package/lib/cjs/utils/matchGroups.js +23 -0
- package/lib/cjs/utils/matchGroups.js.map +1 -0
- package/lib/{utils → cjs/utils}/mergeOperation.d.ts +0 -0
- package/lib/cjs/utils/mergeOperation.js +44 -0
- package/lib/cjs/utils/mergeOperation.js.map +1 -0
- package/lib/{utils → cjs/utils}/mergeSpec.d.ts +0 -0
- package/lib/cjs/utils/mergeSpec.js +46 -0
- package/lib/cjs/utils/mergeSpec.js.map +1 -0
- package/lib/{utils → cjs/utils}/operationIdFormatter.d.ts +0 -0
- package/lib/cjs/utils/operationIdFormatter.js +37 -0
- package/lib/cjs/utils/operationIdFormatter.js.map +1 -0
- package/lib/{utils → cjs/utils}/ref.d.ts +0 -0
- package/lib/cjs/utils/ref.js +70 -0
- package/lib/cjs/utils/ref.js.map +1 -0
- package/lib/{utils → cjs/utils}/toJsonMapCollection.d.ts +0 -0
- package/lib/cjs/utils/toJsonMapCollection.js +15 -0
- package/lib/cjs/utils/toJsonMapCollection.js.map +1 -0
- package/lib/{utils → cjs/utils}/toJsonRegex.d.ts +0 -0
- package/lib/cjs/utils/toJsonRegex.js +12 -0
- package/lib/cjs/utils/toJsonRegex.js.map +1 -0
- package/lib/esm/components/anyMapper.js +20 -0
- package/lib/esm/components/anyMapper.js.map +1 -0
- package/lib/esm/components/classMapper.js +37 -0
- package/lib/esm/components/classMapper.js.map +1 -0
- package/lib/esm/components/genericsMapper.js +58 -0
- package/lib/esm/components/genericsMapper.js.map +1 -0
- package/lib/esm/components/index.js +10 -0
- package/lib/esm/components/index.js.map +1 -0
- package/lib/esm/components/inheritedClassMapper.js +18 -0
- package/lib/esm/components/inheritedClassMapper.js.map +1 -0
- package/lib/esm/components/itemMapper.js +6 -0
- package/lib/esm/components/itemMapper.js.map +1 -0
- package/lib/esm/components/lazyRefMapper.js +15 -0
- package/lib/esm/components/lazyRefMapper.js.map +1 -0
- package/lib/esm/components/mapMapper.js +21 -0
- package/lib/esm/components/mapMapper.js.map +1 -0
- package/lib/esm/components/objectMapper.js +21 -0
- package/lib/esm/components/objectMapper.js.map +1 -0
- package/lib/esm/components/schemaMapper.js +96 -0
- package/lib/esm/components/schemaMapper.js.map +1 -0
- package/lib/esm/constants/httpMethods.js +43 -0
- package/lib/esm/constants/httpMethods.js.map +1 -0
- package/lib/esm/constants/httpStatusMessages.js +105 -0
- package/lib/esm/constants/httpStatusMessages.js.map +1 -0
- package/lib/esm/decorators/class/children.js +20 -0
- package/lib/esm/decorators/class/children.js.map +1 -0
- package/lib/esm/decorators/collections/collectionContains.js +25 -0
- package/lib/esm/decorators/collections/collectionContains.js.map +1 -0
- package/lib/esm/decorators/collections/collectionOf.js +97 -0
- package/lib/esm/decorators/collections/collectionOf.js.map +1 -0
- package/lib/esm/decorators/collections/maxItems.js +56 -0
- package/lib/esm/decorators/collections/maxItems.js.map +1 -0
- package/lib/esm/decorators/collections/maxProperties.js +79 -0
- package/lib/esm/decorators/collections/maxProperties.js.map +1 -0
- package/lib/esm/decorators/collections/minItems.js +60 -0
- package/lib/esm/decorators/collections/minItems.js.map +1 -0
- package/lib/esm/decorators/collections/minProperties.js +78 -0
- package/lib/esm/decorators/collections/minProperties.js.map +1 -0
- package/lib/esm/decorators/collections/uniqueItems.js +56 -0
- package/lib/esm/decorators/collections/uniqueItems.js.map +1 -0
- package/lib/esm/decorators/common/additionalProperties.js +16 -0
- package/lib/esm/decorators/common/additionalProperties.js.map +1 -0
- package/lib/esm/decorators/common/allOf.js +18 -0
- package/lib/esm/decorators/common/allOf.js.map +1 -0
- package/lib/esm/decorators/common/allow.js +43 -0
- package/lib/esm/decorators/common/allow.js.map +1 -0
- package/lib/esm/decorators/common/any.js +42 -0
- package/lib/esm/decorators/common/any.js.map +1 -0
- package/lib/esm/decorators/common/anyOf.js +22 -0
- package/lib/esm/decorators/common/anyOf.js.map +1 -0
- package/lib/esm/decorators/common/const.js +66 -0
- package/lib/esm/decorators/common/const.js.map +1 -0
- package/lib/esm/decorators/common/customKey.js +38 -0
- package/lib/esm/decorators/common/customKey.js.map +1 -0
- package/lib/esm/decorators/common/default.js +47 -0
- package/lib/esm/decorators/common/default.js.map +1 -0
- package/lib/esm/decorators/common/description.js +72 -0
- package/lib/esm/decorators/common/description.js.map +1 -0
- package/lib/esm/decorators/common/enum.js +26 -0
- package/lib/esm/decorators/common/enum.js.map +1 -0
- package/lib/esm/decorators/common/example.js +17 -0
- package/lib/esm/decorators/common/example.js.map +1 -0
- package/lib/esm/decorators/common/examples.js +17 -0
- package/lib/esm/decorators/common/examples.js.map +1 -0
- package/lib/esm/decorators/common/exclusiveMaximum.js +73 -0
- package/lib/esm/decorators/common/exclusiveMaximum.js.map +1 -0
- package/lib/esm/decorators/common/exclusiveMinimum.js +73 -0
- package/lib/esm/decorators/common/exclusiveMinimum.js.map +1 -0
- package/lib/esm/decorators/common/format.js +476 -0
- package/lib/esm/decorators/common/format.js.map +1 -0
- package/lib/esm/decorators/common/forwardGroups.js +16 -0
- package/lib/esm/decorators/common/forwardGroups.js.map +1 -0
- package/lib/esm/decorators/common/groups.js +37 -0
- package/lib/esm/decorators/common/groups.js.map +1 -0
- package/lib/esm/decorators/common/hidden.js +36 -0
- package/lib/esm/decorators/common/hidden.js.map +1 -0
- package/lib/esm/decorators/common/ignore.js +67 -0
- package/lib/esm/decorators/common/ignore.js.map +1 -0
- package/lib/esm/decorators/common/integer.js +67 -0
- package/lib/esm/decorators/common/integer.js.map +1 -0
- package/lib/esm/decorators/common/jsonEntityFn.js +28 -0
- package/lib/esm/decorators/common/jsonEntityFn.js.map +1 -0
- package/lib/esm/decorators/common/maxLength.js +85 -0
- package/lib/esm/decorators/common/maxLength.js.map +1 -0
- package/lib/esm/decorators/common/maximum.js +146 -0
- package/lib/esm/decorators/common/maximum.js.map +1 -0
- package/lib/esm/decorators/common/minLength.js +86 -0
- package/lib/esm/decorators/common/minLength.js.map +1 -0
- package/lib/esm/decorators/common/minimum.js +144 -0
- package/lib/esm/decorators/common/minimum.js.map +1 -0
- package/lib/esm/decorators/common/multipleOf.js +77 -0
- package/lib/esm/decorators/common/multipleOf.js.map +1 -0
- package/lib/esm/decorators/common/name.js +48 -0
- package/lib/esm/decorators/common/name.js.map +1 -0
- package/lib/esm/decorators/common/nullable.js +30 -0
- package/lib/esm/decorators/common/nullable.js.map +1 -0
- package/lib/esm/decorators/common/oneOf.js +22 -0
- package/lib/esm/decorators/common/oneOf.js.map +1 -0
- package/lib/esm/decorators/common/optional.js +24 -0
- package/lib/esm/decorators/common/optional.js.map +1 -0
- package/lib/esm/decorators/common/pattern.js +99 -0
- package/lib/esm/decorators/common/pattern.js.map +1 -0
- package/lib/esm/decorators/common/property.js +23 -0
- package/lib/esm/decorators/common/property.js.map +1 -0
- package/lib/esm/decorators/common/readOnly.js +17 -0
- package/lib/esm/decorators/common/readOnly.js.map +1 -0
- package/lib/esm/decorators/common/required.js +49 -0
- package/lib/esm/decorators/common/required.js.map +1 -0
- package/lib/esm/decorators/common/requiredGroups.js +25 -0
- package/lib/esm/decorators/common/requiredGroups.js.map +1 -0
- package/lib/esm/decorators/common/schema.js +63 -0
- package/lib/esm/decorators/common/schema.js.map +1 -0
- package/lib/esm/decorators/common/title.js +45 -0
- package/lib/esm/decorators/common/title.js.map +1 -0
- package/lib/esm/decorators/common/writeOnly.js +17 -0
- package/lib/esm/decorators/common/writeOnly.js.map +1 -0
- package/lib/esm/decorators/config/jsonEntityComponent.js +14 -0
- package/lib/esm/decorators/config/jsonEntityComponent.js.map +1 -0
- package/lib/esm/decorators/generics/genericOf.js +95 -0
- package/lib/esm/decorators/generics/genericOf.js.map +1 -0
- package/lib/esm/decorators/generics/generics.js +21 -0
- package/lib/esm/decorators/generics/generics.js.map +1 -0
- package/lib/esm/decorators/index.js +73 -0
- package/lib/esm/decorators/index.js.map +1 -0
- package/lib/esm/decorators/operations/consumes.js +35 -0
- package/lib/esm/decorators/operations/consumes.js.map +1 -0
- package/lib/esm/decorators/operations/contentType.js +24 -0
- package/lib/esm/decorators/operations/contentType.js.map +1 -0
- package/lib/esm/decorators/operations/deprecated.js +39 -0
- package/lib/esm/decorators/operations/deprecated.js.map +1 -0
- package/lib/esm/decorators/operations/header.js +55 -0
- package/lib/esm/decorators/operations/header.js.map +1 -0
- package/lib/esm/decorators/operations/in.js +74 -0
- package/lib/esm/decorators/operations/in.js.map +1 -0
- package/lib/esm/decorators/operations/location.js +25 -0
- package/lib/esm/decorators/operations/location.js.map +1 -0
- package/lib/esm/decorators/operations/operationId.js +20 -0
- package/lib/esm/decorators/operations/operationId.js.map +1 -0
- package/lib/esm/decorators/operations/operationPath.js +30 -0
- package/lib/esm/decorators/operations/operationPath.js.map +1 -0
- package/lib/esm/decorators/operations/partial.js +14 -0
- package/lib/esm/decorators/operations/partial.js.map +1 -0
- package/lib/esm/decorators/operations/path.js +25 -0
- package/lib/esm/decorators/operations/path.js.map +1 -0
- package/lib/esm/decorators/operations/produces.js +42 -0
- package/lib/esm/decorators/operations/produces.js.map +1 -0
- package/lib/esm/decorators/operations/redirect.js +22 -0
- package/lib/esm/decorators/operations/redirect.js.map +1 -0
- package/lib/esm/decorators/operations/returns.js +211 -0
- package/lib/esm/decorators/operations/returns.js.map +1 -0
- package/lib/esm/decorators/operations/route.js +186 -0
- package/lib/esm/decorators/operations/route.js.map +1 -0
- package/lib/esm/decorators/operations/security.js +39 -0
- package/lib/esm/decorators/operations/security.js.map +1 -0
- package/lib/esm/decorators/operations/status.js +129 -0
- package/lib/esm/decorators/operations/status.js.map +1 -0
- package/lib/esm/decorators/operations/summary.js +30 -0
- package/lib/esm/decorators/operations/summary.js.map +1 -0
- package/lib/esm/decorators/operations/tags.js +48 -0
- package/lib/esm/decorators/operations/tags.js.map +1 -0
- package/lib/esm/domain/DecoratorContext.js +84 -0
- package/lib/esm/domain/DecoratorContext.js.map +1 -0
- package/lib/esm/domain/JsonAliasMap.js +11 -0
- package/lib/esm/domain/JsonAliasMap.js.map +1 -0
- package/lib/esm/domain/JsonClassStore.js +34 -0
- package/lib/esm/domain/JsonClassStore.js.map +1 -0
- package/lib/esm/domain/JsonEntityStore.js +159 -0
- package/lib/esm/domain/JsonEntityStore.js.map +1 -0
- package/lib/esm/domain/JsonFormatTypes.js +19 -0
- package/lib/esm/domain/JsonFormatTypes.js.map +1 -0
- package/lib/esm/domain/JsonLazyRef.js +22 -0
- package/lib/esm/domain/JsonLazyRef.js.map +1 -0
- package/lib/esm/domain/JsonMap.js +23 -0
- package/lib/esm/domain/JsonMap.js.map +1 -0
- package/lib/esm/domain/JsonMethodStore.js +61 -0
- package/lib/esm/domain/JsonMethodStore.js.map +1 -0
- package/lib/esm/domain/JsonOperation.js +250 -0
- package/lib/esm/domain/JsonOperation.js.map +1 -0
- package/lib/esm/domain/JsonOperationPathsMap.js +25 -0
- package/lib/esm/domain/JsonOperationPathsMap.js.map +1 -0
- package/lib/esm/domain/JsonOperationRoute.js +52 -0
- package/lib/esm/domain/JsonOperationRoute.js.map +1 -0
- package/lib/esm/domain/JsonParameter.js +153 -0
- package/lib/esm/domain/JsonParameter.js.map +1 -0
- package/lib/esm/domain/JsonParameterStore.js +87 -0
- package/lib/esm/domain/JsonParameterStore.js.map +1 -0
- package/lib/esm/domain/JsonParameterTypes.js +22 -0
- package/lib/esm/domain/JsonParameterTypes.js.map +1 -0
- package/lib/esm/domain/JsonPropertyStore.js +65 -0
- package/lib/esm/domain/JsonPropertyStore.js.map +1 -0
- package/lib/esm/domain/JsonRequestBody.js +28 -0
- package/lib/esm/domain/JsonRequestBody.js.map +1 -0
- package/lib/esm/domain/JsonResponse.js +81 -0
- package/lib/esm/domain/JsonResponse.js.map +1 -0
- package/lib/esm/domain/JsonSchema.js +688 -0
- package/lib/esm/domain/JsonSchema.js.map +1 -0
- package/lib/esm/domain/SpecTypes.js +7 -0
- package/lib/esm/domain/SpecTypes.js.map +1 -0
- package/lib/esm/domain/index.js +17 -0
- package/lib/esm/domain/index.js.map +1 -0
- package/lib/esm/hooks/alterIgnore.js +17 -0
- package/lib/esm/hooks/alterIgnore.js.map +1 -0
- package/lib/esm/hooks/alterRequiredGroups.js +11 -0
- package/lib/esm/hooks/alterRequiredGroups.js.map +1 -0
- package/lib/esm/index.js +20 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/interfaces/IgnoreCallback.js +2 -0
- package/lib/esm/interfaces/IgnoreCallback.js.map +1 -0
- package/lib/esm/interfaces/JsonHookContext.js +2 -0
- package/lib/esm/interfaces/JsonHookContext.js.map +1 -0
- package/lib/esm/interfaces/JsonOpenSpec.js +2 -0
- package/lib/esm/interfaces/JsonOpenSpec.js.map +1 -0
- package/lib/esm/interfaces/JsonSchemaOptions.js +2 -0
- package/lib/esm/interfaces/JsonSchemaOptions.js.map +1 -0
- package/lib/esm/interfaces/index.js +5 -0
- package/lib/esm/interfaces/index.js.map +1 -0
- package/lib/esm/registries/JsonSchemaMapperContainer.js +27 -0
- package/lib/esm/registries/JsonSchemaMapperContainer.js.map +1 -0
- package/lib/esm/utils/buildPath.js +9 -0
- package/lib/esm/utils/buildPath.js.map +1 -0
- package/lib/esm/utils/concatParameters.js +12 -0
- package/lib/esm/utils/concatParameters.js.map +1 -0
- package/lib/esm/utils/concatPath.js +4 -0
- package/lib/esm/utils/concatPath.js.map +1 -0
- package/lib/esm/utils/defineStatusModel.js +8 -0
- package/lib/esm/utils/defineStatusModel.js.map +1 -0
- package/lib/esm/utils/from.js +249 -0
- package/lib/esm/utils/from.js.map +1 -0
- package/lib/esm/utils/generics.js +34 -0
- package/lib/esm/utils/generics.js.map +1 -0
- package/lib/esm/utils/getComputedType.js +22 -0
- package/lib/esm/utils/getComputedType.js.map +1 -0
- package/lib/esm/utils/getInheritedStores.js +19 -0
- package/lib/esm/utils/getInheritedStores.js.map +1 -0
- package/lib/esm/utils/getJsonEntityStore.js +20 -0
- package/lib/esm/utils/getJsonEntityStore.js.map +1 -0
- package/lib/esm/utils/getJsonPathParameters.js +69 -0
- package/lib/esm/utils/getJsonPathParameters.js.map +1 -0
- package/lib/esm/utils/getJsonSchema.js +51 -0
- package/lib/esm/utils/getJsonSchema.js.map +1 -0
- package/lib/esm/utils/getJsonType.js +36 -0
- package/lib/esm/utils/getJsonType.js.map +1 -0
- package/lib/esm/utils/getOperationsRoutes.js +32 -0
- package/lib/esm/utils/getOperationsRoutes.js.map +1 -0
- package/lib/esm/utils/getOperationsStores.js +29 -0
- package/lib/esm/utils/getOperationsStores.js.map +1 -0
- package/lib/esm/utils/getPropertiesStores.js +40 -0
- package/lib/esm/utils/getPropertiesStores.js.map +1 -0
- package/lib/esm/utils/getRequiredProperties.js +63 -0
- package/lib/esm/utils/getRequiredProperties.js.map +1 -0
- package/lib/esm/utils/getSpec.js +83 -0
- package/lib/esm/utils/getSpec.js.map +1 -0
- package/lib/esm/utils/isJsonClass.js +8 -0
- package/lib/esm/utils/isJsonClass.js.map +1 -0
- package/lib/esm/utils/isSuccessStatus.js +3 -0
- package/lib/esm/utils/isSuccessStatus.js.map +1 -0
- package/lib/esm/utils/mapHeaders.js +25 -0
- package/lib/esm/utils/mapHeaders.js.map +1 -0
- package/lib/esm/utils/mapNullableType.js +26 -0
- package/lib/esm/utils/mapNullableType.js.map +1 -0
- package/lib/esm/utils/mapRouteOptions.js +22 -0
- package/lib/esm/utils/mapRouteOptions.js.map +1 -0
- package/lib/esm/utils/matchGroups.js +18 -0
- package/lib/esm/utils/matchGroups.js.map +1 -0
- package/lib/esm/utils/mergeOperation.js +40 -0
- package/lib/esm/utils/mergeOperation.js.map +1 -0
- package/lib/esm/utils/mergeSpec.js +42 -0
- package/lib/esm/utils/mergeSpec.js.map +1 -0
- package/lib/esm/utils/operationIdFormatter.js +33 -0
- package/lib/esm/utils/operationIdFormatter.js.map +1 -0
- package/lib/esm/utils/ref.js +64 -0
- package/lib/esm/utils/ref.js.map +1 -0
- package/lib/esm/utils/toJsonMapCollection.js +11 -0
- package/lib/esm/utils/toJsonMapCollection.js.map +1 -0
- package/lib/esm/utils/toJsonRegex.js +8 -0
- package/lib/esm/utils/toJsonRegex.js.map +1 -0
- package/lib/types/components/anyMapper.d.ts +2 -0
- package/lib/types/components/classMapper.d.ts +3 -0
- package/lib/types/components/genericsMapper.d.ts +5 -0
- package/lib/types/components/index.d.ts +9 -0
- package/lib/types/components/inheritedClassMapper.d.ts +5 -0
- package/lib/types/components/itemMapper.d.ts +2 -0
- package/lib/types/components/lazyRefMapper.d.ts +3 -0
- package/lib/types/components/mapMapper.d.ts +9 -0
- package/lib/types/components/objectMapper.d.ts +8 -0
- package/lib/types/components/schemaMapper.d.ts +3 -0
- package/lib/types/constants/httpMethods.d.ts +12 -0
- package/lib/types/constants/httpStatusMessages.d.ts +272 -0
- package/lib/types/decorators/class/children.d.ts +11 -0
- package/lib/types/decorators/collections/collectionContains.d.ts +21 -0
- package/lib/types/decorators/collections/collectionOf.d.ts +101 -0
- package/lib/types/decorators/collections/maxItems.d.ts +47 -0
- package/lib/types/decorators/collections/maxProperties.d.ts +70 -0
- package/lib/types/decorators/collections/minItems.d.ts +51 -0
- package/lib/types/decorators/collections/minProperties.d.ts +69 -0
- package/lib/types/decorators/collections/uniqueItems.d.ts +50 -0
- package/lib/types/decorators/common/additionalProperties.d.ts +11 -0
- package/lib/types/decorators/common/allOf.d.ts +13 -0
- package/lib/types/decorators/common/allow.d.ts +28 -0
- package/lib/types/decorators/common/any.d.ts +38 -0
- package/lib/types/decorators/common/anyOf.d.ts +17 -0
- package/lib/types/decorators/common/const.d.ts +61 -0
- package/lib/types/decorators/common/customKey.d.ts +26 -0
- package/lib/types/decorators/common/default.d.ts +41 -0
- package/lib/types/decorators/common/description.d.ts +53 -0
- package/lib/types/decorators/common/enum.d.ts +98 -0
- package/lib/types/decorators/common/example.d.ts +11 -0
- package/lib/types/decorators/common/examples.d.ts +12 -0
- package/lib/types/decorators/common/exclusiveMaximum.d.ts +69 -0
- package/lib/types/decorators/common/exclusiveMinimum.d.ts +69 -0
- package/lib/types/decorators/common/format.d.ts +459 -0
- package/lib/types/decorators/common/forwardGroups.d.ts +10 -0
- package/lib/types/decorators/common/groups.d.ts +11 -0
- package/lib/types/decorators/common/hidden.d.ts +32 -0
- package/lib/types/decorators/common/ignore.d.ts +58 -0
- package/lib/types/decorators/common/integer.d.ts +61 -0
- package/lib/types/decorators/common/jsonEntityFn.d.ts +21 -0
- package/lib/types/decorators/common/maxLength.d.ts +76 -0
- package/lib/types/decorators/common/maximum.d.ts +138 -0
- package/lib/types/decorators/common/minLength.d.ts +77 -0
- package/lib/types/decorators/common/minimum.d.ts +136 -0
- package/lib/types/decorators/common/multipleOf.d.ts +68 -0
- package/lib/types/decorators/common/name.d.ts +32 -0
- package/lib/types/decorators/common/nullable.d.ts +25 -0
- package/lib/types/decorators/common/oneOf.d.ts +17 -0
- package/lib/types/decorators/common/optional.d.ts +10 -0
- package/lib/types/decorators/common/pattern.d.ts +93 -0
- package/lib/types/decorators/common/property.d.ts +11 -0
- package/lib/types/decorators/common/readOnly.d.ts +11 -0
- package/lib/types/decorators/common/required.d.ts +44 -0
- package/lib/types/decorators/common/requiredGroups.d.ts +10 -0
- package/lib/types/decorators/common/schema.d.ts +53 -0
- package/lib/types/decorators/common/title.d.ts +39 -0
- package/lib/types/decorators/common/writeOnly.d.ts +11 -0
- package/lib/types/decorators/config/jsonEntityComponent.d.ts +10 -0
- package/lib/types/decorators/generics/genericOf.d.ts +76 -0
- package/lib/types/decorators/generics/generics.d.ts +14 -0
- package/lib/types/decorators/index.d.ts +67 -0
- package/lib/types/decorators/operations/consumes.d.ts +19 -0
- package/lib/types/decorators/operations/contentType.d.ts +20 -0
- package/lib/types/decorators/operations/deprecated.d.ts +23 -0
- package/lib/types/decorators/operations/header.d.ts +49 -0
- package/lib/types/decorators/operations/in.d.ts +64 -0
- package/lib/types/decorators/operations/location.d.ts +22 -0
- package/lib/types/decorators/operations/operationId.d.ts +10 -0
- package/lib/types/decorators/operations/operationPath.d.ts +21 -0
- package/lib/types/decorators/operations/partial.d.ts +10 -0
- package/lib/types/decorators/operations/path.d.ts +15 -0
- package/lib/types/decorators/operations/produces.d.ts +26 -0
- package/lib/types/decorators/operations/redirect.d.ts +52 -0
- package/lib/types/decorators/operations/returns.d.ts +238 -0
- package/lib/types/decorators/operations/route.d.ts +185 -0
- package/lib/types/decorators/operations/security.d.ts +23 -0
- package/lib/types/decorators/operations/status.d.ts +127 -0
- package/lib/types/decorators/operations/summary.d.ts +20 -0
- package/lib/types/decorators/operations/tags.d.ts +23 -0
- package/lib/types/domain/DecoratorContext.d.ts +28 -0
- package/lib/types/domain/JsonAliasMap.d.ts +12 -0
- package/lib/types/domain/JsonClassStore.d.ts +12 -0
- package/lib/types/domain/JsonEntityStore.d.ts +132 -0
- package/lib/types/domain/JsonFormatTypes.d.ts +17 -0
- package/lib/types/domain/JsonLazyRef.d.ts +11 -0
- package/lib/types/domain/JsonMap.d.ts +7 -0
- package/lib/types/domain/JsonMethodStore.d.ts +19 -0
- package/lib/types/domain/JsonOperation.d.ts +51 -0
- package/lib/types/domain/JsonOperationPathsMap.d.ts +7 -0
- package/lib/types/domain/JsonOperationRoute.d.ts +24 -0
- package/lib/types/domain/JsonParameter.d.ts +22 -0
- package/lib/types/domain/JsonParameterStore.d.ts +30 -0
- package/lib/types/domain/JsonParameterTypes.d.ts +16 -0
- package/lib/types/domain/JsonPropertyStore.d.ts +23 -0
- package/lib/types/domain/JsonRequestBody.d.ts +11 -0
- package/lib/types/domain/JsonResponse.d.ts +22 -0
- package/lib/types/domain/JsonSchema.d.ts +337 -0
- package/lib/types/domain/SpecTypes.d.ts +5 -0
- package/lib/types/domain/index.d.ts +16 -0
- package/lib/types/hooks/alterIgnore.d.ts +9 -0
- package/lib/types/hooks/alterRequiredGroups.d.ts +6 -0
- package/lib/types/index.d.ts +19 -0
- package/lib/types/interfaces/IgnoreCallback.d.ts +4 -0
- package/lib/types/interfaces/JsonHookContext.d.ts +17 -0
- package/lib/types/interfaces/JsonOpenSpec.d.ts +9 -0
- package/lib/types/interfaces/JsonSchemaOptions.d.ts +26 -0
- package/lib/types/interfaces/index.d.ts +4 -0
- package/lib/types/registries/JsonSchemaMapperContainer.d.ts +18 -0
- package/lib/types/utils/buildPath.d.ts +6 -0
- package/lib/types/utils/concatParameters.d.ts +4 -0
- package/lib/types/utils/concatPath.d.ts +1 -0
- package/lib/types/utils/defineStatusModel.d.ts +3 -0
- package/lib/types/utils/from.d.ts +189 -0
- package/lib/types/utils/generics.d.ts +50 -0
- package/lib/types/utils/getComputedType.d.ts +5 -0
- package/lib/types/utils/getInheritedStores.d.ts +8 -0
- package/lib/types/utils/getJsonEntityStore.d.ts +19 -0
- package/lib/types/utils/getJsonPathParameters.d.ts +7 -0
- package/lib/types/utils/getJsonSchema.d.ts +4 -0
- package/lib/types/utils/getJsonType.d.ts +5 -0
- package/lib/types/utils/getOperationsRoutes.d.ts +8 -0
- package/lib/types/utils/getOperationsStores.d.ts +6 -0
- package/lib/types/utils/getPropertiesStores.d.ts +20 -0
- package/lib/types/utils/getRequiredProperties.d.ts +6 -0
- package/lib/types/utils/getSpec.d.ts +49 -0
- package/lib/types/utils/isJsonClass.d.ts +4 -0
- package/lib/types/utils/isSuccessStatus.d.ts +2 -0
- package/lib/types/utils/mapHeaders.d.ts +9 -0
- package/lib/types/utils/mapNullableType.d.ts +3 -0
- package/lib/types/utils/mapRouteOptions.d.ts +5 -0
- package/lib/types/utils/matchGroups.d.ts +4 -0
- package/lib/types/utils/mergeOperation.d.ts +17 -0
- package/lib/types/utils/mergeSpec.d.ts +23 -0
- package/lib/types/utils/operationIdFormatter.d.ts +4 -0
- package/lib/types/utils/ref.d.ts +14 -0
- package/lib/types/utils/toJsonMapCollection.d.ts +7 -0
- package/lib/types/utils/toJsonRegex.d.ts +5 -0
- package/package.json +16 -12
- package/tsconfig.compile.esm.json +23 -0
- package/lib/index.js +0 -8379
- package/lib/index.js.map +0 -1
- package/lib/index.modern.js +0 -8230
- package/lib/index.modern.js.map +0 -1
- package/lib/utils/mergeSpec.benchmark.d.ts +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOperationsRoutes = void 0;
|
|
4
|
+
const getOperationsStores_1 = require("./getOperationsStores");
|
|
5
|
+
const JsonOperationRoute_1 = require("../domain/JsonOperationRoute");
|
|
6
|
+
const getJsonEntityStore_1 = require("./getJsonEntityStore");
|
|
7
|
+
function getOperationsRoutes(token, options = {}) {
|
|
8
|
+
const store = token.isStore ? token : (0, getJsonEntityStore_1.getJsonEntityStore)(token);
|
|
9
|
+
const basePath = ((options.basePath || "") + (store.path || "")).replace(/\/\//gi, "/");
|
|
10
|
+
let operationsRoutes = [];
|
|
11
|
+
if (options.withChildren) {
|
|
12
|
+
const children = store.get("childrenControllers", []);
|
|
13
|
+
operationsRoutes = children.reduce((operationsRoutes, token) => {
|
|
14
|
+
return operationsRoutes.concat(getOperationsRoutes(token, {
|
|
15
|
+
...options,
|
|
16
|
+
basePath
|
|
17
|
+
}));
|
|
18
|
+
}, operationsRoutes);
|
|
19
|
+
}
|
|
20
|
+
return [...(0, getOperationsStores_1.getOperationsStores)(token).values()].reduce((routes, endpoint) => {
|
|
21
|
+
const { operation } = endpoint;
|
|
22
|
+
if (operation) {
|
|
23
|
+
operation.operationPaths.forEach((operationPath) => {
|
|
24
|
+
routes.push(new JsonOperationRoute_1.JsonOperationRoute({
|
|
25
|
+
basePath,
|
|
26
|
+
token,
|
|
27
|
+
endpoint,
|
|
28
|
+
operationPath
|
|
29
|
+
}));
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return routes;
|
|
33
|
+
}, operationsRoutes);
|
|
34
|
+
}
|
|
35
|
+
exports.getOperationsRoutes = getOperationsRoutes;
|
|
36
|
+
//# sourceMappingURL=getOperationsRoutes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOperationsRoutes.js","sourceRoot":"","sources":["../../../src/utils/getOperationsRoutes.ts"],"names":[],"mappings":";;;AACA,+DAA0D;AAC1D,qEAAgE;AAEhE,6DAAwD;AAOxD,SAAgB,mBAAmB,CACjC,KAAsB,EACtB,UAAsC,EAAE;IAExC,MAAM,KAAK,GAAoB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAA,uCAAkB,EAAC,KAAK,CAAC,CAAC;IACjF,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACxF,IAAI,gBAAgB,GAAiC,EAAE,CAAC;IAExD,IAAI,OAAO,CAAC,YAAY,EAAE;QACxB,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAS,qBAAqB,EAAE,EAAE,CAAC,CAAC;QAE9D,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,gBAAgB,EAAE,KAAK,EAAE,EAAE;YAC7D,OAAO,gBAAgB,CAAC,MAAM,CAC5B,mBAAmB,CAAC,KAAK,EAAE;gBACzB,GAAG,OAAO;gBACV,QAAQ;aACT,CAAC,CACH,CAAC;QACJ,CAAC,EAAE,gBAAgB,CAAC,CAAC;KACtB;IAED,OAAO,CAAC,GAAG,IAAA,yCAAmB,EAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE;QAC1E,MAAM,EAAC,SAAS,EAAC,GAAG,QAAQ,CAAC;QAE7B,IAAI,SAAS,EAAE;YACb,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;gBACjD,MAAM,CAAC,IAAI,CACT,IAAI,uCAAkB,CAAS;oBAC7B,QAAQ;oBACR,KAAK;oBACL,QAAQ;oBACR,aAAa;iBACd,CAAC,CACH,CAAC;YACJ,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,gBAAgB,CAAC,CAAC;AACvB,CAAC;AAvCD,kDAuCC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {getOperationsStores} from \"./getOperationsStores\";\nimport {JsonOperationRoute} from \"../domain/JsonOperationRoute\";\nimport {JsonEntityStore} from \"../domain/JsonEntityStore\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore\";\n\nexport interface GetOperationsRoutesOptions {\n withChildren?: boolean;\n basePath?: string;\n}\n\nexport function getOperationsRoutes<Entity extends JsonEntityStore = JsonEntityStore>(\n token: Type<any> | any,\n options: GetOperationsRoutesOptions = {}\n): JsonOperationRoute<Entity>[] {\n const store: JsonEntityStore = token.isStore ? token : getJsonEntityStore(token);\n const basePath = ((options.basePath || \"\") + (store.path || \"\")).replace(/\\/\\//gi, \"/\");\n let operationsRoutes: JsonOperationRoute<Entity>[] = [];\n\n if (options.withChildren) {\n const children = store.get<Type[]>(\"childrenControllers\", []);\n\n operationsRoutes = children.reduce((operationsRoutes, token) => {\n return operationsRoutes.concat(\n getOperationsRoutes(token, {\n ...options,\n basePath\n })\n );\n }, operationsRoutes);\n }\n\n return [...getOperationsStores(token).values()].reduce((routes, endpoint) => {\n const {operation} = endpoint;\n\n if (operation) {\n operation.operationPaths.forEach((operationPath) => {\n routes.push(\n new JsonOperationRoute<Entity>({\n basePath,\n token,\n endpoint,\n operationPath\n })\n );\n });\n }\n\n return routes;\n }, operationsRoutes);\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOperationsStores = void 0;
|
|
4
|
+
const JsonMethodStore_1 = require("../domain/JsonMethodStore");
|
|
5
|
+
const JsonOperationPathsMap_1 = require("../domain/JsonOperationPathsMap");
|
|
6
|
+
const getInheritedStores_1 = require("./getInheritedStores");
|
|
7
|
+
const getJsonEntityStore_1 = require("./getJsonEntityStore");
|
|
8
|
+
/**
|
|
9
|
+
* @ignore
|
|
10
|
+
*/
|
|
11
|
+
function getOperationsStores(target) {
|
|
12
|
+
const store = target.isStore ? target : (0, getJsonEntityStore_1.getJsonEntityStore)(target);
|
|
13
|
+
if (!store.$operations) {
|
|
14
|
+
const operationPaths = new JsonOperationPathsMap_1.JsonOperationPathsMap();
|
|
15
|
+
store.$operations = new Map();
|
|
16
|
+
(0, getInheritedStores_1.getInheritedStores)(store).forEach((currentStore) => {
|
|
17
|
+
currentStore.children.forEach((propStore) => {
|
|
18
|
+
if (propStore instanceof JsonMethodStore_1.JsonMethodStore && !store.$operations.has(propStore.propertyKey)) {
|
|
19
|
+
store.$operations.set(propStore.propertyKey, propStore);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
store.$operations.forEach((store) => {
|
|
24
|
+
store.operation.operationPaths.forEach((operationPath) => {
|
|
25
|
+
operationPaths.setOperationPath(operationPath);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
operationPaths.clear();
|
|
29
|
+
}
|
|
30
|
+
return store.$operations;
|
|
31
|
+
}
|
|
32
|
+
exports.getOperationsStores = getOperationsStores;
|
|
33
|
+
//# sourceMappingURL=getOperationsStores.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOperationsStores.js","sourceRoot":"","sources":["../../../src/utils/getOperationsStores.ts"],"names":[],"mappings":";;;AACA,+DAA0D;AAE1D,2EAAsE;AACtE,6DAAwD;AACxD,6DAAwD;AAExD;;GAEG;AACH,SAAgB,mBAAmB,CAA8C,MAAuB;IACtG,MAAM,KAAK,GAAmB,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,uCAAkB,EAAC,MAAM,CAAC,CAAC;IAEnF,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;QACtB,MAAM,cAAc,GAAG,IAAI,6CAAqB,EAAE,CAAC;QACnD,KAAK,CAAC,WAAW,GAAG,IAAI,GAAG,EAAa,CAAC;QAEzC,IAAA,uCAAkB,EAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;YACjD,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;gBAC1C,IAAI,SAAS,YAAY,iCAAe,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE;oBACzF,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;iBACzD;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,KAAsB,EAAE,EAAE;YACnD,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;gBACvD,cAAc,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,cAAc,CAAC,KAAK,EAAE,CAAC;KACxB;IAED,OAAO,KAAK,CAAC,WAAW,CAAC;AAC3B,CAAC;AAzBD,kDAyBC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {JsonMethodStore} from \"../domain/JsonMethodStore\";\nimport type {JsonClassStore} from \"../domain/JsonClassStore\";\nimport {JsonOperationPathsMap} from \"../domain/JsonOperationPathsMap\";\nimport {getInheritedStores} from \"./getInheritedStores\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore\";\n\n/**\n * @ignore\n */\nexport function getOperationsStores<T extends JsonMethodStore = JsonMethodStore>(target: Type<any> | any): Map<string, T> {\n const store: JsonClassStore = target.isStore ? target : getJsonEntityStore(target);\n\n if (!store.$operations) {\n const operationPaths = new JsonOperationPathsMap();\n store.$operations = new Map<string, T>();\n\n getInheritedStores(store).forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (propStore instanceof JsonMethodStore && !store.$operations.has(propStore.propertyKey)) {\n store.$operations.set(propStore.propertyKey, propStore);\n }\n });\n });\n\n store.$operations.forEach((store: JsonMethodStore) => {\n store.operation.operationPaths.forEach((operationPath) => {\n operationPaths.setOperationPath(operationPath);\n });\n });\n\n operationPaths.clear();\n }\n\n return store.$operations;\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProperties = exports.getPropertiesStores = void 0;
|
|
4
|
+
const alterIgnore_1 = require("../hooks/alterIgnore");
|
|
5
|
+
const getInheritedStores_1 = require("./getInheritedStores");
|
|
6
|
+
const getJsonEntityStore_1 = require("./getJsonEntityStore");
|
|
7
|
+
/**
|
|
8
|
+
* Return the list of properties including properties from inherited classes
|
|
9
|
+
* @param target
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
function getPropertiesStores(target) {
|
|
13
|
+
const store = target.isStore ? target : (0, getJsonEntityStore_1.getJsonEntityStore)(target);
|
|
14
|
+
if (!store.$properties) {
|
|
15
|
+
const stores = (0, getInheritedStores_1.getInheritedStores)(store);
|
|
16
|
+
store.$properties = new Map();
|
|
17
|
+
stores.forEach((currentStore) => {
|
|
18
|
+
currentStore.children.forEach((propStore) => {
|
|
19
|
+
if (!store.$properties.has(propStore.propertyKey)) {
|
|
20
|
+
store.$properties.set(propStore.propertyKey, propStore);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return store.$properties;
|
|
26
|
+
}
|
|
27
|
+
exports.getPropertiesStores = getPropertiesStores;
|
|
28
|
+
/**
|
|
29
|
+
* @ignore
|
|
30
|
+
*/
|
|
31
|
+
function getProperties(target, options = {}) {
|
|
32
|
+
const stores = getPropertiesStores(target);
|
|
33
|
+
const map = new Map();
|
|
34
|
+
stores.forEach((store, key) => {
|
|
35
|
+
if (!options.withIgnoredProps) {
|
|
36
|
+
if ((0, alterIgnore_1.alterIgnore)(store.itemSchema, options)) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
map.set(key, store);
|
|
41
|
+
});
|
|
42
|
+
return map;
|
|
43
|
+
}
|
|
44
|
+
exports.getProperties = getProperties;
|
|
45
|
+
//# sourceMappingURL=getPropertiesStores.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPropertiesStores.js","sourceRoot":"","sources":["../../../src/utils/getPropertiesStores.ts"],"names":[],"mappings":";;;AAGA,sDAAiD;AACjD,6DAAwD;AACxD,6DAAwD;AAExD;;;;GAIG;AACH,SAAgB,mBAAmB,CACjC,MAAuB;IAEvB,MAAM,KAAK,GAAmB,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,uCAAkB,EAAC,MAAM,CAAC,CAAC;IAEnF,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;QACtB,MAAM,MAAM,GAAG,IAAA,uCAAkB,EAAC,KAAK,CAAC,CAAC;QACzC,KAAK,CAAC,WAAW,GAAG,IAAI,GAAG,EAAE,CAAC;QAE9B,MAAM,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;YAC9B,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;gBAC1C,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE;oBACjD,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;iBACzD;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,KAAK,CAAC,WAAW,CAAC;AAC3B,CAAC;AAnBD,kDAmBC;AAYD;;GAEG;AACH,SAAgB,aAAa,CAC3B,MAAuB,EACvB,UAAgC,EAAE;IAElC,MAAM,MAAM,GAAG,mBAAmB,CAAI,MAAM,CAAC,CAAC;IAC9C,MAAM,GAAG,GAAqC,IAAI,GAAG,EAAE,CAAC;IAExD,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QAC5B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE;YAC7B,IAAI,IAAA,yBAAW,EAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE;gBAC1C,OAAO;aACR;SACF;QAED,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC;AAlBD,sCAkBC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport type {JsonClassStore} from \"../domain/JsonClassStore\";\nimport type {JsonPropertyStore} from \"../domain/JsonPropertyStore\";\nimport {alterIgnore} from \"../hooks/alterIgnore\";\nimport {getInheritedStores} from \"./getInheritedStores\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore\";\n\n/**\n * Return the list of properties including properties from inherited classes\n * @param target\n * @ignore\n */\nexport function getPropertiesStores<T extends JsonPropertyStore = JsonPropertyStore>(\n target: Type<any> | any\n): Map<string | symbol | number, T> {\n const store: JsonClassStore = target.isStore ? target : getJsonEntityStore(target);\n\n if (!store.$properties) {\n const stores = getInheritedStores(store);\n store.$properties = new Map();\n\n stores.forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (!store.$properties.has(propStore.propertyKey)) {\n store.$properties.set(propStore.propertyKey, propStore);\n }\n });\n });\n }\n\n return store.$properties;\n}\n\n/**\n * @ignore\n */\nexport interface GetPropertiesOptions {\n withIgnoredProps?: boolean;\n groups?: string[] | false;\n\n [type: string]: any;\n}\n\n/**\n * @ignore\n */\nexport function getProperties<T extends JsonPropertyStore = JsonPropertyStore>(\n target: Type<any> | any,\n options: GetPropertiesOptions = {}\n) {\n const stores = getPropertiesStores<T>(target);\n const map: Map<string | symbol | number, T> = new Map();\n\n stores.forEach((store, key) => {\n if (!options.withIgnoredProps) {\n if (alterIgnore(store.itemSchema, options)) {\n return;\n }\n }\n\n map.set(key, store);\n });\n\n return map;\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRequiredProperties = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const alterRequiredGroups_1 = require("../hooks/alterRequiredGroups");
|
|
6
|
+
function applyStringRule(obj, propSchema) {
|
|
7
|
+
if (!(propSchema === null || propSchema === void 0 ? void 0 : propSchema.$allow.includes(""))) {
|
|
8
|
+
if ([].concat(propSchema === null || propSchema === void 0 ? void 0 : propSchema.get("type")).includes("string")) {
|
|
9
|
+
const minLength = obj === null || obj === void 0 ? void 0 : obj.minLength;
|
|
10
|
+
// Disallow empty string
|
|
11
|
+
if (minLength === undefined) {
|
|
12
|
+
return {
|
|
13
|
+
...obj,
|
|
14
|
+
minLength: 1
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return obj;
|
|
20
|
+
}
|
|
21
|
+
function mapRequiredProps(obj, schema, options = {}) {
|
|
22
|
+
const { useAlias } = options;
|
|
23
|
+
const props = Object.keys(obj.properties || {});
|
|
24
|
+
return (keys, key) => {
|
|
25
|
+
const aliasedKey = useAlias ? schema.alias.get(key) || key : key;
|
|
26
|
+
if (props.includes(aliasedKey)) {
|
|
27
|
+
const propSchema = schema.get("properties")[key];
|
|
28
|
+
const serializeSchema = obj.properties[aliasedKey];
|
|
29
|
+
obj.properties[aliasedKey] = applyStringRule(serializeSchema, propSchema); // applyNullRule(applyStringRule(serializeSchema, propSchema), propSchema);
|
|
30
|
+
// obj.properties[aliasedKey] = mapNullableType(obj.properties[aliasedKey]);
|
|
31
|
+
return keys.concat(aliasedKey);
|
|
32
|
+
}
|
|
33
|
+
return keys;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function extractRequiredProps(obj, schema, options) {
|
|
37
|
+
let required = obj.required || [];
|
|
38
|
+
required = [...required, ...schema.$required];
|
|
39
|
+
if (schema.get("properties")) {
|
|
40
|
+
required = Object.entries(schema.get("properties")).reduce((required, [key, prop]) => {
|
|
41
|
+
if (prop && prop.$selfRequired !== undefined) {
|
|
42
|
+
return prop.$selfRequired ? required.concat(key) : required.filter((k) => k === key);
|
|
43
|
+
}
|
|
44
|
+
return required;
|
|
45
|
+
}, required);
|
|
46
|
+
}
|
|
47
|
+
return (0, alterRequiredGroups_1.alterRequiredGroups)((0, core_1.uniq)(required), schema, options);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @ignore
|
|
51
|
+
*/
|
|
52
|
+
function getRequiredProperties(obj, schema, options) {
|
|
53
|
+
if (options.groups && options.groups.includes("partial")) {
|
|
54
|
+
return obj;
|
|
55
|
+
}
|
|
56
|
+
let required = extractRequiredProps(obj, schema, options);
|
|
57
|
+
required = (0, core_1.uniq)(required).reduce(mapRequiredProps(obj, schema, options), []);
|
|
58
|
+
if (required.length) {
|
|
59
|
+
return {
|
|
60
|
+
...obj,
|
|
61
|
+
required
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return obj;
|
|
65
|
+
}
|
|
66
|
+
exports.getRequiredProperties = getRequiredProperties;
|
|
67
|
+
//# sourceMappingURL=getRequiredProperties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRequiredProperties.js","sourceRoot":"","sources":["../../../src/utils/getRequiredProperties.ts"],"names":[],"mappings":"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","sourcesContent":["import {uniq} from \"@tsed/core\";\nimport type {JsonSchema} from \"../domain/JsonSchema\";\nimport {alterRequiredGroups} from \"../hooks/alterRequiredGroups\";\nimport type {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\n\nfunction applyStringRule(obj: any, propSchema: JsonSchema) {\n if (!propSchema?.$allow.includes(\"\")) {\n if (([] as string[]).concat(propSchema?.get(\"type\")).includes(\"string\")) {\n const minLength = obj?.minLength;\n // Disallow empty string\n if (minLength === undefined) {\n return {\n ...obj,\n minLength: 1\n };\n }\n }\n }\n\n return obj;\n}\n\nfunction mapRequiredProps(obj: any, schema: JsonSchema, options: JsonSchemaOptions = {}) {\n const {useAlias} = options;\n const props = Object.keys(obj.properties || {});\n\n return (keys: string[], key: string) => {\n const aliasedKey = useAlias ? (schema.alias.get(key) as string) || key : key;\n\n if (props.includes(aliasedKey)) {\n const propSchema = schema.get(\"properties\")[key];\n const serializeSchema = obj.properties[aliasedKey];\n\n obj.properties[aliasedKey] = applyStringRule(serializeSchema, propSchema); // applyNullRule(applyStringRule(serializeSchema, propSchema), propSchema);\n // obj.properties[aliasedKey] = mapNullableType(obj.properties[aliasedKey]);\n\n return keys.concat(aliasedKey);\n }\n\n return keys;\n };\n}\n\nfunction extractRequiredProps(obj: any, schema: JsonSchema, options: JsonSchemaOptions): string[] {\n let required: string[] = obj.required || [];\n\n required = [...required, ...schema.$required];\n\n if (schema.get(\"properties\")) {\n required = Object.entries(schema.get(\"properties\")).reduce((required, [key, prop]: [string, any]) => {\n if (prop && prop.$selfRequired !== undefined) {\n return prop.$selfRequired ? required.concat(key) : required.filter((k) => k === key);\n }\n\n return required;\n }, required);\n }\n\n return alterRequiredGroups(uniq(required), schema, options);\n}\n\n/**\n * @ignore\n */\nexport function getRequiredProperties(obj: any, schema: JsonSchema, options: JsonSchemaOptions) {\n if (options.groups && options.groups.includes(\"partial\")) {\n return obj;\n }\n\n let required = extractRequiredProps(obj, schema, options);\n\n required = uniq(required).reduce(mapRequiredProps(obj, schema, options), []);\n\n if (required.length) {\n return {\n ...obj,\n required\n };\n }\n\n return obj;\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSpec = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const SpecTypes_1 = require("../domain/SpecTypes");
|
|
6
|
+
const buildPath_1 = require("./buildPath");
|
|
7
|
+
const getJsonEntityStore_1 = require("./getJsonEntityStore");
|
|
8
|
+
const getOperationsStores_1 = require("./getOperationsStores");
|
|
9
|
+
const mergeOperation_1 = require("./mergeOperation");
|
|
10
|
+
const operationIdFormatter_1 = require("./operationIdFormatter");
|
|
11
|
+
/**
|
|
12
|
+
* @ignore
|
|
13
|
+
*/
|
|
14
|
+
const caches = new Map();
|
|
15
|
+
/**
|
|
16
|
+
* @ignore
|
|
17
|
+
*/
|
|
18
|
+
function get(model, options, cb) {
|
|
19
|
+
if (!caches.has(model)) {
|
|
20
|
+
caches.set(model, new Map());
|
|
21
|
+
}
|
|
22
|
+
const cache = caches.get(model);
|
|
23
|
+
const key = JSON.stringify(options);
|
|
24
|
+
if (!cache.has(key)) {
|
|
25
|
+
cache.set(key, cb());
|
|
26
|
+
}
|
|
27
|
+
return cache.get(key);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Return the swagger or open spec for the given class.
|
|
31
|
+
* @param model
|
|
32
|
+
* @param options
|
|
33
|
+
*/
|
|
34
|
+
function getSpec(model, options = { specType: SpecTypes_1.SpecTypes.SWAGGER }) {
|
|
35
|
+
if (!options.specType) {
|
|
36
|
+
options.specType = SpecTypes_1.SpecTypes.SWAGGER;
|
|
37
|
+
}
|
|
38
|
+
options = {
|
|
39
|
+
...options,
|
|
40
|
+
operationIdFormatter: options.operationIdFormatter || (0, operationIdFormatter_1.operationIdFormatter)(options.operationIdPattern),
|
|
41
|
+
root: false,
|
|
42
|
+
specType: options.specType
|
|
43
|
+
};
|
|
44
|
+
return get(model, options, () => {
|
|
45
|
+
const store = (0, getJsonEntityStore_1.getJsonEntityStore)(model);
|
|
46
|
+
const { specType = SpecTypes_1.SpecTypes.SWAGGER, schemas = {}, paths = {}, rootPath = "/", tags = [] } = options;
|
|
47
|
+
const ctrlPath = store.path;
|
|
48
|
+
const defaultTags = (0, core_1.cleanObject)({
|
|
49
|
+
name: store.schema.getName(),
|
|
50
|
+
description: store.schema.get("description")
|
|
51
|
+
});
|
|
52
|
+
const specJson = { paths };
|
|
53
|
+
(0, getOperationsStores_1.getOperationsStores)(model).forEach((operationStore) => {
|
|
54
|
+
if (operationStore.store.get("hidden")) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const operation = operationStore.operation.toJSON({ ...options, specType, schemas });
|
|
58
|
+
operationStore.operation.operationPaths.forEach(({ path, method }) => {
|
|
59
|
+
if (method) {
|
|
60
|
+
(0, mergeOperation_1.mergeOperation)(specJson, operation, {
|
|
61
|
+
rootPath: (0, buildPath_1.buildPath)(rootPath + ctrlPath),
|
|
62
|
+
path,
|
|
63
|
+
method,
|
|
64
|
+
defaultTags,
|
|
65
|
+
tags,
|
|
66
|
+
specType,
|
|
67
|
+
operationId: (path) => options.operationIdFormatter(operationStore.parent.schema.get("name") || operationStore.parent.targetName, operationStore.propertyName, path)
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
specJson.tags = (0, core_1.uniqBy)(tags, "name");
|
|
73
|
+
if (Object.keys(schemas).length) {
|
|
74
|
+
if (specType === SpecTypes_1.SpecTypes.OPENAPI) {
|
|
75
|
+
specJson.components = {
|
|
76
|
+
schemas
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
specJson.definitions = schemas;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return specJson;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
exports.getSpec = getSpec;
|
|
87
|
+
//# sourceMappingURL=getSpec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSpec.js","sourceRoot":"","sources":["../../../src/utils/getSpec.ts"],"names":[],"mappings":"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","sourcesContent":["import {cleanObject, Type, uniqBy} from \"@tsed/core\";\nimport {OpenSpec2, OpenSpec3} from \"@tsed/openspec\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\nimport {JsonSchemaOptions} from \"../interfaces\";\nimport {buildPath} from \"./buildPath\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore\";\nimport {getOperationsStores} from \"./getOperationsStores\";\nimport {mergeOperation} from \"./mergeOperation\";\nimport {operationIdFormatter} from \"./operationIdFormatter\";\n\nexport interface SpecSerializerOptions extends JsonSchemaOptions {\n specType?: SpecTypes.SWAGGER | SpecTypes.OPENAPI;\n /**\n * Paths\n */\n paths?: any;\n /**\n * Root path. This paths will be added to all generated paths Object.\n */\n rootPath?: string;\n /**\n * A function to generate the operationId.\n */\n operationIdFormatter?: (name: string, propertyKey: string, path: string) => string;\n /**\n * A pattern to generate the operationId.\n */\n operationIdPattern?: string;\n}\n\nexport interface OS3SpecSerializerOptions extends SpecSerializerOptions {\n /**\n * Define Spec types level\n */\n specType: SpecTypes.OPENAPI;\n}\n\nexport interface OS2SpecSerializerOptions extends SpecSerializerOptions {\n /**\n * Define Spec types level\n */\n specType: SpecTypes.SWAGGER;\n}\n\n/**\n * @ignore\n */\nconst caches: Map<Type<any>, Map<string, any>> = new Map();\n\n/**\n * @ignore\n */\nfunction get(model: Type<any>, options: any, cb: any) {\n if (!caches.has(model)) {\n caches.set(model, new Map());\n }\n\n const cache = caches.get(model)!;\n const key = JSON.stringify(options);\n\n if (!cache.has(key)) {\n cache.set(key, cb());\n }\n\n return cache.get(key);\n}\n\n/**\n * Return the swagger or open spec for the given class.\n * @param model\n * @param options\n */\nexport function getSpec(model: Type<any>, options: OS2SpecSerializerOptions): Partial<OpenSpec2>;\nexport function getSpec(model: Type<any>): Partial<OpenSpec2>;\nexport function getSpec(model: Type<any>, options: SpecSerializerOptions): Partial<OpenSpec2>;\n/**\n * Return the swagger or open spec for the given class.\n * @param model\n * @param options\n */\nexport function getSpec(model: Type<any>, options: OS3SpecSerializerOptions): Partial<OpenSpec3>;\n/**\n * Return the swagger or open spec for the given class.\n * @param model\n * @param options\n */\nexport function getSpec(model: Type<any>, options: SpecSerializerOptions = {specType: SpecTypes.SWAGGER}): Partial<OpenSpec2 | OpenSpec3> {\n if (!options.specType) {\n options.specType = SpecTypes.SWAGGER;\n }\n\n options = {\n ...options,\n operationIdFormatter: options.operationIdFormatter || operationIdFormatter(options.operationIdPattern),\n root: false,\n specType: options.specType\n };\n\n return get(model, options, () => {\n const store = getJsonEntityStore(model);\n const {specType = SpecTypes.SWAGGER, schemas = {}, paths = {}, rootPath = \"/\", tags = []} = options;\n const ctrlPath = store.path;\n const defaultTags = cleanObject({\n name: store.schema.getName(),\n description: store.schema.get(\"description\")\n });\n\n const specJson: any = {paths};\n\n getOperationsStores(model).forEach((operationStore) => {\n if (operationStore.store.get(\"hidden\")) {\n return;\n }\n\n const operation = operationStore.operation!.toJSON({...options, specType, schemas});\n\n operationStore.operation!.operationPaths.forEach(({path, method}: {path: string; method: string}) => {\n if (method) {\n mergeOperation(specJson, operation, {\n rootPath: buildPath(rootPath + ctrlPath),\n path,\n method,\n defaultTags,\n tags,\n specType,\n operationId: (path: string) =>\n options.operationIdFormatter!(\n operationStore.parent.schema.get(\"name\") || operationStore.parent.targetName,\n operationStore.propertyName,\n path\n )\n });\n }\n });\n });\n\n specJson.tags = uniqBy(tags, \"name\");\n\n if (Object.keys(schemas).length) {\n if (specType === SpecTypes.OPENAPI) {\n specJson.components = {\n schemas\n };\n } else {\n specJson.definitions = schemas;\n }\n }\n\n return specJson;\n });\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isJsonClass = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
/**
|
|
6
|
+
* @ignore
|
|
7
|
+
*/
|
|
8
|
+
function isJsonClass(type) {
|
|
9
|
+
return (0, core_1.isClass)(type) && ![Map, Array, Set, Object, Date, Boolean, Number, String].includes(this._target);
|
|
10
|
+
}
|
|
11
|
+
exports.isJsonClass = isJsonClass;
|
|
12
|
+
//# sourceMappingURL=isJsonClass.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isJsonClass.js","sourceRoot":"","sources":["../../../src/utils/isJsonClass.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AAEnC;;GAEG;AACH,SAAgB,WAAW,CAAC,IAAS;IACnC,OAAO,IAAA,cAAO,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAc,CAAC,CAAC;AAClH,CAAC;AAFD,kCAEC","sourcesContent":["import {isClass} from \"@tsed/core\";\n\n/**\n * @ignore\n */\nexport function isJsonClass(type: any) {\n return isClass(type) && ![Map, Array, Set, Object, Date, Boolean, Number, String].includes(this._target as any);\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isRedirectionStatus = exports.isSuccessStatus = void 0;
|
|
4
|
+
const isSuccessStatus = (code) => Number(code) && 200 <= Number(code) && Number(code) < 300;
|
|
5
|
+
exports.isSuccessStatus = isSuccessStatus;
|
|
6
|
+
const isRedirectionStatus = (code) => Number(code) && 300 <= Number(code) && Number(code) < 400;
|
|
7
|
+
exports.isRedirectionStatus = isRedirectionStatus;
|
|
8
|
+
//# sourceMappingURL=isSuccessStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSuccessStatus.js","sourceRoot":"","sources":["../../../src/utils/isSuccessStatus.ts"],"names":[],"mappings":";;;AAAO,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;AAAnH,QAAA,eAAe,mBAAoG;AACzH,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;AAAvH,QAAA,mBAAmB,uBAAoG","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapHeaders = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
/**
|
|
6
|
+
* Map input header to a standard open spec header
|
|
7
|
+
* @param headers
|
|
8
|
+
* @ignore
|
|
9
|
+
*/
|
|
10
|
+
function mapHeaders(headers) {
|
|
11
|
+
return Object.keys(headers).reduce((newHeaders, key) => {
|
|
12
|
+
const value = headers[key];
|
|
13
|
+
let type = typeof value;
|
|
14
|
+
let options = {
|
|
15
|
+
example: value
|
|
16
|
+
};
|
|
17
|
+
if (type === "object") {
|
|
18
|
+
options = value;
|
|
19
|
+
options.example = options.value === undefined ? options.example : options.value;
|
|
20
|
+
delete options.value;
|
|
21
|
+
type = typeof options.example;
|
|
22
|
+
}
|
|
23
|
+
options.type = options.type || type;
|
|
24
|
+
newHeaders[key] = (0, core_1.cleanObject)(options);
|
|
25
|
+
return newHeaders;
|
|
26
|
+
}, {});
|
|
27
|
+
}
|
|
28
|
+
exports.mapHeaders = mapHeaders;
|
|
29
|
+
//# sourceMappingURL=mapHeaders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapHeaders.js","sourceRoot":"","sources":["../../../src/utils/mapHeaders.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AAGvC;;;;GAIG;AACH,SAAgB,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,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC;QAEvC,OAAO,UAAU,CAAC;IACpB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAvBD,gCAuBC","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapNullableType = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
const SpecTypes_1 = require("../domain/SpecTypes");
|
|
6
|
+
function mapNullableType(obj, schema, options) {
|
|
7
|
+
if (!schema.nullable) {
|
|
8
|
+
return obj;
|
|
9
|
+
}
|
|
10
|
+
let types = [].concat(obj.type).filter((type) => type !== "null");
|
|
11
|
+
switch (options.specType) {
|
|
12
|
+
case SpecTypes_1.SpecTypes.SWAGGER:
|
|
13
|
+
case SpecTypes_1.SpecTypes.JSON:
|
|
14
|
+
obj.type = ["null", ...types];
|
|
15
|
+
break;
|
|
16
|
+
case SpecTypes_1.SpecTypes.OPENAPI:
|
|
17
|
+
if (types.length > 1) {
|
|
18
|
+
obj.oneOf = types.map((type) => {
|
|
19
|
+
return (0, core_1.cleanObject)({ type, nullable: true });
|
|
20
|
+
}, []);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
obj.type = types[0];
|
|
24
|
+
obj.nullable = true;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return obj;
|
|
28
|
+
}
|
|
29
|
+
exports.mapNullableType = mapNullableType;
|
|
30
|
+
//# sourceMappingURL=mapNullableType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapNullableType.js","sourceRoot":"","sources":["../../../src/utils/mapNullableType.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AAEvC,mDAA8C;AAG9C,SAAgB,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,qBAAS,CAAC,OAAO,CAAC;QACvB,KAAK,qBAAS,CAAC,IAAI;YACjB,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC;YAC9B,MAAM;QAER,KAAK,qBAAS,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,IAAA,kBAAW,EAAC,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;AAzBD,0CAyBC","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapRouteOptions = void 0;
|
|
4
|
+
const httpMethods_1 = require("../constants/httpMethods");
|
|
5
|
+
function mapRouteOptions(args) {
|
|
6
|
+
let method = undefined;
|
|
7
|
+
let path = undefined;
|
|
8
|
+
const handlers = args.filter((arg) => {
|
|
9
|
+
if (typeof arg === "string" && httpMethods_1.HTTP_METHODS.includes(arg.toLowerCase())) {
|
|
10
|
+
method = arg.toLocaleUpperCase();
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
if (typeof arg === "string" || arg instanceof RegExp) {
|
|
14
|
+
path = arg || "/";
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
return !!arg;
|
|
18
|
+
});
|
|
19
|
+
return {
|
|
20
|
+
path,
|
|
21
|
+
method,
|
|
22
|
+
handlers
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
exports.mapRouteOptions = mapRouteOptions;
|
|
26
|
+
//# sourceMappingURL=mapRouteOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapRouteOptions.js","sourceRoot":"","sources":["../../../src/utils/mapRouteOptions.ts"],"names":[],"mappings":";;;AAAA,0DAAsD;AAEtD,SAAgB,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,0BAAY,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;AAzBD,0CAyBC","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.matchGroups = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const micromatch_1 = (0, tslib_1.__importDefault)(require("micromatch"));
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
function matchGroups(groups, compareWith = []) {
|
|
10
|
+
const groupsExcludes = groups.filter((group) => group.startsWith("!")).map((group) => group.replace("!", ""));
|
|
11
|
+
const groupsIncludes = groups.filter((group) => !group.startsWith("!"));
|
|
12
|
+
if (groupsExcludes.length) {
|
|
13
|
+
if (compareWith.length && (0, micromatch_1.default)(groupsExcludes, compareWith).length) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
if (groupsIncludes.length) {
|
|
18
|
+
return !(0, micromatch_1.default)(groups.filter((group) => !group.startsWith("!")), compareWith).length;
|
|
19
|
+
}
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
exports.matchGroups = matchGroups;
|
|
23
|
+
//# sourceMappingURL=matchGroups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchGroups.js","sourceRoot":"","sources":["../../../src/utils/matchGroups.ts"],"names":[],"mappings":";;;;AAAA,yEAAoC;AAEpC;;GAEG;AACH,SAAgB,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,IAAA,oBAAU,EAAC,cAAc,EAAE,WAAW,CAAC,CAAC,MAAM,EAAE;YACxE,OAAO,IAAI,CAAC;SACb;KACF;IAED,IAAI,cAAc,CAAC,MAAM,EAAE;QACzB,OAAO,CAAC,IAAA,oBAAU,EAChB,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;AAlBD,kCAkBC","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mergeOperation = void 0;
|
|
4
|
+
const SpecTypes_1 = require("../domain/SpecTypes");
|
|
5
|
+
const concatParameters_1 = require("./concatParameters");
|
|
6
|
+
const getJsonPathParameters_1 = require("./getJsonPathParameters");
|
|
7
|
+
/**
|
|
8
|
+
* @ignore
|
|
9
|
+
*/
|
|
10
|
+
function mergeOperation(obj, operation, { rootPath, specType, operationId, defaultTags, tags, path, method }) {
|
|
11
|
+
const pathParameters = (0, getJsonPathParameters_1.getJsonPathParameters)(rootPath, path).map(({ path, parameters }) => {
|
|
12
|
+
path = path ? path : "/";
|
|
13
|
+
if (specType === SpecTypes_1.SpecTypes.OPENAPI) {
|
|
14
|
+
parameters = parameters.map(({ type, ...param }) => {
|
|
15
|
+
return {
|
|
16
|
+
...param,
|
|
17
|
+
schema: {
|
|
18
|
+
type
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return { path, parameters };
|
|
24
|
+
});
|
|
25
|
+
return pathParameters.reduce((obj, { path, parameters }) => {
|
|
26
|
+
var _a;
|
|
27
|
+
parameters = (0, concatParameters_1.concatParameters)(parameters, operation);
|
|
28
|
+
path = path ? path : "/";
|
|
29
|
+
const operationTags = ((_a = operation.tags) === null || _a === void 0 ? void 0 : _a.length) ? operation.tags : [defaultTags];
|
|
30
|
+
obj.paths[path] = {
|
|
31
|
+
...obj.paths[path],
|
|
32
|
+
[method.toLowerCase()]: {
|
|
33
|
+
operationId: operation.operationId || operationId(path),
|
|
34
|
+
...operation,
|
|
35
|
+
tags: operationTags.map(({ name }) => name),
|
|
36
|
+
parameters
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
tags.push(...operationTags);
|
|
40
|
+
return obj;
|
|
41
|
+
}, obj);
|
|
42
|
+
}
|
|
43
|
+
exports.mergeOperation = mergeOperation;
|
|
44
|
+
//# sourceMappingURL=mergeOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeOperation.js","sourceRoot":"","sources":["../../../src/utils/mergeOperation.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAC9C,yDAAoD;AACpD,mEAA8D;AAe9D;;GAEG;AACH,SAAgB,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,IAAA,6CAAqB,EAAC,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,qBAAS,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,IAAA,mCAAgB,EAAC,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;AA1CD,wCA0CC","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"]}
|
|
File without changes
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mergeSpec = exports.tagsReducer = exports.security = exports.parameters = exports.schemesReducer = void 0;
|
|
4
|
+
const core_1 = require("@tsed/core");
|
|
5
|
+
/**
|
|
6
|
+
* @ignore
|
|
7
|
+
*/
|
|
8
|
+
exports.schemesReducer = (0, core_1.mergeReducerBuilder)((current, value) => (current.type && current.type === value.type) || (current.$ref && current.$ref === value.$ref));
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
exports.parameters = (0, core_1.mergeReducerBuilder)((current, value) => current.in === value.in && current.name === value.name);
|
|
13
|
+
/**
|
|
14
|
+
* @ignore
|
|
15
|
+
*/
|
|
16
|
+
exports.security = (0, core_1.mergeReducerBuilder)((current, value) => {
|
|
17
|
+
return !!Object.keys(value).find((key) => !!current[key]);
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* @ignore
|
|
21
|
+
*/
|
|
22
|
+
exports.tagsReducer = (0, core_1.mergeReducerBuilder)((current, value) => current.name === value.name);
|
|
23
|
+
/**
|
|
24
|
+
* @ignore
|
|
25
|
+
*/
|
|
26
|
+
const SPEC_REDUCERS = {
|
|
27
|
+
security: exports.security,
|
|
28
|
+
parameters: exports.parameters,
|
|
29
|
+
oneOf: exports.schemesReducer,
|
|
30
|
+
anyOf: exports.schemesReducer,
|
|
31
|
+
allOf: exports.schemesReducer,
|
|
32
|
+
tags: exports.tagsReducer
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Merge two spec
|
|
36
|
+
* @param spec
|
|
37
|
+
* @param input
|
|
38
|
+
*/
|
|
39
|
+
function mergeSpec(spec, input) {
|
|
40
|
+
return (0, core_1.deepMerge)(spec, input, {
|
|
41
|
+
reducers: SPEC_REDUCERS,
|
|
42
|
+
cleanUndefinedProps: true
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
exports.mergeSpec = mergeSpec;
|
|
46
|
+
//# sourceMappingURL=mergeSpec.js.map
|