@tsed/schema 8.34.0 → 8.35.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/esm/compat.js +8 -0
- package/lib/esm/components/index.js +37 -27
- package/lib/esm/components/{default → mappers/default}/anyMapper.js +5 -5
- package/lib/esm/components/{default → mappers/default}/classMapper.js +5 -5
- package/lib/esm/components/{default → mappers/default}/discriminatorMappingMapper.js +3 -3
- package/lib/esm/components/{default → mappers/default}/enumsMapper.js +2 -2
- package/lib/esm/components/{default → mappers/default}/genericsMapper.js +7 -6
- package/lib/esm/components/{default → mappers/default}/inheritedClassMapper.js +3 -3
- package/lib/esm/components/{default → mappers/default}/lazyRefMapper.js +3 -3
- package/lib/esm/components/{default → mappers/default}/mapMapper.js +2 -2
- package/lib/esm/components/{default → mappers/default}/nextMapper.js +16 -16
- package/lib/esm/components/{default → mappers/default}/nullableMapper.js +3 -3
- package/lib/esm/components/{default → mappers/default}/objectMapper.js +4 -4
- package/lib/esm/components/mappers/default/ofMapper.js +9 -0
- package/lib/esm/components/{default → mappers/default}/requiredMapper.js +3 -3
- package/lib/esm/components/{default → mappers/default}/schemaMapper.js +11 -6
- package/lib/esm/components/mappers/open-spec/discriminatorMappingMapper.js +8 -0
- package/lib/esm/components/mappers/open-spec/enumsMapper.js +12 -0
- package/lib/esm/components/{open-spec → mappers/open-spec}/generate.js +3 -4
- package/lib/esm/components/{open-spec → mappers/open-spec}/nullableMapper.js +3 -4
- package/lib/esm/components/{open-spec → mappers/open-spec}/operationInFilesMapper.js +2 -2
- package/lib/esm/components/{open-spec → mappers/open-spec}/operationInParameterMapper.js +3 -3
- package/lib/esm/components/mappers/open-spec/operationInParametersMapper.js +5 -0
- package/lib/esm/components/{open-spec → mappers/open-spec}/operationInQueryMapper.js +3 -3
- package/lib/esm/components/{open-spec → mappers/open-spec}/operationMapper.js +4 -4
- package/lib/esm/components/{open-spec → mappers/open-spec}/operationMediaMapper.js +2 -2
- package/lib/esm/components/{open-spec → mappers/open-spec}/operationRequestBodyMapper.js +4 -4
- package/lib/esm/components/{open-spec → mappers/open-spec}/operationResponseMapper.js +2 -2
- package/lib/esm/components/{open-spec → mappers/open-spec}/pathsMapper.js +10 -10
- package/lib/esm/{domain → components/stores}/JsonClassStore.js +8 -13
- package/lib/esm/{domain → components/stores}/JsonMethodStore.js +33 -28
- package/lib/esm/{domain → components/stores}/JsonParameterStore.js +14 -18
- package/lib/esm/{domain → components/stores}/JsonPropertyStore.js +15 -18
- package/lib/esm/components/types/arrayType.js +15 -0
- package/lib/esm/components/types/classType.js +8 -0
- package/lib/esm/components/types/genericType.js +8 -0
- package/lib/esm/components/types/mapType.js +15 -0
- package/lib/esm/components/types/primitiveType.js +21 -0
- package/lib/esm/components/types/setType.js +12 -0
- package/lib/esm/decorators/class/discriminatorValue.js +1 -1
- package/lib/esm/decorators/collections/collectionOf.js +2 -2
- package/lib/esm/decorators/collections/maxItems.js +1 -1
- package/lib/esm/decorators/collections/maxProperties.js +1 -1
- package/lib/esm/decorators/collections/minItems.js +1 -1
- package/lib/esm/decorators/collections/minProperties.js +1 -1
- package/lib/esm/decorators/collections/uniqueItems.js +1 -1
- package/lib/esm/decorators/common/defaultMsg.js +1 -1
- package/lib/esm/decorators/common/discriminatorKey.js +1 -1
- package/lib/esm/decorators/common/enum.js +1 -1
- package/lib/esm/decorators/common/exclusiveMaximum.js +1 -1
- package/lib/esm/decorators/common/exclusiveMinimum.js +1 -1
- package/lib/esm/decorators/common/format.js +1 -1
- package/lib/esm/decorators/common/jsonEntityFn.js +2 -2
- package/lib/esm/decorators/common/maxLength.js +1 -1
- package/lib/esm/decorators/common/maximum.js +1 -1
- package/lib/esm/decorators/common/minLength.js +1 -1
- package/lib/esm/decorators/common/minimum.js +1 -1
- package/lib/esm/decorators/common/multipleOf.js +1 -1
- package/lib/esm/decorators/common/name.js +1 -1
- package/lib/esm/decorators/common/nullable.js +2 -2
- package/lib/esm/decorators/common/pattern.js +1 -1
- package/lib/esm/decorators/common/required.js +1 -1
- package/lib/esm/decorators/common/requiredGroups.js +1 -1
- package/lib/esm/decorators/common/typeError.js +1 -1
- package/lib/esm/decorators/config/jsonEntityComponent.js +3 -2
- package/lib/esm/decorators/generics/genericOf.js +2 -2
- package/lib/esm/decorators/generics/generics.js +2 -3
- package/lib/esm/decorators/operations/consumes.js +1 -1
- package/lib/esm/decorators/operations/deprecated.js +1 -1
- package/lib/esm/decorators/operations/header.js +1 -1
- package/lib/esm/decorators/operations/in.js +5 -6
- package/lib/esm/decorators/operations/inFile.js +2 -2
- package/lib/esm/decorators/operations/operation.js +1 -1
- package/lib/esm/decorators/operations/produces.js +1 -1
- package/lib/esm/decorators/operations/publish.js +1 -1
- package/lib/esm/decorators/operations/returns.js +4 -4
- package/lib/esm/decorators/operations/route.js +1 -1
- package/lib/esm/decorators/operations/security.js +1 -1
- package/lib/esm/decorators/operations/subscribe.js +1 -1
- package/lib/esm/decorators/operations/tags.js +1 -1
- package/lib/esm/domain/DecoratorContext.js +2 -2
- package/lib/esm/domain/JsonEntityStore.js +7 -41
- package/lib/esm/domain/JsonLazyRef.js +1 -1
- package/lib/esm/domain/JsonMap.js +1 -1
- package/lib/esm/domain/JsonOperation.js +1 -1
- package/lib/esm/domain/JsonParameter.js +3 -3
- package/lib/esm/domain/JsonRequestBody.js +1 -1
- package/lib/esm/domain/JsonResponse.js +2 -2
- package/lib/esm/domain/JsonSchema.js +92 -137
- package/lib/esm/domain/index.js +26 -0
- package/lib/esm/{utils/getJsonSchema.js → fn/compile.js} +20 -7
- package/lib/esm/fn/enums.js +1 -1
- package/lib/esm/fn/from.js +32 -9
- package/lib/esm/fn/generic.js +9 -0
- package/lib/esm/fn/index.js +25 -4
- package/lib/esm/fn/lazyRef.js +3 -3
- package/lib/esm/fn/oas/compileSpec.js +9 -0
- package/lib/esm/{utils → fn/oas}/generateSpec.js +2 -2
- package/lib/esm/{utils → fn/oas}/getSpec.js +4 -4
- package/lib/esm/{utils → fn/oas}/getSpecType.js +1 -1
- package/lib/esm/{utils → fn/oas}/mapOpenSpec.js +1 -1
- package/lib/esm/hooks/alterOneOf.js +1 -1
- package/lib/esm/index.js +59 -48
- package/lib/esm/registries/JsonEntitiesContainer.js +38 -0
- package/lib/esm/registries/JsonSchemaMapperContainer.js +10 -1
- package/lib/esm/registries/JsonTypesContainer.js +18 -0
- package/lib/esm/utils/generics.js +15 -2
- package/lib/esm/utils/getInheritedStores.js +1 -1
- package/lib/esm/utils/getOperationsRoutes.js +3 -3
- package/lib/esm/utils/getOperationsStores.js +4 -4
- package/lib/esm/utils/getPropertiesStores.js +2 -2
- package/lib/esm/utils/ref.js +2 -2
- package/lib/types/compat.d.ts +17 -0
- package/lib/types/components/index.d.ts +37 -27
- package/lib/types/components/{default → mappers/default}/anyMapper.d.ts +1 -1
- package/lib/types/components/mappers/default/classMapper.d.ts +3 -0
- package/lib/types/components/{default → mappers/default}/discriminatorMappingMapper.d.ts +2 -2
- package/lib/types/components/mappers/default/enumsMapper.d.ts +3 -0
- package/lib/types/components/{default → mappers/default}/genericsMapper.d.ts +2 -2
- package/lib/types/components/{default → mappers/default}/inheritedClassMapper.d.ts +1 -1
- package/lib/types/components/mappers/default/lazyRefMapper.d.ts +3 -0
- package/lib/types/components/{default → mappers/default}/mapMapper.d.ts +1 -1
- package/lib/types/components/{default → mappers/default}/nextMapper.d.ts +2 -2
- package/lib/types/components/{default → mappers/default}/nullableMapper.d.ts +1 -1
- package/lib/types/components/{default → mappers/default}/objectMapper.d.ts +1 -1
- package/lib/types/components/mappers/default/ofMapper.d.ts +3 -0
- package/lib/types/components/mappers/default/requiredMapper.d.ts +3 -0
- package/lib/types/components/mappers/default/schemaMapper.d.ts +3 -0
- package/lib/types/components/mappers/open-spec/enumsMapper.d.ts +3 -0
- package/lib/types/components/mappers/open-spec/generate.d.ts +1 -0
- package/lib/types/components/mappers/open-spec/nullableMapper.d.ts +3 -0
- package/lib/types/components/{open-spec → mappers/open-spec}/operationInParameterMapper.d.ts +3 -3
- package/lib/types/components/mappers/open-spec/operationInParametersMapper.d.ts +3 -0
- package/lib/types/components/mappers/open-spec/operationMapper.d.ts +3 -0
- package/lib/types/components/mappers/open-spec/operationMediaMapper.d.ts +3 -0
- package/lib/types/components/mappers/open-spec/operationRequestBodyMapper.d.ts +3 -0
- package/lib/types/components/mappers/open-spec/operationResponseMapper.d.ts +3 -0
- package/lib/types/components/{open-spec → mappers/open-spec}/pathsMapper.d.ts +1 -1
- package/lib/types/{domain → components/stores}/JsonClassStore.d.ts +4 -4
- package/lib/types/{domain → components/stores}/JsonMethodStore.d.ts +33 -19
- package/lib/types/{domain → components/stores}/JsonParameterStore.d.ts +9 -5
- package/lib/types/{domain → components/stores}/JsonPropertyStore.d.ts +7 -4
- package/lib/types/components/types/arrayType.d.ts +2 -0
- package/lib/types/components/types/classType.d.ts +2 -0
- package/lib/types/components/types/genericType.d.ts +2 -0
- package/lib/types/components/types/mapType.d.ts +2 -0
- package/lib/types/components/types/primitiveType.d.ts +2 -0
- package/lib/types/components/types/setType.d.ts +2 -0
- package/lib/types/decorators/common/any.d.ts +1 -1
- package/lib/types/decorators/common/examples.d.ts +1 -1
- package/lib/types/decorators/common/format.d.ts +1 -1
- package/lib/types/decorators/common/ignore.d.ts +1 -1
- package/lib/types/decorators/common/jsonEntityFn.d.ts +1 -1
- package/lib/types/decorators/config/jsonEntityComponent.d.ts +2 -1
- package/lib/types/decorators/generics/genericOf.d.ts +1 -1
- package/lib/types/decorators/operations/header.d.ts +1 -1
- package/lib/types/decorators/operations/in.d.ts +1 -2
- package/lib/types/decorators/operations/location.d.ts +1 -1
- package/lib/types/decorators/operations/redirect.d.ts +1 -1
- package/lib/types/decorators/operations/returns.d.ts +3 -3
- package/lib/types/decorators/operations/status.d.ts +1 -1
- package/lib/types/domain/Generics.d.ts +6 -0
- package/lib/types/domain/JsonEntityStore.d.ts +8 -19
- package/lib/types/domain/JsonLazyRef.d.ts +1 -1
- package/lib/types/domain/JsonMap.d.ts +1 -1
- package/lib/types/domain/JsonMedia.d.ts +1 -1
- package/lib/types/domain/JsonOperation.d.ts +2 -2
- package/lib/types/domain/JsonOperationRoute.d.ts +3 -3
- package/lib/types/domain/JsonParameter.d.ts +3 -3
- package/lib/types/domain/JsonRequestBody.d.ts +1 -1
- package/lib/types/domain/JsonResponse.d.ts +1 -1
- package/lib/types/domain/JsonSchema.d.ts +28 -22
- package/lib/types/{interfaces → domain}/JsonSchemaOptions.d.ts +14 -6
- package/lib/types/domain/__fixtures__/inspectOperationsPaths.d.ts +1 -1
- package/lib/types/domain/index.d.ts +26 -0
- package/lib/types/domain/types.d.ts +1 -1
- package/lib/types/fn/any.d.ts +1 -1
- package/lib/types/fn/boolean.d.ts +1 -1
- package/lib/types/{utils → fn}/compile.d.ts +10 -3
- package/lib/types/fn/date.d.ts +3 -3
- package/lib/types/fn/email.d.ts +1 -1
- package/lib/types/fn/from.d.ts +31 -3
- package/lib/types/fn/generic.d.ts +10 -0
- package/lib/types/fn/index.d.ts +24 -3
- package/lib/types/fn/integer.d.ts +1 -1
- package/lib/types/fn/lazyRef.d.ts +1 -1
- package/lib/types/fn/number.d.ts +1 -1
- package/lib/types/fn/oas/compileSpec.d.ts +6 -0
- package/lib/types/{utils → fn/oas}/getSpec.d.ts +1 -1
- package/lib/types/{utils → fn/oas}/getSpecType.d.ts +1 -1
- package/lib/types/{utils → fn/oas}/transformToOS2.d.ts +1 -1
- package/lib/types/fn/object.d.ts +1 -1
- package/lib/types/fn/string.d.ts +1 -1
- package/lib/types/fn/uri.d.ts +1 -1
- package/lib/types/fn/url.d.ts +1 -1
- package/lib/types/hooks/alterOneOf.d.ts +1 -1
- package/lib/types/hooks/alterRequiredGroups.d.ts +1 -1
- package/lib/types/index.d.ts +59 -48
- package/lib/types/{utils/getJsonEntityStore.d.ts → registries/JsonEntitiesContainer.d.ts} +5 -10
- package/lib/types/registries/JsonSchemaMapperContainer.d.ts +7 -1
- package/lib/types/registries/JsonTypesContainer.d.ts +15 -0
- package/lib/types/registries/{enumRegistries.d.ts → enumRegistry.d.ts} +1 -1
- package/lib/types/utils/generics.d.ts +13 -5
- package/lib/types/utils/getInheritedStores.d.ts +1 -1
- package/lib/types/utils/getOperationsRoutes.d.ts +3 -3
- package/lib/types/utils/getOperationsStores.d.ts +1 -1
- package/lib/types/utils/getPropertiesStores.d.ts +1 -1
- package/lib/types/utils/mapHeaders.d.ts +1 -1
- package/lib/types/utils/operationIdFormatter.d.ts +1 -1
- package/lib/types/utils/ref.d.ts +1 -1
- package/lib/types/utils/removeHiddenOperation.d.ts +1 -1
- package/lib/types/utils/toJsonMapCollection.d.ts +1 -1
- package/package.json +18 -19
- package/lib/esm/components/default/ofMapper.js +0 -9
- package/lib/esm/components/open-spec/discriminatorMappingMapper.js +0 -6
- package/lib/esm/components/open-spec/enumsMapper.js +0 -14
- package/lib/esm/components/open-spec/operationInParametersMapper.js +0 -5
- package/lib/esm/utils/compile.js +0 -13
- package/lib/esm/utils/getJsonEntityStore.js +0 -13
- package/lib/types/components/default/classMapper.d.ts +0 -3
- package/lib/types/components/default/enumsMapper.d.ts +0 -3
- package/lib/types/components/default/lazyRefMapper.d.ts +0 -3
- package/lib/types/components/default/ofMapper.d.ts +0 -3
- package/lib/types/components/default/requiredMapper.d.ts +0 -3
- package/lib/types/components/default/schemaMapper.d.ts +0 -3
- package/lib/types/components/open-spec/enumsMapper.d.ts +0 -3
- package/lib/types/components/open-spec/nullableMapper.d.ts +0 -3
- package/lib/types/components/open-spec/operationInParametersMapper.d.ts +0 -3
- package/lib/types/components/open-spec/operationMapper.d.ts +0 -3
- package/lib/types/components/open-spec/operationMediaMapper.d.ts +0 -3
- package/lib/types/components/open-spec/operationRequestBodyMapper.d.ts +0 -3
- package/lib/types/components/open-spec/operationResponseMapper.d.ts +0 -3
- package/lib/types/utils/getJsonSchema.d.ts +0 -6
- package/lib/esm/{interfaces/IgnoreCallback.js → domain/Generics.js} +0 -0
- package/lib/esm/{interfaces/JsonHookContext.js → domain/IgnoreCallback.js} +0 -0
- package/lib/esm/{interfaces/JsonOpenSpec.js → domain/JsonHookContext.js} +0 -0
- package/lib/esm/{interfaces/JsonSchemaOptions.js → domain/JsonOpenSpec.js} +0 -0
- package/lib/{types/components/open-spec/discriminatorMappingMapper.d.ts → esm/domain/JsonSchemaOptions.js} +0 -0
- package/lib/esm/{utils → fn/oas}/mapOpenSpec2.js +0 -0
- package/lib/esm/{utils → fn/oas}/mapOpenSpec3.js +0 -0
- package/lib/esm/{utils → fn/oas}/mapOpenSpecInfo.js +0 -0
- package/lib/esm/{utils → fn/oas}/mergeSpec.js +0 -0
- package/lib/esm/{utils → fn/oas}/transformToOS2.js +0 -0
- package/lib/esm/registries/{enumRegistries.js → enumRegistry.js} +0 -0
- package/lib/types/components/{open-spec/generate.d.ts → mappers/open-spec/discriminatorMappingMapper.d.ts} +0 -0
- package/lib/types/components/{open-spec → mappers/open-spec}/operationInFilesMapper.d.ts +0 -0
- package/lib/types/components/{open-spec → mappers/open-spec}/operationInQueryMapper.d.ts +0 -0
- package/lib/types/{interfaces → domain}/IgnoreCallback.d.ts +0 -0
- package/lib/types/{interfaces → domain}/JsonHookContext.d.ts +0 -0
- package/lib/types/{interfaces → domain}/JsonOpenSpec.d.ts +0 -0
- package/lib/types/{utils → fn/oas}/generateSpec.d.ts +1 -1
- /package/lib/types/{utils → fn/oas}/mapOpenSpec.d.ts +0 -0
- /package/lib/types/{utils → fn/oas}/mapOpenSpec2.d.ts +0 -0
- /package/lib/types/{utils → fn/oas}/mapOpenSpec3.d.ts +0 -0
- /package/lib/types/{utils → fn/oas}/mapOpenSpecInfo.d.ts +0 -0
- /package/lib/types/{utils → fn/oas}/mergeSpec.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getValue, setValue } from "@tsed/core";
|
|
2
|
-
import { SpecTypes } from "
|
|
2
|
+
import { SpecTypes } from "../../domain/index.js";
|
|
3
3
|
import { getSpecType } from "./getSpecType.js";
|
|
4
4
|
import { mapOpenSpec2 } from "./mapOpenSpec2.js";
|
|
5
5
|
import { mapOpenSpec3 } from "./mapOpenSpec3.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { ARRAY_PROPERTIES, BOOLEAN_PROPERTIES, COMMON_PROPERTIES, MANY_OF_PROPERTIES, NUMBER_PROPERTIES, OBJECT_PROPERTIES, STRING_PROPERTIES } from "../constants/jsonSchemaProperties.js";
|
|
1
2
|
import { isBoolean } from "@tsed/core/utils/isBoolean.js";
|
|
2
3
|
import { isNumber } from "@tsed/core/utils/isNumber.js";
|
|
3
4
|
import { isString } from "@tsed/core/utils/isString.js";
|
|
4
|
-
import { ARRAY_PROPERTIES, BOOLEAN_PROPERTIES, COMMON_PROPERTIES, MANY_OF_PROPERTIES, NUMBER_PROPERTIES, OBJECT_PROPERTIES, STRING_PROPERTIES } from "../constants/jsonSchemaProperties.js";
|
|
5
5
|
function findManyOf(obj) {
|
|
6
6
|
return MANY_OF_PROPERTIES.find((keyword) => obj[keyword]);
|
|
7
7
|
}
|
package/lib/esm/index.js
CHANGED
|
@@ -1,34 +1,45 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Automatically generated by @tsed/barrels.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./components/default/classMapper.js";
|
|
6
|
-
export * from "./components/default/discriminatorMappingMapper.js";
|
|
7
|
-
export * from "./components/default/enumsMapper.js";
|
|
8
|
-
export * from "./components/default/genericsMapper.js";
|
|
9
|
-
export * from "./components/default/inheritedClassMapper.js";
|
|
10
|
-
export * from "./components/default/lazyRefMapper.js";
|
|
11
|
-
export * from "./components/default/mapMapper.js";
|
|
12
|
-
export * from "./components/default/nextMapper.js";
|
|
13
|
-
export * from "./components/default/nullableMapper.js";
|
|
14
|
-
export * from "./components/default/objectMapper.js";
|
|
15
|
-
export * from "./components/default/ofMapper.js";
|
|
16
|
-
export * from "./components/default/requiredMapper.js";
|
|
17
|
-
export * from "./components/default/schemaMapper.js";
|
|
4
|
+
export * from "./compat.js";
|
|
18
5
|
export * from "./components/index.js";
|
|
19
|
-
export * from "./components/
|
|
20
|
-
export * from "./components/
|
|
21
|
-
export * from "./components/
|
|
22
|
-
export * from "./components/
|
|
23
|
-
export * from "./components/
|
|
24
|
-
export * from "./components/
|
|
25
|
-
export * from "./components/
|
|
26
|
-
export * from "./components/
|
|
27
|
-
export * from "./components/
|
|
28
|
-
export * from "./components/
|
|
29
|
-
export * from "./components/
|
|
30
|
-
export * from "./components/
|
|
31
|
-
export * from "./components/
|
|
6
|
+
export * from "./components/mappers/default/anyMapper.js";
|
|
7
|
+
export * from "./components/mappers/default/classMapper.js";
|
|
8
|
+
export * from "./components/mappers/default/discriminatorMappingMapper.js";
|
|
9
|
+
export * from "./components/mappers/default/enumsMapper.js";
|
|
10
|
+
export * from "./components/mappers/default/genericsMapper.js";
|
|
11
|
+
export * from "./components/mappers/default/inheritedClassMapper.js";
|
|
12
|
+
export * from "./components/mappers/default/lazyRefMapper.js";
|
|
13
|
+
export * from "./components/mappers/default/mapMapper.js";
|
|
14
|
+
export * from "./components/mappers/default/nextMapper.js";
|
|
15
|
+
export * from "./components/mappers/default/nullableMapper.js";
|
|
16
|
+
export * from "./components/mappers/default/objectMapper.js";
|
|
17
|
+
export * from "./components/mappers/default/ofMapper.js";
|
|
18
|
+
export * from "./components/mappers/default/requiredMapper.js";
|
|
19
|
+
export * from "./components/mappers/default/schemaMapper.js";
|
|
20
|
+
export * from "./components/mappers/open-spec/discriminatorMappingMapper.js";
|
|
21
|
+
export * from "./components/mappers/open-spec/enumsMapper.js";
|
|
22
|
+
export * from "./components/mappers/open-spec/generate.js";
|
|
23
|
+
export * from "./components/mappers/open-spec/nullableMapper.js";
|
|
24
|
+
export * from "./components/mappers/open-spec/operationInFilesMapper.js";
|
|
25
|
+
export * from "./components/mappers/open-spec/operationInParameterMapper.js";
|
|
26
|
+
export * from "./components/mappers/open-spec/operationInParametersMapper.js";
|
|
27
|
+
export * from "./components/mappers/open-spec/operationInQueryMapper.js";
|
|
28
|
+
export * from "./components/mappers/open-spec/operationMapper.js";
|
|
29
|
+
export * from "./components/mappers/open-spec/operationMediaMapper.js";
|
|
30
|
+
export * from "./components/mappers/open-spec/operationRequestBodyMapper.js";
|
|
31
|
+
export * from "./components/mappers/open-spec/operationResponseMapper.js";
|
|
32
|
+
export * from "./components/mappers/open-spec/pathsMapper.js";
|
|
33
|
+
export * from "./components/stores/JsonClassStore.js";
|
|
34
|
+
export * from "./components/stores/JsonMethodStore.js";
|
|
35
|
+
export * from "./components/stores/JsonParameterStore.js";
|
|
36
|
+
export * from "./components/stores/JsonPropertyStore.js";
|
|
37
|
+
export * from "./components/types/arrayType.js";
|
|
38
|
+
export * from "./components/types/classType.js";
|
|
39
|
+
export * from "./components/types/genericType.js";
|
|
40
|
+
export * from "./components/types/mapType.js";
|
|
41
|
+
export * from "./components/types/primitiveType.js";
|
|
42
|
+
export * from "./components/types/setType.js";
|
|
32
43
|
export * from "./constants/httpStatusMessages.js";
|
|
33
44
|
export * from "./constants/jsonSchemaProperties.js";
|
|
34
45
|
export * from "./constants/OperationVerbs.js";
|
|
@@ -115,25 +126,27 @@ export * from "./decorators/operations/summary.js";
|
|
|
115
126
|
export * from "./decorators/operations/tags.js";
|
|
116
127
|
export * from "./decorators/operations/view.js";
|
|
117
128
|
export * from "./domain/DecoratorContext.js";
|
|
129
|
+
export * from "./domain/Generics.js";
|
|
130
|
+
export * from "./domain/IgnoreCallback.js";
|
|
131
|
+
export * from "./domain/index.js";
|
|
118
132
|
export * from "./domain/JsonAliasMap.js";
|
|
119
|
-
export * from "./domain/JsonClassStore.js";
|
|
120
133
|
export * from "./domain/JsonDiscriminator.js";
|
|
121
134
|
export * from "./domain/JsonEntityStore.js";
|
|
122
135
|
export * from "./domain/JsonFormatTypes.js";
|
|
136
|
+
export * from "./domain/JsonHookContext.js";
|
|
123
137
|
export * from "./domain/JsonLazyRef.js";
|
|
124
138
|
export * from "./domain/JsonMap.js";
|
|
125
139
|
export * from "./domain/JsonMedia.js";
|
|
126
|
-
export * from "./domain/
|
|
140
|
+
export * from "./domain/JsonOpenSpec.js";
|
|
127
141
|
export * from "./domain/JsonOperation.js";
|
|
128
142
|
export * from "./domain/JsonOperationPathsMap.js";
|
|
129
143
|
export * from "./domain/JsonOperationRoute.js";
|
|
130
144
|
export * from "./domain/JsonParameter.js";
|
|
131
|
-
export * from "./domain/JsonParameterStore.js";
|
|
132
145
|
export * from "./domain/JsonParameterTypes.js";
|
|
133
|
-
export * from "./domain/JsonPropertyStore.js";
|
|
134
146
|
export * from "./domain/JsonRequestBody.js";
|
|
135
147
|
export * from "./domain/JsonResponse.js";
|
|
136
148
|
export * from "./domain/JsonSchema.js";
|
|
149
|
+
export * from "./domain/JsonSchemaOptions.js";
|
|
137
150
|
export * from "./domain/SpecTypes.js";
|
|
138
151
|
export * from "./domain/types.js";
|
|
139
152
|
export * from "./fn/allOf.js";
|
|
@@ -141,14 +154,26 @@ export * from "./fn/any.js";
|
|
|
141
154
|
export * from "./fn/anyOf.js";
|
|
142
155
|
export * from "./fn/boolean.js";
|
|
143
156
|
export * from "./fn/collection.js";
|
|
157
|
+
export * from "./fn/compile.js";
|
|
144
158
|
export * from "./fn/date.js";
|
|
145
159
|
export * from "./fn/email.js";
|
|
146
160
|
export * from "./fn/enums.js";
|
|
147
161
|
export * from "./fn/from.js";
|
|
162
|
+
export * from "./fn/generic.js";
|
|
148
163
|
export * from "./fn/index.js";
|
|
149
164
|
export * from "./fn/integer.js";
|
|
150
165
|
export * from "./fn/lazyRef.js";
|
|
151
166
|
export * from "./fn/number.js";
|
|
167
|
+
export * from "./fn/oas/compileSpec.js";
|
|
168
|
+
export * from "./fn/oas/generateSpec.js";
|
|
169
|
+
export * from "./fn/oas/getSpec.js";
|
|
170
|
+
export * from "./fn/oas/getSpecType.js";
|
|
171
|
+
export * from "./fn/oas/mapOpenSpec.js";
|
|
172
|
+
export * from "./fn/oas/mapOpenSpec2.js";
|
|
173
|
+
export * from "./fn/oas/mapOpenSpec3.js";
|
|
174
|
+
export * from "./fn/oas/mapOpenSpecInfo.js";
|
|
175
|
+
export * from "./fn/oas/mergeSpec.js";
|
|
176
|
+
export * from "./fn/oas/transformToOS2.js";
|
|
152
177
|
export * from "./fn/object.js";
|
|
153
178
|
export * from "./fn/oneOf.js";
|
|
154
179
|
export * from "./fn/ref.js";
|
|
@@ -158,45 +183,31 @@ export * from "./fn/url.js";
|
|
|
158
183
|
export * from "./hooks/alterIgnore.js";
|
|
159
184
|
export * from "./hooks/alterOneOf.js";
|
|
160
185
|
export * from "./hooks/alterRequiredGroups.js";
|
|
161
|
-
export * from "./
|
|
162
|
-
export * from "./
|
|
163
|
-
export * from "./interfaces/JsonOpenSpec.js";
|
|
164
|
-
export * from "./interfaces/JsonSchemaOptions.js";
|
|
165
|
-
export * from "./registries/enumRegistries.js";
|
|
186
|
+
export * from "./registries/enumRegistry.js";
|
|
187
|
+
export * from "./registries/JsonEntitiesContainer.js";
|
|
166
188
|
export * from "./registries/JsonSchemaMapperContainer.js";
|
|
189
|
+
export * from "./registries/JsonTypesContainer.js";
|
|
167
190
|
export * from "./utils/buildPath.js";
|
|
168
|
-
export * from "./utils/compile.js";
|
|
169
191
|
export * from "./utils/concatParameters.js";
|
|
170
192
|
export * from "./utils/concatPath.js";
|
|
171
193
|
export * from "./utils/defineStatusModel.js";
|
|
172
|
-
export * from "./utils/generateSpec.js";
|
|
173
194
|
export * from "./utils/generics.js";
|
|
174
195
|
export * from "./utils/getComputedType.js";
|
|
175
196
|
export * from "./utils/getInheritedStores.js";
|
|
176
|
-
export * from "./utils/getJsonEntityStore.js";
|
|
177
197
|
export * from "./utils/getJsonPathParameters.js";
|
|
178
|
-
export * from "./utils/getJsonSchema.js";
|
|
179
198
|
export * from "./utils/getJsonType.js";
|
|
180
199
|
export * from "./utils/getOperationsRoutes.js";
|
|
181
200
|
export * from "./utils/getOperationsStores.js";
|
|
182
201
|
export * from "./utils/getPropertiesStores.js";
|
|
183
|
-
export * from "./utils/getSpec.js";
|
|
184
|
-
export * from "./utils/getSpecType.js";
|
|
185
202
|
export * from "./utils/isSuccessStatus.js";
|
|
186
203
|
export * from "./utils/mapHeaders.js";
|
|
187
|
-
export * from "./utils/mapOpenSpec.js";
|
|
188
|
-
export * from "./utils/mapOpenSpec2.js";
|
|
189
|
-
export * from "./utils/mapOpenSpec3.js";
|
|
190
|
-
export * from "./utils/mapOpenSpecInfo.js";
|
|
191
204
|
export * from "./utils/mapOperationOptions.js";
|
|
192
205
|
export * from "./utils/matchGroups.js";
|
|
193
206
|
export * from "./utils/mergeSchema.js";
|
|
194
|
-
export * from "./utils/mergeSpec.js";
|
|
195
207
|
export * from "./utils/operationIdFormatter.js";
|
|
196
208
|
export * from "./utils/ref.js";
|
|
197
209
|
export * from "./utils/removeHiddenOperation.js";
|
|
198
210
|
export * from "./utils/serializeEnumValues.js";
|
|
199
211
|
export * from "./utils/toJsonMapCollection.js";
|
|
200
212
|
export * from "./utils/toJsonRegex.js";
|
|
201
|
-
export * from "./utils/transformToOS2.js";
|
|
202
213
|
export * from "./utils/withErrorMsg.js";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Store, classOf, decoratorTypeOf, descriptorOf, prototypeOf } from "@tsed/core";
|
|
2
|
+
/**
|
|
3
|
+
* @ignore
|
|
4
|
+
*/
|
|
5
|
+
const stores = new Map();
|
|
6
|
+
export function defineStore(type, store) {
|
|
7
|
+
stores.set(type, store);
|
|
8
|
+
return store;
|
|
9
|
+
}
|
|
10
|
+
export function getJsonEntityStore(...args) {
|
|
11
|
+
if (args[0].isStore) {
|
|
12
|
+
return args[0];
|
|
13
|
+
}
|
|
14
|
+
const target = args[0];
|
|
15
|
+
if (args.length > 1) {
|
|
16
|
+
args[0] = prototypeOf(args[0]);
|
|
17
|
+
}
|
|
18
|
+
const store = Store.from(...args);
|
|
19
|
+
if (!store.has("JsonEntityStore")) {
|
|
20
|
+
const decoratorType = decoratorTypeOf(args);
|
|
21
|
+
const entityStore = stores.get(decoratorType);
|
|
22
|
+
const jsonSchemaStore = new entityStore({
|
|
23
|
+
store,
|
|
24
|
+
decoratorType,
|
|
25
|
+
target: classOf(target),
|
|
26
|
+
propertyKey: args[1],
|
|
27
|
+
index: typeof args[2] === "number" ? args[2] : undefined,
|
|
28
|
+
descriptor: typeof args[2] === "object" ? args[2] : undefined
|
|
29
|
+
});
|
|
30
|
+
jsonSchemaStore.build();
|
|
31
|
+
store.set("JsonEntityStore", jsonSchemaStore);
|
|
32
|
+
}
|
|
33
|
+
return store.get("JsonEntityStore");
|
|
34
|
+
}
|
|
35
|
+
export function getJsonMethodStore(target, propertyKey) {
|
|
36
|
+
const proto = prototypeOf(target);
|
|
37
|
+
return getJsonEntityStore(proto, propertyKey, descriptorOf(proto, propertyKey));
|
|
38
|
+
}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
+
import { isArray } from "@tsed/core";
|
|
1
2
|
/**
|
|
2
3
|
* @ignore
|
|
3
4
|
*/
|
|
4
5
|
const JsonSchemaMappersContainer = new Map();
|
|
5
6
|
/**
|
|
6
7
|
* @ignore
|
|
8
|
+
* @deprecated
|
|
7
9
|
*/
|
|
8
10
|
export function registerJsonSchemaMapper(type, mapper, spec) {
|
|
9
|
-
return
|
|
11
|
+
return defineSchemaMapper({ spec, type, transform: mapper });
|
|
12
|
+
}
|
|
13
|
+
export function defineSchemaMapper({ spec, type, transform }) {
|
|
14
|
+
if (isArray(spec)) {
|
|
15
|
+
spec.forEach((spec) => defineSchemaMapper({ spec, type, transform }));
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
JsonSchemaMappersContainer.set(spec ? `${spec}:${type}` : type, transform);
|
|
10
19
|
}
|
|
11
20
|
/**
|
|
12
21
|
* @ignore
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
let resolvers = [];
|
|
2
|
+
const cache = new Map();
|
|
3
|
+
export function defineType(resolver) {
|
|
4
|
+
resolvers.push(resolver);
|
|
5
|
+
resolvers.sort((a, b) => (b.priority || 0) - (a.priority || 0));
|
|
6
|
+
cache.clear();
|
|
7
|
+
return resolver;
|
|
8
|
+
}
|
|
9
|
+
export function getTypeResolver(type) {
|
|
10
|
+
if (cache.has(type)) {
|
|
11
|
+
return cache.get(type);
|
|
12
|
+
}
|
|
13
|
+
const result = resolvers.find((resolver) => {
|
|
14
|
+
return resolver.match(type);
|
|
15
|
+
});
|
|
16
|
+
cache.set(type, result);
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve generic bindings for the current compilation.
|
|
3
|
+
*
|
|
4
|
+
* Local generics attached to the `JsonSchema` instance take precedence over the
|
|
5
|
+
* externally provided `options.generics` bindings.
|
|
6
|
+
*/
|
|
7
|
+
export function getGenerics(value, options) {
|
|
8
|
+
return value.getGenericOf() ?? options.generics;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Resolve generic bindings and the mapper strategy associated with their
|
|
12
|
+
* origin.
|
|
13
|
+
*/
|
|
1
14
|
export function getGenericsOptions(value, options) {
|
|
2
|
-
const generics = value
|
|
3
|
-
return { generics
|
|
15
|
+
const generics = getGenerics(value, options);
|
|
16
|
+
return { generics, mapper: value.getGenericOf() ? "schema" : "class" };
|
|
4
17
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { JsonOperationRoute } from "../domain/
|
|
1
|
+
import { JsonOperationRoute } from "../domain/index.js";
|
|
2
2
|
import { concatPath } from "./concatPath.js";
|
|
3
|
-
import { getJsonEntityStore } from "
|
|
3
|
+
import { getJsonEntityStore } from "../registries/JsonEntitiesContainer.js";
|
|
4
4
|
import { getOperationsStores } from "./getOperationsStores.js";
|
|
5
5
|
export function getOperationsRoutes(token, options = {}) {
|
|
6
|
-
const store =
|
|
6
|
+
const store = getJsonEntityStore(token);
|
|
7
7
|
const basePath = concatPath(options.basePath, store.path);
|
|
8
8
|
let operationsRoutes = [];
|
|
9
9
|
if (options.withChildren) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { JsonMethodStore } from "../
|
|
2
|
-
import { JsonOperationPathsMap } from "../domain/
|
|
1
|
+
import { JsonMethodStore } from "../components/index.js";
|
|
2
|
+
import { JsonOperationPathsMap } from "../domain/index.js";
|
|
3
3
|
import { getInheritedStores } from "./getInheritedStores.js";
|
|
4
|
-
import { getJsonEntityStore } from "
|
|
4
|
+
import { getJsonEntityStore } from "../registries/JsonEntitiesContainer.js";
|
|
5
5
|
/**
|
|
6
6
|
* @ignore
|
|
7
7
|
*/
|
|
8
8
|
export function getOperationsStores(target) {
|
|
9
|
-
const store =
|
|
9
|
+
const store = getJsonEntityStore(target);
|
|
10
10
|
if (!store.$operations) {
|
|
11
11
|
const operationPaths = new JsonOperationPathsMap();
|
|
12
12
|
store.$operations = new Map();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { alterIgnore } from "../hooks/alterIgnore.js";
|
|
2
2
|
import { getInheritedStores } from "./getInheritedStores.js";
|
|
3
|
-
import { getJsonEntityStore } from "
|
|
3
|
+
import { getJsonEntityStore } from "../registries/JsonEntitiesContainer.js";
|
|
4
4
|
/**
|
|
5
5
|
* Return the list of properties including properties from inherited classes
|
|
6
6
|
* @param target
|
|
7
7
|
* @ignore
|
|
8
8
|
*/
|
|
9
9
|
export function getPropertiesStores(target) {
|
|
10
|
-
const store =
|
|
10
|
+
const store = getJsonEntityStore(target);
|
|
11
11
|
if (!store.$properties) {
|
|
12
12
|
const stores = getInheritedStores(store);
|
|
13
13
|
store.$properties = new Map();
|
package/lib/esm/utils/ref.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { setValue } from "@tsed/core";
|
|
2
|
-
import { pascalCase } from "change-case";
|
|
3
1
|
import { SpecTypes } from "../domain/SpecTypes.js";
|
|
4
2
|
import { mergeSchema } from "./mergeSchema.js";
|
|
3
|
+
import { pascalCase } from "change-case";
|
|
4
|
+
import { setValue } from "@tsed/core";
|
|
5
5
|
export function getSchemaFromRef($ref, options) {
|
|
6
6
|
const { components } = options;
|
|
7
7
|
if (components?.schemas && $ref) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getJsonEntityStore, getJsonMethodStore } from "./registries/JsonEntitiesContainer.js";
|
|
2
|
+
declare module "@tsed/schema" {
|
|
3
|
+
namespace JsonEntityStore {
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated
|
|
6
|
+
*/
|
|
7
|
+
const from: typeof getJsonEntityStore;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated
|
|
10
|
+
*/
|
|
11
|
+
const fromMethod: typeof getJsonMethodStore;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated use s.store
|
|
14
|
+
*/
|
|
15
|
+
const get: typeof getJsonEntityStore;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,30 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Automatically generated by @tsed/barrels.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./default/anyMapper.js";
|
|
5
|
-
export * from "./default/classMapper.js";
|
|
6
|
-
export * from "./default/discriminatorMappingMapper.js";
|
|
7
|
-
export * from "./default/enumsMapper.js";
|
|
8
|
-
export * from "./default/genericsMapper.js";
|
|
9
|
-
export * from "./default/inheritedClassMapper.js";
|
|
10
|
-
export * from "./default/lazyRefMapper.js";
|
|
11
|
-
export * from "./default/mapMapper.js";
|
|
12
|
-
export * from "./default/nextMapper.js";
|
|
13
|
-
export * from "./default/nullableMapper.js";
|
|
14
|
-
export * from "./default/objectMapper.js";
|
|
15
|
-
export * from "./default/ofMapper.js";
|
|
16
|
-
export * from "./default/requiredMapper.js";
|
|
17
|
-
export * from "./default/schemaMapper.js";
|
|
18
|
-
export * from "./open-spec/discriminatorMappingMapper.js";
|
|
19
|
-
export * from "./open-spec/enumsMapper.js";
|
|
20
|
-
export * from "./open-spec/generate.js";
|
|
21
|
-
export * from "./open-spec/nullableMapper.js";
|
|
22
|
-
export * from "./open-spec/operationInFilesMapper.js";
|
|
23
|
-
export * from "./open-spec/operationInParameterMapper.js";
|
|
24
|
-
export * from "./open-spec/operationInParametersMapper.js";
|
|
25
|
-
export * from "./open-spec/operationInQueryMapper.js";
|
|
26
|
-
export * from "./open-spec/operationMapper.js";
|
|
27
|
-
export * from "./open-spec/operationMediaMapper.js";
|
|
28
|
-
export * from "./open-spec/operationRequestBodyMapper.js";
|
|
29
|
-
export * from "./open-spec/operationResponseMapper.js";
|
|
30
|
-
export * from "./open-spec/pathsMapper.js";
|
|
4
|
+
export * from "./mappers/default/anyMapper.js";
|
|
5
|
+
export * from "./mappers/default/classMapper.js";
|
|
6
|
+
export * from "./mappers/default/discriminatorMappingMapper.js";
|
|
7
|
+
export * from "./mappers/default/enumsMapper.js";
|
|
8
|
+
export * from "./mappers/default/genericsMapper.js";
|
|
9
|
+
export * from "./mappers/default/inheritedClassMapper.js";
|
|
10
|
+
export * from "./mappers/default/lazyRefMapper.js";
|
|
11
|
+
export * from "./mappers/default/mapMapper.js";
|
|
12
|
+
export * from "./mappers/default/nextMapper.js";
|
|
13
|
+
export * from "./mappers/default/nullableMapper.js";
|
|
14
|
+
export * from "./mappers/default/objectMapper.js";
|
|
15
|
+
export * from "./mappers/default/ofMapper.js";
|
|
16
|
+
export * from "./mappers/default/requiredMapper.js";
|
|
17
|
+
export * from "./mappers/default/schemaMapper.js";
|
|
18
|
+
export * from "./mappers/open-spec/discriminatorMappingMapper.js";
|
|
19
|
+
export * from "./mappers/open-spec/enumsMapper.js";
|
|
20
|
+
export * from "./mappers/open-spec/generate.js";
|
|
21
|
+
export * from "./mappers/open-spec/nullableMapper.js";
|
|
22
|
+
export * from "./mappers/open-spec/operationInFilesMapper.js";
|
|
23
|
+
export * from "./mappers/open-spec/operationInParameterMapper.js";
|
|
24
|
+
export * from "./mappers/open-spec/operationInParametersMapper.js";
|
|
25
|
+
export * from "./mappers/open-spec/operationInQueryMapper.js";
|
|
26
|
+
export * from "./mappers/open-spec/operationMapper.js";
|
|
27
|
+
export * from "./mappers/open-spec/operationMediaMapper.js";
|
|
28
|
+
export * from "./mappers/open-spec/operationRequestBodyMapper.js";
|
|
29
|
+
export * from "./mappers/open-spec/operationResponseMapper.js";
|
|
30
|
+
export * from "./mappers/open-spec/pathsMapper.js";
|
|
31
|
+
export * from "./stores/JsonClassStore.js";
|
|
32
|
+
export * from "./stores/JsonMethodStore.js";
|
|
33
|
+
export * from "./stores/JsonParameterStore.js";
|
|
34
|
+
export * from "./stores/JsonPropertyStore.js";
|
|
35
|
+
export * from "./types/arrayType.js";
|
|
36
|
+
export * from "./types/classType.js";
|
|
37
|
+
export * from "./types/genericType.js";
|
|
38
|
+
export * from "./types/mapType.js";
|
|
39
|
+
export * from "./types/primitiveType.js";
|
|
40
|
+
export * from "./types/setType.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { JsonSchemaOptions } from "
|
|
1
|
+
import { JsonSchemaOptions } from "../../../domain/JsonSchemaOptions.js";
|
|
2
2
|
export declare function anyMapper(input: any, options?: JsonSchemaOptions): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JsonSchema } from "
|
|
2
|
-
import type { JsonSchemaOptions } from "
|
|
1
|
+
import { JsonSchema } from "../../../domain/JsonSchema.js";
|
|
2
|
+
import type { JsonSchemaOptions } from "../../../domain/JsonSchemaOptions.js";
|
|
3
3
|
interface SchemaWithDiscriminator {
|
|
4
4
|
discriminator?: {
|
|
5
5
|
mapping?: Record<string, JsonSchema | string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JSONSchema7 } from "json-schema";
|
|
2
|
-
import { JsonSchema } from "
|
|
3
|
-
import type { JsonSchemaOptions } from "
|
|
2
|
+
import { JsonSchema } from "../../../domain/JsonSchema.js";
|
|
3
|
+
import type { JsonSchemaOptions } from "../../../domain/JsonSchemaOptions.js";
|
|
4
4
|
/**
|
|
5
5
|
* @ignore
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { JsonSchema } from "../../../domain/JsonSchema.js";
|
|
2
|
+
import type { JsonSchemaOptions } from "../../../domain/JsonSchemaOptions.js";
|
|
1
3
|
import { type Type } from "@tsed/core";
|
|
2
|
-
import { JsonSchema } from "../../domain/JsonSchema.js";
|
|
3
|
-
import type { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions.js";
|
|
4
4
|
export declare function itemMapper(input: JsonSchema | Type, options: JsonSchemaOptions): any;
|
|
5
5
|
export declare function nextMapper(input: JsonSchema | Type | any, options: JsonSchemaOptions): any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { JsonSchema } from "
|
|
1
|
+
import type { JsonSchema } from "../../../domain/JsonSchema.js";
|
|
2
2
|
export declare function nullableMapper(obj: any, schema: JsonSchema | null): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/types/components/{open-spec → mappers/open-spec}/operationInParameterMapper.d.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OS3Schema } from "@tsed/openspec";
|
|
2
1
|
import type { JSONSchema6 } from "json-schema";
|
|
3
|
-
import { JsonParameter } from "
|
|
4
|
-
import { JsonSchemaOptions } from "
|
|
2
|
+
import { JsonParameter } from "../../../domain/JsonParameter.js";
|
|
3
|
+
import { JsonSchemaOptions } from "../../../domain/JsonSchemaOptions.js";
|
|
4
|
+
import { OS3Schema } from "@tsed/openspec";
|
|
5
5
|
export type JsonParameterOptions = JsonSchemaOptions & {
|
|
6
6
|
jsonParameter: JsonParameter;
|
|
7
7
|
jsonSchema: JSONSchema6;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { JsonParameter } from "../../../domain/JsonParameter.js";
|
|
2
|
+
import { JsonSchemaOptions } from "../../../domain/JsonSchemaOptions.js";
|
|
3
|
+
export declare function operationRequestBodyMapper(bodyParameters: JsonParameter[], { consumes, ...options }: JsonSchemaOptions): any;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { OS3Paths } from "@tsed/openspec";
|
|
2
|
-
import { JsonSchemaOptions } from "
|
|
2
|
+
import { JsonSchemaOptions } from "../../../domain/JsonSchemaOptions.js";
|
|
3
3
|
export declare function pathsMapper(model: any, { paths, rootPath, ...options }: JsonSchemaOptions): OS3Paths<import("@tsed/openspec").OS3Schema>;
|