@trapi/swagger 0.2.9 → 0.2.13
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/specification/abstract.js +2 -2
- package/dist/specification/abstract.js.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +10 -7
- package/src/config/index.ts +0 -8
- package/src/config/utils/index.ts +0 -8
- package/src/config/utils/validator.ts +0 -94
- package/src/index.ts +0 -12
- package/src/metadata.ts +0 -58
- package/src/specification/abstract.ts +0 -250
- package/src/specification/index.ts +0 -11
- package/src/specification/type.ts +0 -328
- package/src/specification/utils.ts +0 -47
- package/src/specification/v2/index.ts +0 -463
- package/src/specification/v2/type.ts +0 -92
- package/src/specification/v3/index.ts +0 -448
- package/src/specification/v3/type.ts +0 -129
- package/src/type.ts +0 -14
- package/src/utils.ts +0 -28
- package/test/data/metadata.json +0 -1
- package/test/jest.config.js +0 -43
- package/test/tsconfig.json +0 -28
- package/test/unit/index.ts +0 -425
- package/tsconfig.build.json +0 -11
- package/tsconfig.json +0 -9
- package/writable/.gitignore +0 -3
|
@@ -39,7 +39,7 @@ const metadata_utils_1 = require("@trapi/metadata-utils");
|
|
|
39
39
|
const metadata_1 = require("@trapi/metadata");
|
|
40
40
|
const path = __importStar(require("path"));
|
|
41
41
|
const fs_1 = require("fs");
|
|
42
|
-
const
|
|
42
|
+
const YAML = __importStar(require("yamljs"));
|
|
43
43
|
class AbstractSpecGenerator {
|
|
44
44
|
constructor(metadata, config) {
|
|
45
45
|
this.metadata = metadata;
|
|
@@ -62,7 +62,7 @@ class AbstractSpecGenerator {
|
|
|
62
62
|
data.yaml = {
|
|
63
63
|
path: path.join(swaggerDir, 'swagger.yaml'),
|
|
64
64
|
name: 'swagger.yaml',
|
|
65
|
-
content:
|
|
65
|
+
content: YAML.stringify(spec, 1000)
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
const filePromises = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../src/specification/abstract.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0DAAqD;AACrD,8CAAoE;AAMpE,2CAA6B;AAC7B,2BAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../src/specification/abstract.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0DAAqD;AACrD,8CAAoE;AAMpE,2CAA6B;AAC7B,2BAAuC;AACvC,6CAA+B;AAG/B,MAAsB,qBAAqB;IAKvC,YAA+B,QAAyB,EAAqB,MAA4B;QAA1E,aAAQ,GAAR,QAAQ,CAAiB;QAAqB,WAAM,GAAN,MAAM,CAAsB;IAEzG,CAAC;IAEY,IAAI;;YACb,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;YAC1B,MAAM,UAAU,GAAW,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YAErE,MAAM,aAAQ,CAAC,KAAK,CAAC,UAAU,EAAE,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;YAEpD,MAAM,IAAI,GAAuD;gBAC7D,IAAI,EAAE;oBACF,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC;oBAC3C,IAAI,EAAE,cAAc;oBACpB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;iBAC5C;gBACD,IAAI,EAAE,SAAS;aAClB,CAAC;YAEF,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;gBAClB,IAAI,CAAC,IAAI,GAAG;oBACR,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC;oBAC3C,IAAI,EAAE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K,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC;YACxD,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACrB,OAAO,MAAM,CAAC;QAClB,CAAC,EAAE,IAAI,GAAG,EAA+F,CAAC,CAAC;IAC/G,CAAC;IAES,cAAc,CAAC,UAAkB;QACvC,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC;CACJ;AAtOD,sDAsOC"}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CompilerOptions } from 'typescript';
|
|
2
2
|
import { Config as MetadataConfig } from "@trapi/metadata";
|
|
3
3
|
import { Specification } from "./specification";
|
|
4
|
-
import { SwaggerDocFormatData, SwaggerDocFormatType } from "
|
|
4
|
+
import { SwaggerDocFormatData, SwaggerDocFormatType } from "./type";
|
|
5
5
|
export declare function generateDocumentation(config: {
|
|
6
6
|
metadata: MetadataConfig;
|
|
7
7
|
swagger: Specification.Config;
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAC,MAAM,IAAI,cAAc,EAA0B,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAsB,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAE,oBAAoB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAC,MAAM,IAAI,cAAc,EAA0B,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAsB,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAE,oBAAoB,EAAC,MAAM,QAAQ,CAAC;AAElE,wBAAsB,qBAAqB,CACvC,MAAM,EAAE;IACJ,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,aAAa,CAAC,MAAM,CAAA;CAChC,EACD,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,GACrC,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC,CAS7D"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/tada5hi"
|
|
7
7
|
},
|
|
8
8
|
"license": "MIT",
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.13",
|
|
10
10
|
"description": "Generate Swagger files from a decorator APIs.",
|
|
11
11
|
"keywords": [
|
|
12
12
|
"typescript",
|
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
],
|
|
23
23
|
"main": "./dist/index.js",
|
|
24
24
|
"typings": "./dist/index.d.ts",
|
|
25
|
+
"files": [
|
|
26
|
+
"dist/"
|
|
27
|
+
],
|
|
25
28
|
"scripts": {
|
|
26
29
|
"start": "tsc -p tsconfig.build.json -w",
|
|
27
30
|
"build": "npm run clean && tsc -p tsconfig.build.json",
|
|
@@ -32,16 +35,16 @@
|
|
|
32
35
|
"preblushOnly": "npm run build"
|
|
33
36
|
},
|
|
34
37
|
"devDependencies": {
|
|
35
|
-
"@types/jest": "^27.0.
|
|
36
|
-
"@types/node": "^16.
|
|
38
|
+
"@types/jest": "^27.0.3",
|
|
39
|
+
"@types/node": "^16.11.12",
|
|
37
40
|
"@types/yamljs": "^0.2.31",
|
|
38
|
-
"jest": "^27.
|
|
41
|
+
"jest": "^27.4.5",
|
|
39
42
|
"rimraf": "^3.0.2"
|
|
40
43
|
},
|
|
41
44
|
"dependencies": {
|
|
42
|
-
"@trapi/metadata": "^0.1.
|
|
45
|
+
"@trapi/metadata": "^0.1.5",
|
|
43
46
|
"@trapi/metadata-utils": "^0.0.4",
|
|
44
|
-
"typescript": "^4.4
|
|
47
|
+
"typescript": "^4.5.4",
|
|
45
48
|
"yamljs": "^0.3.0"
|
|
46
49
|
},
|
|
47
50
|
"repository": {
|
|
@@ -59,5 +62,5 @@
|
|
|
59
62
|
"access": "public"
|
|
60
63
|
},
|
|
61
64
|
"engineStrict": true,
|
|
62
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "9a4e74ccaab05b36dfbcf0513085c4f9589dcddc"
|
|
63
66
|
}
|
package/src/config/index.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021.
|
|
3
|
-
* Author Peter Placzek (tada5hi)
|
|
4
|
-
* For the full copyright and license information,
|
|
5
|
-
* view the LICENSE file that was distributed with this source code.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import {array, boolean, lazy, mixed, object, SchemaOf, string} from "yup";
|
|
9
|
-
import {mapYupRuleForDictionary, getPackageJsonStringValue} from "@trapi/metadata-utils";
|
|
10
|
-
import {Specification} from "../../specification";
|
|
11
|
-
|
|
12
|
-
let validatorInstance : undefined | SchemaOf<Specification.Config>;
|
|
13
|
-
|
|
14
|
-
export function useConfigValidator() : SchemaOf<Specification.Config> {
|
|
15
|
-
if(typeof validatorInstance !== 'undefined') {
|
|
16
|
-
return validatorInstance;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const securityDefinitionsValidator : SchemaOf<Specification.SecurityDefinitions> = lazy(map => {
|
|
20
|
-
if(Object.prototype.toString.call(map) === '[object Object]') {
|
|
21
|
-
const directory = mapYupRuleForDictionary(map, object({
|
|
22
|
-
type: mixed().oneOf(['apiKey', 'oauth2', 'http'] as Specification.SecurityType[]),
|
|
23
|
-
description: string().optional().default(undefined),
|
|
24
|
-
schema: mixed().oneOf(['basic']).optional(),
|
|
25
|
-
in: mixed().oneOf(['query', 'header']),
|
|
26
|
-
flows: object({
|
|
27
|
-
implicit: object({
|
|
28
|
-
refreshUrl: string().optional().default(undefined),
|
|
29
|
-
scopes: mixed().optional().default({}),
|
|
30
|
-
authorizationUrl: string()
|
|
31
|
-
}).optional(),
|
|
32
|
-
password: object({
|
|
33
|
-
refreshUrl: string().optional().default(undefined),
|
|
34
|
-
scopes: mixed().optional().default({}),
|
|
35
|
-
tokenUrl: string()
|
|
36
|
-
}).optional(),
|
|
37
|
-
authorizationCode: object({
|
|
38
|
-
refreshUrl: string().optional().default(undefined),
|
|
39
|
-
scopes: mixed().optional().default({}),
|
|
40
|
-
authorizationUrl: string(),
|
|
41
|
-
tokenUrl: string()
|
|
42
|
-
}).optional(),
|
|
43
|
-
clientCredentials: object({
|
|
44
|
-
refreshUrl: string().optional().default(undefined),
|
|
45
|
-
scopes: mixed().optional().default({}),
|
|
46
|
-
tokenUrl: string()
|
|
47
|
-
})
|
|
48
|
-
}).optional().default(undefined)
|
|
49
|
-
}));
|
|
50
|
-
|
|
51
|
-
return object(directory).default({});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return object().optional().default({});
|
|
55
|
-
}) as unknown as SchemaOf<Specification.SecurityDefinitions>;
|
|
56
|
-
|
|
57
|
-
validatorInstance = object({
|
|
58
|
-
yaml: boolean().optional().default(false),
|
|
59
|
-
|
|
60
|
-
outputDirectory: string().optional().default(undefined),
|
|
61
|
-
outputFileName: string().optional().default(undefined),
|
|
62
|
-
|
|
63
|
-
specification: (string().oneOf([
|
|
64
|
-
Specification.SpecificationOption.V2,
|
|
65
|
-
Specification.SpecificationOption.V3
|
|
66
|
-
]).optional().default(Specification.SpecificationOption.V2)) as SchemaOf<Specification.SpecificationOption>,
|
|
67
|
-
specificationExtra: mixed().optional().default(undefined),
|
|
68
|
-
|
|
69
|
-
host: string().optional().default(undefined),
|
|
70
|
-
version: string().optional().default(undefined),
|
|
71
|
-
name: string().optional().default(undefined),
|
|
72
|
-
description: string().optional().default(undefined),
|
|
73
|
-
license: string().optional().default(undefined),
|
|
74
|
-
basePath: string().optional().default(undefined),
|
|
75
|
-
securityDefinitions: securityDefinitionsValidator,
|
|
76
|
-
|
|
77
|
-
consumes: array().of(string()).optional().default(undefined),
|
|
78
|
-
produces: array().of(string()).optional().default(undefined),
|
|
79
|
-
collectionFormat: string().optional().default(undefined)
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
return validatorInstance;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
export function extendSwaggerConfig(workingDir: string, conf: Specification.Config): Specification.Config {
|
|
87
|
-
conf.version = conf.version || getPackageJsonStringValue(workingDir, 'version', '0.0.1');
|
|
88
|
-
conf.name = conf.name || getPackageJsonStringValue(workingDir, 'name');
|
|
89
|
-
conf.description = conf.description || getPackageJsonStringValue(workingDir, 'description');
|
|
90
|
-
conf.license = conf.license || getPackageJsonStringValue(workingDir, 'license', 'MIT');
|
|
91
|
-
conf.specification = Specification.SpecificationOption[conf.specification] || Specification.SpecificationOption.V2;
|
|
92
|
-
|
|
93
|
-
return conf;
|
|
94
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021.
|
|
3
|
-
* Author Peter Placzek (tada5hi)
|
|
4
|
-
* For the full copyright and license information,
|
|
5
|
-
* view the LICENSE file that was distributed with this source code.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export * from './config';
|
|
9
|
-
export * from './metadata';
|
|
10
|
-
export * from './specification';
|
|
11
|
-
export * from './type';
|
|
12
|
-
export * from './utils';
|
package/src/metadata.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021.
|
|
3
|
-
* Author Peter Placzek (tada5hi)
|
|
4
|
-
* For the full copyright and license information,
|
|
5
|
-
* view the LICENSE file that was distributed with this source code.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
// Utils
|
|
10
|
-
generateMetadata,
|
|
11
|
-
createMetadataGenerator,
|
|
12
|
-
|
|
13
|
-
// Types & Interfaces
|
|
14
|
-
GeneratorOutput as MetadataGeneratorOutput,
|
|
15
|
-
Config as MetadataConfig,
|
|
16
|
-
Cache as MetadataCache,
|
|
17
|
-
|
|
18
|
-
// Internal Decorators
|
|
19
|
-
RequestConsumes,
|
|
20
|
-
RequestFileParam,
|
|
21
|
-
ResponseDescription,
|
|
22
|
-
ResponseExample,
|
|
23
|
-
ResponseProduces,
|
|
24
|
-
SwaggerTags,
|
|
25
|
-
SwaggerHidden,
|
|
26
|
-
SwaggerDeprecated,
|
|
27
|
-
IsDouble,
|
|
28
|
-
IsFloat,
|
|
29
|
-
IsLong,
|
|
30
|
-
IsInt,
|
|
31
|
-
} from "@trapi/metadata";
|
|
32
|
-
|
|
33
|
-
type MetadataCacheConfig = MetadataCache.Config;
|
|
34
|
-
|
|
35
|
-
export {
|
|
36
|
-
// Utils
|
|
37
|
-
generateMetadata,
|
|
38
|
-
createMetadataGenerator,
|
|
39
|
-
|
|
40
|
-
// Types & Interfaces
|
|
41
|
-
MetadataGeneratorOutput,
|
|
42
|
-
MetadataCacheConfig,
|
|
43
|
-
MetadataConfig,
|
|
44
|
-
|
|
45
|
-
// Internal Decorators
|
|
46
|
-
RequestConsumes,
|
|
47
|
-
RequestFileParam,
|
|
48
|
-
ResponseDescription,
|
|
49
|
-
ResponseExample,
|
|
50
|
-
ResponseProduces,
|
|
51
|
-
SwaggerTags,
|
|
52
|
-
SwaggerHidden,
|
|
53
|
-
SwaggerDeprecated,
|
|
54
|
-
IsDouble,
|
|
55
|
-
IsFloat,
|
|
56
|
-
IsLong,
|
|
57
|
-
IsInt,
|
|
58
|
-
}
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021.
|
|
3
|
-
* Author Peter Placzek (tada5hi)
|
|
4
|
-
* For the full copyright and license information,
|
|
5
|
-
* view the LICENSE file that was distributed with this source code.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import {hasOwnProperty} from "@trapi/metadata-utils";
|
|
9
|
-
import {GeneratorOutput, Property, Resolver} from "@trapi/metadata";
|
|
10
|
-
|
|
11
|
-
import {SpecificationV2} from "./v2/type";
|
|
12
|
-
import {SpecificationV3} from "./v3/type";
|
|
13
|
-
|
|
14
|
-
import {SwaggerDocFormatType, SwaggerDocFormatData} from "../type";
|
|
15
|
-
import * as path from "path";
|
|
16
|
-
import {promises, writeFile} from "fs";
|
|
17
|
-
import {stringify} from "yamljs";
|
|
18
|
-
import {Specification} from "./type";
|
|
19
|
-
|
|
20
|
-
export abstract class AbstractSpecGenerator<Spec extends SpecificationV2.Spec | SpecificationV3.Spec,
|
|
21
|
-
Schema extends SpecificationV3.Schema | SpecificationV2.Schema> {
|
|
22
|
-
|
|
23
|
-
protected spec: Spec;
|
|
24
|
-
|
|
25
|
-
constructor(protected readonly metadata: GeneratorOutput, protected readonly config: Specification.Config) {
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
public async save(): Promise<Record<SwaggerDocFormatType, SwaggerDocFormatData>> {
|
|
30
|
-
const spec = this.build();
|
|
31
|
-
const swaggerDir: string = path.resolve(this.config.outputDirectory);
|
|
32
|
-
|
|
33
|
-
await promises.mkdir(swaggerDir, {recursive: true});
|
|
34
|
-
|
|
35
|
-
const data: Record<SwaggerDocFormatType, SwaggerDocFormatData> = {
|
|
36
|
-
json: {
|
|
37
|
-
path: path.join(swaggerDir, 'swagger.json'),
|
|
38
|
-
name: 'swagger.json',
|
|
39
|
-
content: JSON.stringify(spec, null, '\t')
|
|
40
|
-
},
|
|
41
|
-
yaml: undefined
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
if (this.config.yaml) {
|
|
45
|
-
data.yaml = {
|
|
46
|
-
path: path.join(swaggerDir, 'swagger.yaml'),
|
|
47
|
-
name: 'swagger.yaml',
|
|
48
|
-
content: stringify(spec, 1000)
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const filePromises: Array<Promise<void>> = [];
|
|
53
|
-
|
|
54
|
-
for (const key in data) {
|
|
55
|
-
if (typeof data[key as SwaggerDocFormatType] === 'undefined') {
|
|
56
|
-
continue;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const output = data[key as SwaggerDocFormatType];
|
|
60
|
-
|
|
61
|
-
filePromises.push(new Promise(((resolve, reject) => {
|
|
62
|
-
return writeFile(output.path, output.content, (err: any) => {
|
|
63
|
-
if (err) {
|
|
64
|
-
return reject(err);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return resolve();
|
|
68
|
-
});
|
|
69
|
-
})));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
await Promise.all(filePromises);
|
|
73
|
-
|
|
74
|
-
return data;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
public getMetaData() {
|
|
78
|
-
return this.metadata;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
public abstract getSwaggerSpec(): Spec;
|
|
82
|
-
|
|
83
|
-
public abstract build(): Spec;
|
|
84
|
-
|
|
85
|
-
protected buildInfo() {
|
|
86
|
-
const info: Specification.Info = {
|
|
87
|
-
title: this.config.name || '',
|
|
88
|
-
version: this.config.version || '1.0.0'
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
if (this.config.description) {
|
|
92
|
-
info.description = this.config.description;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (this.config.license) {
|
|
96
|
-
info.license = {name: this.config.license};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return info;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
protected getSwaggerType(type: Resolver.BaseType): Schema | Specification.BaseSchema<Schema> {
|
|
103
|
-
if (Resolver.isVoidType(type)) {
|
|
104
|
-
return {} as Schema;
|
|
105
|
-
} else if (Resolver.isReferenceType(type)) {
|
|
106
|
-
return this.getSwaggerTypeForReferenceType(type);
|
|
107
|
-
} else if (
|
|
108
|
-
type.typeName === 'any' ||
|
|
109
|
-
type.typeName === 'binary' ||
|
|
110
|
-
type.typeName === 'boolean' ||
|
|
111
|
-
type.typeName === 'buffer' ||
|
|
112
|
-
type.typeName === 'byte' ||
|
|
113
|
-
type.typeName === 'date' ||
|
|
114
|
-
type.typeName === 'datetime' ||
|
|
115
|
-
type.typeName === 'double' ||
|
|
116
|
-
type.typeName === 'float' ||
|
|
117
|
-
type.typeName === 'file' ||
|
|
118
|
-
type.typeName === 'integer' ||
|
|
119
|
-
type.typeName === 'long' ||
|
|
120
|
-
type.typeName === 'object' ||
|
|
121
|
-
type.typeName === 'string'
|
|
122
|
-
) {
|
|
123
|
-
return this.getSwaggerTypeForPrimitiveType(type.typeName);
|
|
124
|
-
} else if (Resolver.isArrayType(type)) {
|
|
125
|
-
return this.getSwaggerTypeForArrayType(type);
|
|
126
|
-
} else if (Resolver.isEnumType(type)) {
|
|
127
|
-
return this.getSwaggerTypeForEnumType(type);
|
|
128
|
-
} else if (Resolver.isUnionType(type)) {
|
|
129
|
-
return this.getSwaggerTypeForUnionType(type);
|
|
130
|
-
} else if (Resolver.isIntersectionType(type)) {
|
|
131
|
-
return this.getSwaggerTypeForIntersectionType(type);
|
|
132
|
-
} else if (Resolver.isNestedObjectLiteralType(type)) {
|
|
133
|
-
return this.getSwaggerTypeForObjectLiteral(type);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
return {} as Schema;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
protected abstract getSwaggerTypeForIntersectionType(type: Resolver.IntersectionType): Schema;
|
|
140
|
-
|
|
141
|
-
protected abstract getSwaggerTypeForEnumType(enumType: Resolver.EnumType): Schema;
|
|
142
|
-
|
|
143
|
-
protected getSwaggerTypeForUnionType(type: Resolver.UnionType): Schema | Specification.BaseSchema<Schema> {
|
|
144
|
-
if (type.members.every((subType: Resolver.Type) => subType.typeName === 'enum')) {
|
|
145
|
-
const mergedEnum: Resolver.EnumType = {typeName: 'enum', members: []};
|
|
146
|
-
type.members.forEach((t: Resolver.Type) => {
|
|
147
|
-
mergedEnum.members = [...mergedEnum.members, ...(t as Resolver.EnumType).members];
|
|
148
|
-
});
|
|
149
|
-
return this.getSwaggerTypeForEnumType(mergedEnum);
|
|
150
|
-
} else if (type.members.length === 2 && type.members.find((typeInUnion: Resolver.Type) => typeInUnion.typeName === 'enum' && typeInUnion.members.includes(null))) {
|
|
151
|
-
// Backwards compatible representation of dataType or null, $ref does not allow any sibling attributes, so we have to bail out
|
|
152
|
-
const nullEnumIndex = type.members.findIndex((a: Resolver.Type) => Resolver.isEnumType(a) && a.members.includes(null));
|
|
153
|
-
const typeIndex = nullEnumIndex === 1 ? 0 : 1;
|
|
154
|
-
const swaggerType = this.getSwaggerType(type.members[typeIndex]);
|
|
155
|
-
const isRef = hasOwnProperty(swaggerType, '$ref') && !!swaggerType.$ref;
|
|
156
|
-
|
|
157
|
-
if (isRef) {
|
|
158
|
-
return {type: 'object'} as Schema;
|
|
159
|
-
} else {
|
|
160
|
-
// @ts-ignore
|
|
161
|
-
swaggerType['x-nullable'] = true;
|
|
162
|
-
return swaggerType;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
if (type.members.length === 2) {
|
|
167
|
-
let index = type.members.findIndex((member: Resolver.Type) => Resolver.isArrayType(member));
|
|
168
|
-
if (index !== -1) {
|
|
169
|
-
const otherIndex = index === 0 ? 1 : 0;
|
|
170
|
-
|
|
171
|
-
if ((type.members[index] as Resolver.ArrayType).elementType.typeName === type.members[otherIndex].typeName) {
|
|
172
|
-
return this.getSwaggerType(type.members[otherIndex]);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
index = type.members.findIndex((member: Resolver.Type) => Resolver.isAnyType(member));
|
|
177
|
-
if (index !== -1) {
|
|
178
|
-
const otherIndex = index === 0 ? 1 : 0;
|
|
179
|
-
|
|
180
|
-
if (Resolver.isAnyType(type.members[index])) {
|
|
181
|
-
return this.getSwaggerType(type.members[otherIndex]);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return {type: 'object'} as Schema;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
private getSwaggerTypeForPrimitiveType(type: Resolver.PrimitiveTypeLiteral): Specification.BaseSchema<Schema> {
|
|
190
|
-
const PrimitiveSwaggerTypeMap: Record<Resolver.PrimitiveTypeLiteral, Specification.BaseSchema<Schema>> = {
|
|
191
|
-
any: {
|
|
192
|
-
// While the any type is discouraged, it does explicitly allows anything, so it should always allow additionalProperties
|
|
193
|
-
additionalProperties: true,
|
|
194
|
-
},
|
|
195
|
-
binary: {type: 'string', format: 'binary'},
|
|
196
|
-
boolean: {type: 'boolean'},
|
|
197
|
-
buffer: {type: 'string', format: 'byte'},
|
|
198
|
-
byte: {type: 'string', format: 'byte'},
|
|
199
|
-
date: {type: 'string', format: 'date'},
|
|
200
|
-
datetime: {type: 'string', format: 'date-time'},
|
|
201
|
-
double: {type: 'number', format: 'double'},
|
|
202
|
-
file: {type: 'string', format: 'binary'},
|
|
203
|
-
float: {type: 'number', format: 'float'},
|
|
204
|
-
integer: {type: 'integer', format: 'int32'},
|
|
205
|
-
long: {type: 'integer', format: 'int64'},
|
|
206
|
-
object: {type: 'object'},
|
|
207
|
-
string: {type: 'string'},
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
return PrimitiveSwaggerTypeMap[type];
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
private getSwaggerTypeForArrayType(arrayType: Resolver.ArrayType): Specification.BaseSchema<Schema> {
|
|
214
|
-
return {type: 'array', items: this.getSwaggerType(arrayType.elementType)};
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
public getSwaggerTypeForObjectLiteral(objectLiteral: Resolver.NestedObjectLiteralType): Specification.BaseSchema<Schema> {
|
|
219
|
-
const properties = this.buildProperties(objectLiteral.properties);
|
|
220
|
-
|
|
221
|
-
const additionalProperties = objectLiteral.additionalProperties && this.getSwaggerType(objectLiteral.additionalProperties);
|
|
222
|
-
|
|
223
|
-
const required = objectLiteral.properties.filter((prop: Property) => prop.required).map((prop: Property) => prop.name);
|
|
224
|
-
|
|
225
|
-
// An empty list required: [] is not valid.
|
|
226
|
-
// If all properties are optional, do not specify the required keyword.
|
|
227
|
-
return {
|
|
228
|
-
properties: properties,
|
|
229
|
-
...(additionalProperties && {additionalProperties: additionalProperties}),
|
|
230
|
-
...(required && required.length && {required: required}),
|
|
231
|
-
type: 'object',
|
|
232
|
-
} as Specification.BaseSchema<Schema>;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
protected abstract getSwaggerTypeForReferenceType(referenceType: Resolver.ReferenceType): Schema;
|
|
236
|
-
|
|
237
|
-
protected abstract buildProperties(properties: Property[]): Record<string, Schema>;
|
|
238
|
-
|
|
239
|
-
protected determineTypesUsedInEnum(anEnum: Array<string | number | boolean | null>) {
|
|
240
|
-
return anEnum.reduce((theSet, curr) => {
|
|
241
|
-
const typeUsed = curr === null ? 'number' : typeof curr;
|
|
242
|
-
theSet.add(typeUsed);
|
|
243
|
-
return theSet;
|
|
244
|
-
}, new Set<'string' | 'number' | 'bigint' | 'boolean' | 'symbol' | 'undefined' | 'object' | 'function'>());
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
protected getOperationId(methodName: string) {
|
|
248
|
-
return methodName.charAt(0).toUpperCase() + methodName.substr(1);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021.
|
|
3
|
-
* Author Peter Placzek (tada5hi)
|
|
4
|
-
* For the full copyright and license information,
|
|
5
|
-
* view the LICENSE file that was distributed with this source code.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export * from './v2';
|
|
9
|
-
export * from './v3';
|
|
10
|
-
export * from './type';
|
|
11
|
-
export * from "./utils";
|