@tsed/schema 7.49.0 → 7.50.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/jest.config.js +2 -2
- package/lib/browser/schema.umd.min.js +1 -1
- package/lib/browser/schema.umd.min.js.map +1 -1
- package/lib/cjs/components/async-api/channelsMapper.js +62 -0
- package/lib/cjs/components/async-api/channelsMapper.js.map +1 -0
- package/lib/cjs/components/async-api/generate.js +20 -0
- package/lib/cjs/components/async-api/generate.js.map +1 -0
- package/lib/cjs/components/async-api/messageMapper.js +44 -0
- package/lib/cjs/components/async-api/messageMapper.js.map +1 -0
- package/lib/cjs/components/async-api/payloadMapper.js +52 -0
- package/lib/cjs/components/async-api/payloadMapper.js.map +1 -0
- package/lib/cjs/components/async-api/responseMapper.js +58 -0
- package/lib/cjs/components/async-api/responseMapper.js.map +1 -0
- package/lib/cjs/components/{anyMapper.js → default/anyMapper.js} +9 -9
- package/lib/cjs/components/default/anyMapper.js.map +1 -0
- package/lib/cjs/components/{classMapper.js → default/classMapper.js} +11 -9
- package/lib/cjs/components/default/classMapper.js.map +1 -0
- package/lib/cjs/components/{genericsMapper.js → default/genericsMapper.js} +6 -6
- package/lib/cjs/components/default/genericsMapper.js.map +1 -0
- package/lib/cjs/components/{inheritedClassMapper.js → default/inheritedClassMapper.js} +3 -3
- package/lib/cjs/components/default/inheritedClassMapper.js.map +1 -0
- package/lib/cjs/components/{itemMapper.js → default/itemMapper.js} +2 -2
- package/lib/cjs/components/default/itemMapper.js.map +1 -0
- package/lib/cjs/components/{lazyRefMapper.js → default/lazyRefMapper.js} +4 -4
- package/lib/cjs/components/default/lazyRefMapper.js.map +1 -0
- package/lib/cjs/components/{mapMapper.js → default/mapMapper.js} +3 -3
- package/lib/cjs/components/default/mapMapper.js.map +1 -0
- package/lib/cjs/components/{objectMapper.js → default/objectMapper.js} +5 -5
- package/lib/cjs/components/default/objectMapper.js.map +1 -0
- package/lib/cjs/components/{ofMapper.js → default/ofMapper.js} +2 -2
- package/lib/cjs/components/default/ofMapper.js.map +1 -0
- package/lib/cjs/components/{propertiesMapper.js → default/propertiesMapper.js} +3 -3
- package/lib/cjs/components/default/propertiesMapper.js.map +1 -0
- package/lib/cjs/components/{schemaMapper.js → default/schemaMapper.js} +16 -16
- package/lib/cjs/components/default/schemaMapper.js.map +1 -0
- package/lib/cjs/components/index.js +26 -20
- package/lib/cjs/components/index.js.map +1 -1
- package/lib/cjs/components/open-spec/generate.js +24 -0
- package/lib/cjs/components/open-spec/generate.js.map +1 -0
- package/lib/cjs/components/{operationInFilesMapper.js → open-spec/operationInFilesMapper.js} +1 -1
- package/lib/cjs/components/open-spec/operationInFilesMapper.js.map +1 -0
- package/lib/cjs/components/{operationInParameterMapper.js → open-spec/operationInParameterMapper.js} +7 -7
- package/lib/cjs/components/open-spec/operationInParameterMapper.js.map +1 -0
- package/lib/cjs/components/{operationInParametersMapper.js → open-spec/operationInParametersMapper.js} +2 -2
- package/lib/cjs/components/open-spec/operationInParametersMapper.js.map +1 -0
- package/lib/cjs/components/{operationInQueryMapper.js → open-spec/operationInQueryMapper.js} +4 -4
- package/lib/cjs/components/open-spec/operationInQueryMapper.js.map +1 -0
- package/lib/cjs/components/{operationMapper.js → open-spec/operationMapper.js} +6 -6
- package/lib/cjs/components/open-spec/operationMapper.js.map +1 -0
- package/lib/cjs/components/{operationMediaMapper.js → open-spec/operationMediaMapper.js} +2 -2
- package/lib/cjs/components/open-spec/operationMediaMapper.js.map +1 -0
- package/lib/cjs/components/{operationRequestBodyMapper.js → open-spec/operationRequestBodyMapper.js} +5 -5
- package/lib/cjs/components/open-spec/operationRequestBodyMapper.js.map +1 -0
- package/lib/cjs/components/{operationResponseMapper.js → open-spec/operationResponseMapper.js} +2 -2
- package/lib/cjs/components/open-spec/operationResponseMapper.js.map +1 -0
- package/lib/cjs/components/{pathsMapper.js → open-spec/pathsMapper.js} +38 -33
- package/lib/cjs/components/open-spec/pathsMapper.js.map +1 -0
- package/lib/cjs/constants/OperationVerbs.js +36 -0
- package/lib/cjs/constants/OperationVerbs.js.map +1 -0
- package/lib/cjs/decorators/operations/operation.js +45 -0
- package/lib/cjs/decorators/operations/operation.js.map +1 -0
- package/lib/cjs/decorators/operations/operationPath.js.map +1 -1
- package/lib/cjs/decorators/operations/publish.js +10 -0
- package/lib/cjs/decorators/operations/publish.js.map +1 -0
- package/lib/cjs/decorators/operations/route.js +14 -49
- package/lib/cjs/decorators/operations/route.js.map +1 -1
- package/lib/cjs/decorators/operations/subscribe.js +10 -0
- package/lib/cjs/decorators/operations/subscribe.js.map +1 -0
- package/lib/cjs/domain/JsonEntityStore.js +0 -4
- package/lib/cjs/domain/JsonEntityStore.js.map +1 -1
- package/lib/cjs/domain/JsonMap.js +1 -1
- package/lib/cjs/domain/JsonMap.js.map +1 -1
- package/lib/cjs/domain/JsonOperation.js +6 -0
- package/lib/cjs/domain/JsonOperation.js.map +1 -1
- package/lib/cjs/domain/JsonOperationPathsMap.js +4 -5
- package/lib/cjs/domain/JsonOperationPathsMap.js.map +1 -1
- package/lib/cjs/domain/JsonParameter.js +1 -1
- package/lib/cjs/domain/JsonParameter.js.map +1 -1
- package/lib/cjs/domain/JsonSchema.js +1 -1
- package/lib/cjs/domain/JsonSchema.js.map +1 -1
- package/lib/cjs/domain/SpecTypes.js +1 -0
- package/lib/cjs/domain/SpecTypes.js.map +1 -1
- package/lib/cjs/index.js +33 -22
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/registries/JsonSchemaMapperContainer.js +13 -11
- package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +1 -1
- package/lib/cjs/utils/getJsonSchema.js +7 -4
- package/lib/cjs/utils/getJsonSchema.js.map +1 -1
- package/lib/cjs/utils/getOperationsRoutes.js +3 -3
- package/lib/cjs/utils/getOperationsRoutes.js.map +1 -1
- package/lib/cjs/utils/getSpec.js +4 -14
- package/lib/cjs/utils/getSpec.js.map +1 -1
- package/lib/cjs/utils/mapOperationOptions.js +31 -0
- package/lib/cjs/utils/mapOperationOptions.js.map +1 -0
- package/lib/cjs/utils/operationIdFormatter.js +5 -1
- package/lib/cjs/utils/operationIdFormatter.js.map +1 -1
- package/lib/cjs/utils/ref.js +2 -2
- package/lib/cjs/utils/ref.js.map +1 -1
- package/lib/cjs/utils/removeHiddenOperation.js +8 -0
- package/lib/cjs/utils/removeHiddenOperation.js.map +1 -0
- package/lib/cjs/utils/somethingOf.js +16 -0
- package/lib/cjs/utils/somethingOf.js.map +1 -0
- package/lib/esm/components/async-api/channelsMapper.js +58 -0
- package/lib/esm/components/async-api/channelsMapper.js.map +1 -0
- package/lib/esm/components/async-api/generate.js +18 -0
- package/lib/esm/components/async-api/generate.js.map +1 -0
- package/lib/esm/components/async-api/messageMapper.js +40 -0
- package/lib/esm/components/async-api/messageMapper.js.map +1 -0
- package/lib/esm/components/async-api/payloadMapper.js +48 -0
- package/lib/esm/components/async-api/payloadMapper.js.map +1 -0
- package/lib/esm/components/async-api/responseMapper.js +54 -0
- package/lib/esm/components/async-api/responseMapper.js.map +1 -0
- package/lib/esm/components/{anyMapper.js → default/anyMapper.js} +9 -9
- package/lib/esm/components/default/anyMapper.js.map +1 -0
- package/lib/esm/components/{classMapper.js → default/classMapper.js} +11 -9
- package/lib/esm/components/default/classMapper.js.map +1 -0
- package/lib/esm/components/{genericsMapper.js → default/genericsMapper.js} +6 -6
- package/lib/esm/components/default/genericsMapper.js.map +1 -0
- package/lib/esm/components/{inheritedClassMapper.js → default/inheritedClassMapper.js} +3 -3
- package/lib/esm/components/default/inheritedClassMapper.js.map +1 -0
- package/lib/esm/components/default/itemMapper.js +6 -0
- package/lib/esm/components/default/itemMapper.js.map +1 -0
- package/lib/esm/components/{lazyRefMapper.js → default/lazyRefMapper.js} +4 -4
- package/lib/esm/components/default/lazyRefMapper.js.map +1 -0
- package/lib/esm/components/{mapMapper.js → default/mapMapper.js} +3 -3
- package/lib/esm/components/default/mapMapper.js.map +1 -0
- package/lib/esm/components/{objectMapper.js → default/objectMapper.js} +5 -5
- package/lib/esm/components/default/objectMapper.js.map +1 -0
- package/lib/esm/components/{ofMapper.js → default/ofMapper.js} +2 -2
- package/lib/esm/components/default/ofMapper.js.map +1 -0
- package/lib/esm/components/{propertiesMapper.js → default/propertiesMapper.js} +3 -3
- package/lib/esm/components/default/propertiesMapper.js.map +1 -0
- package/lib/esm/components/{schemaMapper.js → default/schemaMapper.js} +17 -17
- package/lib/esm/components/default/schemaMapper.js.map +1 -0
- package/lib/esm/components/index.js +26 -20
- package/lib/esm/components/index.js.map +1 -1
- package/lib/esm/components/open-spec/generate.js +22 -0
- package/lib/esm/components/open-spec/generate.js.map +1 -0
- package/lib/esm/components/{operationInFilesMapper.js → open-spec/operationInFilesMapper.js} +1 -1
- package/lib/esm/components/open-spec/operationInFilesMapper.js.map +1 -0
- package/lib/esm/components/{operationInParameterMapper.js → open-spec/operationInParameterMapper.js} +7 -7
- package/lib/esm/components/open-spec/operationInParameterMapper.js.map +1 -0
- package/lib/esm/components/{operationInParametersMapper.js → open-spec/operationInParametersMapper.js} +2 -2
- package/lib/esm/components/open-spec/operationInParametersMapper.js.map +1 -0
- package/lib/esm/components/{operationInQueryMapper.js → open-spec/operationInQueryMapper.js} +4 -4
- package/lib/esm/components/open-spec/operationInQueryMapper.js.map +1 -0
- package/lib/esm/components/{operationMapper.js → open-spec/operationMapper.js} +6 -6
- package/lib/esm/components/open-spec/operationMapper.js.map +1 -0
- package/lib/esm/components/open-spec/operationMediaMapper.js +7 -0
- package/lib/esm/components/open-spec/operationMediaMapper.js.map +1 -0
- package/lib/esm/components/{operationRequestBodyMapper.js → open-spec/operationRequestBodyMapper.js} +5 -5
- package/lib/esm/components/open-spec/operationRequestBodyMapper.js.map +1 -0
- package/lib/esm/components/{operationResponseMapper.js → open-spec/operationResponseMapper.js} +2 -2
- package/lib/esm/components/open-spec/operationResponseMapper.js.map +1 -0
- package/lib/esm/components/open-spec/pathsMapper.js +91 -0
- package/lib/esm/components/open-spec/pathsMapper.js.map +1 -0
- package/lib/esm/constants/OperationVerbs.js +33 -0
- package/lib/esm/constants/OperationVerbs.js.map +1 -0
- package/lib/esm/decorators/operations/operation.js +41 -0
- package/lib/esm/decorators/operations/operation.js.map +1 -0
- package/lib/esm/decorators/operations/operationPath.js.map +1 -1
- package/lib/esm/decorators/operations/publish.js +6 -0
- package/lib/esm/decorators/operations/publish.js.map +1 -0
- package/lib/esm/decorators/operations/route.js +14 -48
- package/lib/esm/decorators/operations/route.js.map +1 -1
- package/lib/esm/decorators/operations/subscribe.js +6 -0
- package/lib/esm/decorators/operations/subscribe.js.map +1 -0
- package/lib/esm/domain/JsonEntityStore.js +0 -4
- package/lib/esm/domain/JsonEntityStore.js.map +1 -1
- package/lib/esm/domain/JsonMap.js +1 -1
- package/lib/esm/domain/JsonMap.js.map +1 -1
- package/lib/esm/domain/JsonOperation.js +6 -0
- package/lib/esm/domain/JsonOperation.js.map +1 -1
- package/lib/esm/domain/JsonOperationPathsMap.js +4 -5
- package/lib/esm/domain/JsonOperationPathsMap.js.map +1 -1
- package/lib/esm/domain/JsonParameter.js +1 -1
- package/lib/esm/domain/JsonParameter.js.map +1 -1
- package/lib/esm/domain/JsonSchema.js +1 -1
- package/lib/esm/domain/JsonSchema.js.map +1 -1
- package/lib/esm/domain/SpecTypes.js +1 -0
- package/lib/esm/domain/SpecTypes.js.map +1 -1
- package/lib/esm/index.js +33 -22
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/registries/JsonSchemaMapperContainer.js +13 -11
- package/lib/esm/registries/JsonSchemaMapperContainer.js.map +1 -1
- package/lib/esm/utils/getJsonSchema.js +7 -4
- package/lib/esm/utils/getJsonSchema.js.map +1 -1
- package/lib/esm/utils/getOperationsRoutes.js +3 -3
- package/lib/esm/utils/getOperationsRoutes.js.map +1 -1
- package/lib/esm/utils/getSpec.js +5 -15
- package/lib/esm/utils/getSpec.js.map +1 -1
- package/lib/{cjs/utils/mapRouteOptions.js → esm/utils/mapOperationOptions.js} +9 -8
- package/lib/esm/utils/mapOperationOptions.js.map +1 -0
- package/lib/esm/utils/operationIdFormatter.js +3 -0
- package/lib/esm/utils/operationIdFormatter.js.map +1 -1
- package/lib/esm/utils/ref.js +3 -3
- package/lib/esm/utils/ref.js.map +1 -1
- package/lib/esm/utils/removeHiddenOperation.js +4 -0
- package/lib/esm/utils/removeHiddenOperation.js.map +1 -0
- package/lib/esm/utils/somethingOf.js +12 -0
- package/lib/esm/utils/somethingOf.js.map +1 -0
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/components/async-api/channelsMapper.d.ts +2 -0
- package/lib/types/components/async-api/generate.d.ts +1 -0
- package/lib/types/components/async-api/messageMapper.d.ts +6 -0
- package/lib/types/components/async-api/payloadMapper.d.ts +4 -0
- package/lib/types/components/async-api/responseMapper.d.ts +6 -0
- package/lib/types/components/{anyMapper.d.ts → default/anyMapper.d.ts} +1 -1
- package/lib/types/components/default/classMapper.d.ts +3 -0
- package/lib/types/components/{genericsMapper.d.ts → default/genericsMapper.d.ts} +1 -1
- package/lib/types/components/{inheritedClassMapper.d.ts → default/inheritedClassMapper.d.ts} +1 -1
- package/lib/types/components/{itemMapper.d.ts → default/itemMapper.d.ts} +1 -1
- package/lib/types/components/default/lazyRefMapper.d.ts +3 -0
- package/lib/types/components/{mapMapper.d.ts → default/mapMapper.d.ts} +1 -1
- package/lib/types/components/{objectMapper.d.ts → default/objectMapper.d.ts} +1 -1
- package/lib/types/components/default/ofMapper.d.ts +3 -0
- package/lib/types/components/default/propertiesMapper.d.ts +3 -0
- package/lib/types/components/default/schemaMapper.d.ts +3 -0
- package/lib/types/components/index.d.ts +26 -20
- package/lib/types/components/open-spec/generate.d.ts +1 -0
- package/lib/types/components/{operationInParameterMapper.d.ts → open-spec/operationInParameterMapper.d.ts} +2 -2
- package/lib/types/components/open-spec/operationInParametersMapper.d.ts +3 -0
- package/lib/types/components/open-spec/operationMapper.d.ts +3 -0
- package/lib/types/components/open-spec/operationMediaMapper.d.ts +3 -0
- package/lib/types/components/{operationRequestBodyMapper.d.ts → open-spec/operationRequestBodyMapper.d.ts} +2 -2
- package/lib/types/components/open-spec/operationResponseMapper.d.ts +3 -0
- package/lib/types/components/{pathsMapper.d.ts → open-spec/pathsMapper.d.ts} +1 -1
- package/lib/types/constants/OperationVerbs.d.ts +20 -0
- package/lib/types/decorators/operations/operation.d.ts +60 -0
- package/lib/types/decorators/operations/operationPath.d.ts +2 -2
- package/lib/types/decorators/operations/publish.d.ts +1 -0
- package/lib/types/decorators/operations/route.d.ts +11 -66
- package/lib/types/decorators/operations/subscribe.d.ts +1 -0
- package/lib/types/domain/JsonOperation.d.ts +1 -0
- package/lib/types/domain/SpecTypes.d.ts +2 -1
- package/lib/types/index.d.ts +33 -22
- package/lib/types/interfaces/JsonSchemaOptions.d.ts +3 -4
- package/lib/types/registries/JsonSchemaMapperContainer.d.ts +6 -5
- package/lib/types/utils/getOperationsRoutes.d.ts +2 -0
- package/lib/types/utils/getSpec.d.ts +5 -1
- package/lib/types/utils/{mapRouteOptions.d.ts → mapOperationOptions.d.ts} +1 -1
- package/lib/types/utils/operationIdFormatter.d.ts +2 -0
- package/lib/types/utils/removeHiddenOperation.d.ts +2 -0
- package/lib/types/utils/somethingOf.d.ts +1 -0
- package/package.json +6 -6
- package/lib/cjs/components/anyMapper.js.map +0 -1
- package/lib/cjs/components/classMapper.js.map +0 -1
- package/lib/cjs/components/genericsMapper.js.map +0 -1
- package/lib/cjs/components/inheritedClassMapper.js.map +0 -1
- package/lib/cjs/components/itemMapper.js.map +0 -1
- package/lib/cjs/components/lazyRefMapper.js.map +0 -1
- package/lib/cjs/components/mapMapper.js.map +0 -1
- package/lib/cjs/components/objectMapper.js.map +0 -1
- package/lib/cjs/components/ofMapper.js.map +0 -1
- package/lib/cjs/components/operationInFilesMapper.js.map +0 -1
- package/lib/cjs/components/operationInParameterMapper.js.map +0 -1
- package/lib/cjs/components/operationInParametersMapper.js.map +0 -1
- package/lib/cjs/components/operationInQueryMapper.js.map +0 -1
- package/lib/cjs/components/operationMapper.js.map +0 -1
- package/lib/cjs/components/operationMediaMapper.js.map +0 -1
- package/lib/cjs/components/operationRequestBodyMapper.js.map +0 -1
- package/lib/cjs/components/operationResponseMapper.js.map +0 -1
- package/lib/cjs/components/pathsMapper.js.map +0 -1
- package/lib/cjs/components/propertiesMapper.js.map +0 -1
- package/lib/cjs/components/schemaMapper.js.map +0 -1
- package/lib/cjs/constants/httpMethods.js +0 -46
- package/lib/cjs/constants/httpMethods.js.map +0 -1
- package/lib/cjs/utils/mapRouteOptions.js.map +0 -1
- package/lib/esm/components/anyMapper.js.map +0 -1
- package/lib/esm/components/classMapper.js.map +0 -1
- package/lib/esm/components/genericsMapper.js.map +0 -1
- package/lib/esm/components/inheritedClassMapper.js.map +0 -1
- package/lib/esm/components/itemMapper.js +0 -6
- package/lib/esm/components/itemMapper.js.map +0 -1
- package/lib/esm/components/lazyRefMapper.js.map +0 -1
- package/lib/esm/components/mapMapper.js.map +0 -1
- package/lib/esm/components/objectMapper.js.map +0 -1
- package/lib/esm/components/ofMapper.js.map +0 -1
- package/lib/esm/components/operationInFilesMapper.js.map +0 -1
- package/lib/esm/components/operationInParameterMapper.js.map +0 -1
- package/lib/esm/components/operationInParametersMapper.js.map +0 -1
- package/lib/esm/components/operationInQueryMapper.js.map +0 -1
- package/lib/esm/components/operationMapper.js.map +0 -1
- package/lib/esm/components/operationMediaMapper.js +0 -7
- package/lib/esm/components/operationMediaMapper.js.map +0 -1
- package/lib/esm/components/operationRequestBodyMapper.js.map +0 -1
- package/lib/esm/components/operationResponseMapper.js.map +0 -1
- package/lib/esm/components/pathsMapper.js +0 -86
- package/lib/esm/components/pathsMapper.js.map +0 -1
- package/lib/esm/components/propertiesMapper.js.map +0 -1
- package/lib/esm/components/schemaMapper.js.map +0 -1
- package/lib/esm/constants/httpMethods.js +0 -43
- package/lib/esm/constants/httpMethods.js.map +0 -1
- package/lib/esm/utils/mapRouteOptions.js +0 -22
- package/lib/esm/utils/mapRouteOptions.js.map +0 -1
- package/lib/types/components/classMapper.d.ts +0 -3
- package/lib/types/components/lazyRefMapper.d.ts +0 -3
- package/lib/types/components/ofMapper.d.ts +0 -3
- package/lib/types/components/operationInParametersMapper.d.ts +0 -3
- package/lib/types/components/operationMapper.d.ts +0 -3
- package/lib/types/components/operationMediaMapper.d.ts +0 -3
- package/lib/types/components/operationResponseMapper.d.ts +0 -3
- package/lib/types/components/propertiesMapper.d.ts +0 -3
- package/lib/types/components/schemaMapper.d.ts +0 -3
- package/lib/types/constants/httpMethods.d.ts +0 -12
- /package/lib/types/components/{operationInFilesMapper.d.ts → open-spec/operationInFilesMapper.d.ts} +0 -0
- /package/lib/types/components/{operationInQueryMapper.d.ts → open-spec/operationInQueryMapper.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { JsonMethodStore } from "../../domain/JsonMethodStore";
|
|
2
|
+
import { JsonMethodPath } from "../../domain/JsonOperation";
|
|
3
|
+
import { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions";
|
|
4
|
+
export declare function messageMapper(jsonOperationStore: JsonMethodStore, operationPath: JsonMethodPath, { tags, defaultTags, ...options }?: JsonSchemaOptions): {
|
|
5
|
+
$ref: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { JsonMethodStore } from "../../domain/JsonMethodStore";
|
|
2
|
+
import { JsonMethodPath } from "../../domain/JsonOperation";
|
|
3
|
+
import { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions";
|
|
4
|
+
export declare function payloadMapper(jsonOperationStore: JsonMethodStore, operationPath: JsonMethodPath, options: JsonSchemaOptions): unknown;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { JsonMethodStore } from "../../domain/JsonMethodStore";
|
|
2
|
+
import { JsonMethodPath } from "../../domain/JsonOperation";
|
|
3
|
+
import { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions";
|
|
4
|
+
export declare function responsePayloadMapper(jsonOperationStore: JsonMethodStore, operationPath: JsonMethodPath, options: JsonSchemaOptions): {
|
|
5
|
+
$ref: string;
|
|
6
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { JsonSchemaOptions } from "
|
|
1
|
+
import { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions";
|
|
2
2
|
export declare function anyMapper(input: any, options?: JsonSchemaOptions): any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { JsonSchemaOptions } from "
|
|
1
|
+
import { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions";
|
|
2
2
|
export declare function itemMapper(value: any, options: JsonSchemaOptions): any;
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Automatically generated by barrelsby.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./
|
|
14
|
-
export * from "./
|
|
15
|
-
export * from "./
|
|
16
|
-
export * from "./
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./
|
|
20
|
-
export * from "./
|
|
21
|
-
export * from "./
|
|
22
|
-
export * from "./
|
|
23
|
-
export * from "./
|
|
4
|
+
export * from "./async-api/channelsMapper";
|
|
5
|
+
export * from "./async-api/generate";
|
|
6
|
+
export * from "./async-api/messageMapper";
|
|
7
|
+
export * from "./async-api/payloadMapper";
|
|
8
|
+
export * from "./async-api/responseMapper";
|
|
9
|
+
export * from "./default/anyMapper";
|
|
10
|
+
export * from "./default/classMapper";
|
|
11
|
+
export * from "./default/genericsMapper";
|
|
12
|
+
export * from "./default/inheritedClassMapper";
|
|
13
|
+
export * from "./default/itemMapper";
|
|
14
|
+
export * from "./default/lazyRefMapper";
|
|
15
|
+
export * from "./default/mapMapper";
|
|
16
|
+
export * from "./default/objectMapper";
|
|
17
|
+
export * from "./default/ofMapper";
|
|
18
|
+
export * from "./default/propertiesMapper";
|
|
19
|
+
export * from "./default/schemaMapper";
|
|
20
|
+
export * from "./open-spec/generate";
|
|
21
|
+
export * from "./open-spec/operationInFilesMapper";
|
|
22
|
+
export * from "./open-spec/operationInParameterMapper";
|
|
23
|
+
export * from "./open-spec/operationInParametersMapper";
|
|
24
|
+
export * from "./open-spec/operationInQueryMapper";
|
|
25
|
+
export * from "./open-spec/operationMapper";
|
|
26
|
+
export * from "./open-spec/operationMediaMapper";
|
|
27
|
+
export * from "./open-spec/operationRequestBodyMapper";
|
|
28
|
+
export * from "./open-spec/operationResponseMapper";
|
|
29
|
+
export * from "./open-spec/pathsMapper";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OS3Schema } from "@tsed/openspec";
|
|
2
2
|
import type { JSONSchema6 } from "json-schema";
|
|
3
|
-
import { JsonParameter } from "
|
|
4
|
-
import { JsonSchemaOptions } from "
|
|
3
|
+
import { JsonParameter } from "../../domain/JsonParameter";
|
|
4
|
+
import { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions";
|
|
5
5
|
export type JsonParameterOptions = JsonSchemaOptions & {
|
|
6
6
|
jsonParameter: JsonParameter;
|
|
7
7
|
jsonSchema: JSONSchema6;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JsonParameter } from "
|
|
2
|
-
import { JsonSchemaOptions } from "
|
|
1
|
+
import { JsonParameter } from "../../domain/JsonParameter";
|
|
2
|
+
import { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions";
|
|
3
3
|
export declare function operationRequestBodyMapper(bodyParameters: JsonParameter[], { consumes, ...options }: JsonSchemaOptions): any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { JsonSchemaOptions } from "
|
|
1
|
+
import { JsonSchemaOptions } from "../../interfaces/JsonSchemaOptions";
|
|
2
2
|
export declare function pathsMapper(model: any, { paths, rootPath, ...options }: JsonSchemaOptions): any;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare enum OperationVerbs {
|
|
2
|
+
ALL = "ALL",
|
|
3
|
+
GET = "GET",
|
|
4
|
+
POST = "POST",
|
|
5
|
+
PUT = "PUT",
|
|
6
|
+
PATCH = "PATCH",
|
|
7
|
+
HEAD = "HEAD",
|
|
8
|
+
DELETE = "DELETE",
|
|
9
|
+
OPTIONS = "OPTIONS",
|
|
10
|
+
TRACE = "TRACE",
|
|
11
|
+
PUBLISH = "PUBLISH",
|
|
12
|
+
SUBSCRIBE = "SUBSCRIBE",
|
|
13
|
+
CUSTOM = "CUSTOM"
|
|
14
|
+
}
|
|
15
|
+
export declare const OPERATION_HTTP_VERBS: OperationVerbs[];
|
|
16
|
+
export declare const OPERATION_WS_VERBS: OperationVerbs[];
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use OperationVerbs instead of OperationMethods
|
|
19
|
+
*/
|
|
20
|
+
export declare const OperationMethods: typeof OperationVerbs;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { OperationVerbs } from "../../constants/OperationVerbs";
|
|
2
|
+
export interface RouteChainedDecorators {
|
|
3
|
+
<T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;
|
|
4
|
+
/**
|
|
5
|
+
* @param string
|
|
6
|
+
* @constructor
|
|
7
|
+
*/
|
|
8
|
+
Path(string: string): this;
|
|
9
|
+
/**
|
|
10
|
+
* Set the operation method
|
|
11
|
+
* @param method
|
|
12
|
+
*/
|
|
13
|
+
Method(method: OperationVerbs | string): this;
|
|
14
|
+
/**
|
|
15
|
+
* Set the operation id
|
|
16
|
+
* @param id
|
|
17
|
+
*/
|
|
18
|
+
Id(id: string): this;
|
|
19
|
+
/**
|
|
20
|
+
* Set the operation id
|
|
21
|
+
* @param name
|
|
22
|
+
*/
|
|
23
|
+
Name(name: string): this;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param description
|
|
27
|
+
*/
|
|
28
|
+
Description(description: string): this;
|
|
29
|
+
/**
|
|
30
|
+
* Summary
|
|
31
|
+
* @constructor
|
|
32
|
+
* @param Summary
|
|
33
|
+
*/
|
|
34
|
+
Summary(Summary: string): this;
|
|
35
|
+
Use(...args: any[]): this;
|
|
36
|
+
UseAfter(...args: any[]): this;
|
|
37
|
+
UseBefore(...args: any[]): this;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Describe a new route with a method and path.
|
|
41
|
+
*
|
|
42
|
+
* ```typescript
|
|
43
|
+
* @Controller('/')
|
|
44
|
+
* export class Ctrl {
|
|
45
|
+
*
|
|
46
|
+
* @Route('GET', '/')
|
|
47
|
+
* get() { }
|
|
48
|
+
* }
|
|
49
|
+
*
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @returns {Function}
|
|
53
|
+
* @param method
|
|
54
|
+
* @param path
|
|
55
|
+
* @param args
|
|
56
|
+
* @decorator
|
|
57
|
+
* @operation
|
|
58
|
+
*/
|
|
59
|
+
export declare function Operation(method: string, path: string, ...args: any[]): RouteChainedDecorators;
|
|
60
|
+
export declare function Operation(...args: any[]): RouteChainedDecorators;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OperationVerbs } from "../../constants/OperationVerbs";
|
|
2
2
|
/**
|
|
3
3
|
* Declare new Operation with his path and http method.
|
|
4
4
|
*
|
|
@@ -18,4 +18,4 @@ import { OperationMethods } from "../../constants/httpMethods";
|
|
|
18
18
|
* @schema
|
|
19
19
|
* @operation
|
|
20
20
|
*/
|
|
21
|
-
export declare function OperationPath(method:
|
|
21
|
+
export declare function OperationPath(method: OperationVerbs | string, path?: string | RegExp): (...args: any[]) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Publish(event: string): import("./operation").RouteChainedDecorators;
|
|
@@ -1,63 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface RouteChainedDecorators {
|
|
3
|
-
<T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;
|
|
4
|
-
/**
|
|
5
|
-
* @param string
|
|
6
|
-
* @constructor
|
|
7
|
-
*/
|
|
8
|
-
Path(string: string): this;
|
|
9
|
-
/**
|
|
10
|
-
* Set the operation method
|
|
11
|
-
* @param method
|
|
12
|
-
*/
|
|
13
|
-
Method(method: OperationMethods | string): this;
|
|
14
|
-
/**
|
|
15
|
-
* Set the operation id
|
|
16
|
-
* @param id
|
|
17
|
-
*/
|
|
18
|
-
Id(id: string): this;
|
|
19
|
-
/**
|
|
20
|
-
* Set the operation id
|
|
21
|
-
* @param name
|
|
22
|
-
*/
|
|
23
|
-
Name(name: string): this;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @param description
|
|
27
|
-
*/
|
|
28
|
-
Description(description: string): this;
|
|
29
|
-
/**
|
|
30
|
-
* Summary
|
|
31
|
-
* @constructor
|
|
32
|
-
* @param Summary
|
|
33
|
-
*/
|
|
34
|
-
Summary(Summary: string): this;
|
|
35
|
-
Use(...args: any[]): this;
|
|
36
|
-
UseAfter(...args: any[]): this;
|
|
37
|
-
UseBefore(...args: any[]): this;
|
|
38
|
-
}
|
|
1
|
+
import { Operation } from "./operation";
|
|
39
2
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* ```typescript
|
|
43
|
-
* @Controller('/')
|
|
44
|
-
* export class Ctrl {
|
|
45
|
-
*
|
|
46
|
-
* @Route('GET', '/')
|
|
47
|
-
* get() { }
|
|
48
|
-
* }
|
|
49
|
-
*
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @returns {Function}
|
|
53
|
-
* @param method
|
|
54
|
-
* @param path
|
|
55
|
-
* @param args
|
|
56
|
-
* @decorator
|
|
57
|
-
* @operation
|
|
3
|
+
* @deprecated Use Operation instead of Route
|
|
58
4
|
*/
|
|
59
|
-
export declare
|
|
60
|
-
export declare function Route(...args: any[]): RouteChainedDecorators;
|
|
5
|
+
export declare const Route: typeof Operation;
|
|
61
6
|
/**
|
|
62
7
|
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
63
8
|
*
|
|
@@ -73,7 +18,7 @@ export declare function Route(...args: any[]): RouteChainedDecorators;
|
|
|
73
18
|
* @operation
|
|
74
19
|
* @httpMethod
|
|
75
20
|
*/
|
|
76
|
-
export declare function All(path?: string | RegExp |
|
|
21
|
+
export declare function All(path?: string | RegExp | unknown, ...args: unknown[]): import("./operation").RouteChainedDecorators;
|
|
77
22
|
/**
|
|
78
23
|
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
79
24
|
*
|
|
@@ -89,7 +34,7 @@ export declare function All(path?: string | RegExp | any, ...args: any[]): Route
|
|
|
89
34
|
* @operation
|
|
90
35
|
* @httpMethod
|
|
91
36
|
*/
|
|
92
|
-
export declare function Get(path?: string | RegExp |
|
|
37
|
+
export declare function Get(path?: string | RegExp | unknown, ...args: unknown[]): import("./operation").RouteChainedDecorators;
|
|
93
38
|
/**
|
|
94
39
|
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
95
40
|
*
|
|
@@ -105,7 +50,7 @@ export declare function Get(path?: string | RegExp | any, ...args: any[]): Route
|
|
|
105
50
|
* @operation
|
|
106
51
|
* @httpMethod
|
|
107
52
|
*/
|
|
108
|
-
export declare function Post(path?: string | RegExp |
|
|
53
|
+
export declare function Post(path?: string | RegExp | unknown, ...args: unknown[]): import("./operation").RouteChainedDecorators;
|
|
109
54
|
/**
|
|
110
55
|
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
111
56
|
*
|
|
@@ -121,7 +66,7 @@ export declare function Post(path?: string | RegExp | any, ...args: any[]): Rout
|
|
|
121
66
|
* @operation
|
|
122
67
|
* @httpMethod
|
|
123
68
|
*/
|
|
124
|
-
export declare function Put(path?: string | RegExp |
|
|
69
|
+
export declare function Put(path?: string | RegExp | unknown, ...args: unknown[]): import("./operation").RouteChainedDecorators;
|
|
125
70
|
/**
|
|
126
71
|
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
127
72
|
*
|
|
@@ -137,7 +82,7 @@ export declare function Put(path?: string | RegExp | any, ...args: any[]): Route
|
|
|
137
82
|
* @operation
|
|
138
83
|
* @httpMethod
|
|
139
84
|
*/
|
|
140
|
-
export declare function Delete(path?: string | RegExp |
|
|
85
|
+
export declare function Delete(path?: string | RegExp | unknown, ...args: unknown[]): import("./operation").RouteChainedDecorators;
|
|
141
86
|
/**
|
|
142
87
|
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
143
88
|
*
|
|
@@ -153,7 +98,7 @@ export declare function Delete(path?: string | RegExp | any, ...args: any[]): Ro
|
|
|
153
98
|
* @operation
|
|
154
99
|
* @httpMethod
|
|
155
100
|
*/
|
|
156
|
-
export declare function Head(path?: string | RegExp |
|
|
101
|
+
export declare function Head(path?: string | RegExp | unknown, ...args: unknown[]): import("./operation").RouteChainedDecorators;
|
|
157
102
|
/**
|
|
158
103
|
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
159
104
|
*
|
|
@@ -169,7 +114,7 @@ export declare function Head(path?: string | RegExp | any, ...args: any[]): Rout
|
|
|
169
114
|
* @operation
|
|
170
115
|
* @httpMethod
|
|
171
116
|
*/
|
|
172
|
-
export declare function Patch(path?: string | RegExp | any, ...args: any[]): RouteChainedDecorators;
|
|
117
|
+
export declare function Patch(path?: string | RegExp | any, ...args: any[]): import("./operation").RouteChainedDecorators;
|
|
173
118
|
/**
|
|
174
119
|
* This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).
|
|
175
120
|
*
|
|
@@ -185,4 +130,4 @@ export declare function Patch(path?: string | RegExp | any, ...args: any[]): Rou
|
|
|
185
130
|
* @operation
|
|
186
131
|
* @httpMethod
|
|
187
132
|
*/
|
|
188
|
-
export declare function Options(path?: string | RegExp |
|
|
133
|
+
export declare function Options(path?: string | RegExp | unknown, ...args: unknown[]): import("./operation").RouteChainedDecorators;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Subscribe(event: string): import("./operation").RouteChainedDecorators;
|
|
@@ -47,4 +47,5 @@ export declare class JsonOperation extends JsonMap<JsonOperationOptions> {
|
|
|
47
47
|
produces(produces: string[]): this;
|
|
48
48
|
addProduce(produce: string): void;
|
|
49
49
|
addOperationPath(method: string, path: string | RegExp, options?: any): this;
|
|
50
|
+
getAllowedOperationPath(allowedVerbs?: string[]): JsonMethodPath[];
|
|
50
51
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Automatically generated by barrelsby.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./components/
|
|
5
|
-
export * from "./components/
|
|
6
|
-
export * from "./components/
|
|
7
|
-
export * from "./components/
|
|
8
|
-
export * from "./components/
|
|
9
|
-
export * from "./components/
|
|
10
|
-
export * from "./components/
|
|
11
|
-
export * from "./components/
|
|
12
|
-
export * from "./components/
|
|
13
|
-
export * from "./components/
|
|
14
|
-
export * from "./components/
|
|
15
|
-
export * from "./components/
|
|
16
|
-
export * from "./components/
|
|
17
|
-
export * from "./components/
|
|
18
|
-
export * from "./components/
|
|
19
|
-
export * from "./components/
|
|
20
|
-
export * from "./components/
|
|
21
|
-
export * from "./components/
|
|
22
|
-
export * from "./components/
|
|
23
|
-
export * from "./components/
|
|
24
|
-
export * from "./
|
|
4
|
+
export * from "./components/async-api/channelsMapper";
|
|
5
|
+
export * from "./components/async-api/generate";
|
|
6
|
+
export * from "./components/async-api/messageMapper";
|
|
7
|
+
export * from "./components/async-api/payloadMapper";
|
|
8
|
+
export * from "./components/async-api/responseMapper";
|
|
9
|
+
export * from "./components/default/anyMapper";
|
|
10
|
+
export * from "./components/default/classMapper";
|
|
11
|
+
export * from "./components/default/genericsMapper";
|
|
12
|
+
export * from "./components/default/inheritedClassMapper";
|
|
13
|
+
export * from "./components/default/itemMapper";
|
|
14
|
+
export * from "./components/default/lazyRefMapper";
|
|
15
|
+
export * from "./components/default/mapMapper";
|
|
16
|
+
export * from "./components/default/objectMapper";
|
|
17
|
+
export * from "./components/default/ofMapper";
|
|
18
|
+
export * from "./components/default/propertiesMapper";
|
|
19
|
+
export * from "./components/default/schemaMapper";
|
|
20
|
+
export * from "./components/open-spec/generate";
|
|
21
|
+
export * from "./components/open-spec/operationInFilesMapper";
|
|
22
|
+
export * from "./components/open-spec/operationInParameterMapper";
|
|
23
|
+
export * from "./components/open-spec/operationInParametersMapper";
|
|
24
|
+
export * from "./components/open-spec/operationInQueryMapper";
|
|
25
|
+
export * from "./components/open-spec/operationMapper";
|
|
26
|
+
export * from "./components/open-spec/operationMediaMapper";
|
|
27
|
+
export * from "./components/open-spec/operationRequestBodyMapper";
|
|
28
|
+
export * from "./components/open-spec/operationResponseMapper";
|
|
29
|
+
export * from "./components/open-spec/pathsMapper";
|
|
30
|
+
export * from "./constants/OperationVerbs";
|
|
25
31
|
export * from "./constants/httpStatusMessages";
|
|
26
32
|
export * from "./decorators/class/children";
|
|
27
33
|
export * from "./decorators/class/discriminatorValue";
|
|
@@ -86,16 +92,19 @@ export * from "./decorators/operations/header";
|
|
|
86
92
|
export * from "./decorators/operations/in";
|
|
87
93
|
export * from "./decorators/operations/inFile";
|
|
88
94
|
export * from "./decorators/operations/location";
|
|
95
|
+
export * from "./decorators/operations/operation";
|
|
89
96
|
export * from "./decorators/operations/operationId";
|
|
90
97
|
export * from "./decorators/operations/operationPath";
|
|
91
98
|
export * from "./decorators/operations/partial";
|
|
92
99
|
export * from "./decorators/operations/path";
|
|
93
100
|
export * from "./decorators/operations/produces";
|
|
101
|
+
export * from "./decorators/operations/publish";
|
|
94
102
|
export * from "./decorators/operations/redirect";
|
|
95
103
|
export * from "./decorators/operations/returns";
|
|
96
104
|
export * from "./decorators/operations/route";
|
|
97
105
|
export * from "./decorators/operations/security";
|
|
98
106
|
export * from "./decorators/operations/status";
|
|
107
|
+
export * from "./decorators/operations/subscribe";
|
|
99
108
|
export * from "./decorators/operations/summary";
|
|
100
109
|
export * from "./decorators/operations/tags";
|
|
101
110
|
export * from "./decorators/operations/view";
|
|
@@ -156,12 +165,14 @@ export * from "./utils/mapOpenSpec";
|
|
|
156
165
|
export * from "./utils/mapOpenSpec2";
|
|
157
166
|
export * from "./utils/mapOpenSpec3";
|
|
158
167
|
export * from "./utils/mapOpenSpecInfo";
|
|
159
|
-
export * from "./utils/
|
|
168
|
+
export * from "./utils/mapOperationOptions";
|
|
160
169
|
export * from "./utils/matchGroups";
|
|
161
170
|
export * from "./utils/mergeSpec";
|
|
162
171
|
export * from "./utils/operationIdFormatter";
|
|
163
172
|
export * from "./utils/ref";
|
|
173
|
+
export * from "./utils/removeHiddenOperation";
|
|
164
174
|
export * from "./utils/serializeEnumValues";
|
|
175
|
+
export * from "./utils/somethingOf";
|
|
165
176
|
export * from "./utils/toJsonMapCollection";
|
|
166
177
|
export * from "./utils/toJsonRegex";
|
|
167
178
|
export * from "./utils/transformToOS2";
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { OpenSpecHash, OS2Schema, OS3Schema } from "@tsed/openspec";
|
|
2
1
|
import { SpecTypes } from "../domain/SpecTypes";
|
|
3
2
|
export interface JsonSchemaOptions {
|
|
4
3
|
/**
|
|
5
|
-
* Map properties with the alias name. By default
|
|
4
|
+
* Map properties with the alias name. By default, false
|
|
6
5
|
*/
|
|
7
6
|
useAlias?: boolean;
|
|
8
7
|
/**
|
|
9
|
-
* Reference to
|
|
8
|
+
* Reference to components Object.
|
|
10
9
|
*/
|
|
11
|
-
|
|
10
|
+
components?: Record<string, any>;
|
|
12
11
|
/**
|
|
13
12
|
* Define Spec types level
|
|
14
13
|
*/
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
+
import { SpecTypes } from "../domain/SpecTypes";
|
|
1
2
|
/**
|
|
2
3
|
* @ignore
|
|
3
4
|
*/
|
|
4
5
|
export interface JsonSchemaMapper {
|
|
5
|
-
(
|
|
6
|
+
(...args: any[]): any;
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
9
|
* @ignore
|
|
9
10
|
*/
|
|
10
|
-
export declare function registerJsonSchemaMapper(type: string, mapper: JsonSchemaMapper): Map<string, JsonSchemaMapper>;
|
|
11
|
+
export declare function registerJsonSchemaMapper(type: string, mapper: JsonSchemaMapper, spec?: SpecTypes): Map<string, JsonSchemaMapper>;
|
|
11
12
|
/**
|
|
12
13
|
* @ignore
|
|
13
14
|
*/
|
|
14
|
-
export declare function getJsonSchemaMapper(type: string): JsonSchemaMapper;
|
|
15
|
+
export declare function getJsonSchemaMapper(type: string, options: any): JsonSchemaMapper;
|
|
15
16
|
/**
|
|
16
17
|
* @ignore
|
|
17
18
|
*/
|
|
18
|
-
export declare function execMapper(type: string,
|
|
19
|
+
export declare function execMapper(type: string, args: any[], options: any, parent?: any): any;
|
|
19
20
|
export declare function hasMapper(type: string): boolean;
|
|
20
|
-
export declare function oneOfMapper(
|
|
21
|
+
export declare function oneOfMapper(types: string[], options: any): string;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Type } from "@tsed/core";
|
|
2
|
+
import { OperationVerbs } from "../constants/OperationVerbs";
|
|
2
3
|
import { JsonMethodStore } from "../domain/JsonMethodStore";
|
|
3
4
|
import { JsonOperationRoute } from "../domain/JsonOperationRoute";
|
|
4
5
|
export interface GetOperationsRoutesOptions {
|
|
5
6
|
withChildren?: boolean;
|
|
6
7
|
basePath?: string;
|
|
8
|
+
allowedVerbs?: OperationVerbs[];
|
|
7
9
|
}
|
|
8
10
|
export declare function getOperationsRoutes<Entity extends JsonMethodStore = JsonMethodStore>(token: Type<any> | any, options?: GetOperationsRoutesOptions): JsonOperationRoute<Entity>[];
|
|
@@ -8,7 +8,11 @@ export interface SpecSerializerOptions extends JsonSchemaOptions {
|
|
|
8
8
|
/**
|
|
9
9
|
* Paths
|
|
10
10
|
*/
|
|
11
|
-
paths?: any
|
|
11
|
+
paths?: Record<string, any>;
|
|
12
|
+
/**
|
|
13
|
+
* Channels
|
|
14
|
+
*/
|
|
15
|
+
channels?: Record<string, any>;
|
|
12
16
|
/**
|
|
13
17
|
* Root path. This paths will be added to all generated paths Object.
|
|
14
18
|
*/
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions";
|
|
1
2
|
/**
|
|
2
3
|
* @ignore
|
|
3
4
|
*/
|
|
4
5
|
export declare function operationIdFormatter(pattern?: string): (name: string, propertyKey: string, path?: string) => string;
|
|
6
|
+
export declare function getOperationId(path: string, { store, operationIdFormatter }: JsonSchemaOptions): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function makeOf(key: string, schemes: unknown[]): unknown;
|