@trapi/swagger 1.0.0-alpha.11 → 1.0.0-alpha.12
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/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +24 -24
- package/dist/config/type.d.ts +82 -82
- package/dist/config/type.js +8 -8
- package/dist/config/utils.d.ts +2 -2
- package/dist/config/utils.js +53 -53
- package/dist/constants.d.ts +14 -14
- package/dist/constants.js +26 -26
- package/dist/generator/abstract.d.ts +34 -34
- package/dist/generator/abstract.js +251 -251
- package/dist/generator/index.d.ts +4 -4
- package/dist/generator/index.js +26 -26
- package/dist/generator/module.d.ts +13 -13
- package/dist/generator/module.js +34 -34
- package/dist/generator/v2/index.d.ts +1 -1
- package/dist/generator/v2/index.js +23 -23
- package/dist/generator/v2/module.d.ts +24 -24
- package/dist/generator/v2/module.js +516 -516
- package/dist/generator/v3/index.d.ts +1 -1
- package/dist/generator/v3/index.js +23 -23
- package/dist/generator/v3/module.d.ts +29 -29
- package/dist/generator/v3/module.js +498 -498
- package/dist/index.d.ts +7 -7
- package/dist/index.js +29 -29
- package/dist/metadata.d.ts +3 -3
- package/dist/metadata.js +13 -13
- package/dist/schema/constants.d.ts +27 -27
- package/dist/schema/constants.js +39 -39
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.js +26 -26
- package/dist/schema/type.d.ts +138 -138
- package/dist/schema/type.js +8 -8
- package/dist/schema/v2/constants.d.ts +7 -7
- package/dist/schema/v2/constants.js +17 -17
- package/dist/schema/v2/index.d.ts +2 -2
- package/dist/schema/v2/index.js +24 -24
- package/dist/schema/v2/type.d.ts +115 -115
- package/dist/schema/v2/type.js +8 -8
- package/dist/schema/v3/constants.d.ts +6 -6
- package/dist/schema/v3/constants.js +16 -16
- package/dist/schema/v3/index.d.ts +2 -2
- package/dist/schema/v3/index.js +24 -24
- package/dist/schema/v3/type.d.ts +158 -158
- package/dist/schema/v3/type.js +8 -8
- package/dist/type.d.ts +48 -48
- package/dist/type.js +8 -8
- package/dist/utils/character.d.ts +2 -2
- package/dist/utils/character.js +20 -20
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/index.js +26 -26
- package/dist/utils/object.d.ts +1 -1
- package/dist/utils/object.js +14 -14
- package/dist/utils/path.d.ts +1 -1
- package/dist/utils/path.js +20 -20
- package/dist/utils/value.d.ts +1 -1
- package/dist/utils/value.js +25 -25
- package/package.json +4 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './module';
|
|
1
|
+
export * from './module';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2023.
|
|
4
|
-
* Author Peter Placzek (tada5hi)
|
|
5
|
-
* For the full copyright and license information,
|
|
6
|
-
* view the LICENSE file that was distributed with this source code.
|
|
7
|
-
*/
|
|
8
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(o, k2, desc);
|
|
15
|
-
}) : (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
o[k2] = m[k];
|
|
18
|
-
}));
|
|
19
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
__exportStar(require("./module"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023.
|
|
4
|
+
* Author Peter Placzek (tada5hi)
|
|
5
|
+
* For the full copyright and license information,
|
|
6
|
+
* view the LICENSE file that was distributed with this source code.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
__exportStar(require("./module"), exports);
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import type { EnumType, IntersectionType, Method, Parameter, RefAliasType, RefEnumType, RefObjectType, ReferenceType, ResolverProperty, Response, UnionType } from '@trapi/metadata';
|
|
2
|
-
import { ParameterSource } from '@trapi/metadata';
|
|
3
|
-
import type { OperationV3, ParameterV3, ResponseV3, SchemaV3, SpecV3 } from '../../schema';
|
|
4
|
-
import { ParameterSourceV3 } from '../../schema';
|
|
5
|
-
import { AbstractSpecGenerator } from '../abstract';
|
|
6
|
-
export declare class V3Generator extends AbstractSpecGenerator<SpecV3, SchemaV3> {
|
|
7
|
-
build(): Promise<SpecV3>;
|
|
8
|
-
private buildComponents;
|
|
9
|
-
private static translateSecurityDefinitions;
|
|
10
|
-
private buildPaths;
|
|
11
|
-
private buildMethod;
|
|
12
|
-
private buildRequestBodyWithFormData;
|
|
13
|
-
private buildRequestBody;
|
|
14
|
-
private buildMediaType;
|
|
15
|
-
protected buildResponses(input: Response[]): Record<string, ResponseV3>;
|
|
16
|
-
protected buildOperation(controllerName: string, method: Method): OperationV3;
|
|
17
|
-
protected transformParameterSource(source: `${ParameterSource}`): `${ParameterSourceV3}` | undefined;
|
|
18
|
-
protected buildParameter(input: Parameter): ParameterV3;
|
|
19
|
-
private transformParameterExamples;
|
|
20
|
-
private buildServers;
|
|
21
|
-
protected buildSchemaForRefObject(input: RefObjectType): SchemaV3;
|
|
22
|
-
protected buildSchemaForRefEnum(referenceType: RefEnumType): SchemaV3;
|
|
23
|
-
protected buildSchemaForRefAlias(referenceType: RefAliasType): SchemaV3;
|
|
24
|
-
protected buildProperties<T>(properties: ResolverProperty[]): Record<string, SchemaV3>;
|
|
25
|
-
protected getSchemaForIntersectionType(type: IntersectionType): SchemaV3;
|
|
26
|
-
protected getSchemaForEnumType(enumType: EnumType): SchemaV3;
|
|
27
|
-
protected getSchemaForReferenceType(referenceType: ReferenceType): SchemaV3;
|
|
28
|
-
protected getSchemaForUnionType(type: UnionType): SchemaV3;
|
|
29
|
-
}
|
|
1
|
+
import type { EnumType, IntersectionType, Method, Parameter, RefAliasType, RefEnumType, RefObjectType, ReferenceType, ResolverProperty, Response, UnionType } from '@trapi/metadata';
|
|
2
|
+
import { ParameterSource } from '@trapi/metadata';
|
|
3
|
+
import type { OperationV3, ParameterV3, ResponseV3, SchemaV3, SpecV3 } from '../../schema';
|
|
4
|
+
import { ParameterSourceV3 } from '../../schema';
|
|
5
|
+
import { AbstractSpecGenerator } from '../abstract';
|
|
6
|
+
export declare class V3Generator extends AbstractSpecGenerator<SpecV3, SchemaV3> {
|
|
7
|
+
build(): Promise<SpecV3>;
|
|
8
|
+
private buildComponents;
|
|
9
|
+
private static translateSecurityDefinitions;
|
|
10
|
+
private buildPaths;
|
|
11
|
+
private buildMethod;
|
|
12
|
+
private buildRequestBodyWithFormData;
|
|
13
|
+
private buildRequestBody;
|
|
14
|
+
private buildMediaType;
|
|
15
|
+
protected buildResponses(input: Response[]): Record<string, ResponseV3>;
|
|
16
|
+
protected buildOperation(controllerName: string, method: Method): OperationV3;
|
|
17
|
+
protected transformParameterSource(source: `${ParameterSource}`): `${ParameterSourceV3}` | undefined;
|
|
18
|
+
protected buildParameter(input: Parameter): ParameterV3;
|
|
19
|
+
private transformParameterExamples;
|
|
20
|
+
private buildServers;
|
|
21
|
+
protected buildSchemaForRefObject(input: RefObjectType): SchemaV3;
|
|
22
|
+
protected buildSchemaForRefEnum(referenceType: RefEnumType): SchemaV3;
|
|
23
|
+
protected buildSchemaForRefAlias(referenceType: RefAliasType): SchemaV3;
|
|
24
|
+
protected buildProperties<T>(properties: ResolverProperty[]): Record<string, SchemaV3>;
|
|
25
|
+
protected getSchemaForIntersectionType(type: IntersectionType): SchemaV3;
|
|
26
|
+
protected getSchemaForEnumType(enumType: EnumType): SchemaV3;
|
|
27
|
+
protected getSchemaForReferenceType(referenceType: ReferenceType): SchemaV3;
|
|
28
|
+
protected getSchemaForUnionType(type: UnionType): SchemaV3;
|
|
29
|
+
}
|
|
30
30
|
//# sourceMappingURL=module.d.ts.map
|