@rsdk/cli.cmd.autodoc 6.0.0-next.2 → 6.0.0-next.4
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/commands/openapi.variation.d.ts +2 -1
- package/dist/commands/openapi.variation.js +46 -23
- package/dist/commands/openapi.variation.js.map +1 -1
- package/dist/generators/openapi-json/config.schema.d.ts +72 -0
- package/dist/generators/openapi-json/config.schema.js +152 -0
- package/dist/generators/openapi-json/config.schema.js.map +1 -0
- package/dist/generators/openapi-json/index.d.ts +1 -0
- package/dist/generators/openapi-json/index.js +1 -0
- package/dist/generators/openapi-json/index.js.map +1 -1
- package/dist/generators/openapi-json/openapi-json.generator.d.ts +6 -7
- package/dist/generators/openapi-json/openapi-json.generator.js +19 -1
- package/dist/generators/openapi-json/openapi-json.generator.js.map +1 -1
- package/package.json +5 -3
|
@@ -3,5 +3,6 @@ export declare class OpenApiCommand implements IRunnable {
|
|
|
3
3
|
private readonly logger;
|
|
4
4
|
private readonly loader;
|
|
5
5
|
constructor();
|
|
6
|
-
run(verbose: boolean, ifPresent: boolean, outPath
|
|
6
|
+
run(verbose: boolean, ifPresent: boolean, outPath?: string, appPath?: string, configPath?: string, includeZones?: string[], excludeZones?: string[], title?: string, version?: string, description?: string): Promise<void>;
|
|
7
|
+
private readConfig;
|
|
7
8
|
}
|
|
@@ -18,8 +18,10 @@ const cli_common_1 = require("@rsdk/cli.common");
|
|
|
18
18
|
const common_1 = require("@rsdk/common");
|
|
19
19
|
const common_node_1 = require("@rsdk/common.node");
|
|
20
20
|
const logging_1 = require("@rsdk/logging");
|
|
21
|
+
const value_1 = require("@sinclair/typebox/value");
|
|
21
22
|
const app_loader_1 = require("../base/app.loader");
|
|
22
23
|
const document_file_1 = require("../base/document.file");
|
|
24
|
+
const generators_1 = require("../generators");
|
|
23
25
|
const openapi_json_generator_1 = require("../generators/openapi-json/openapi-json.generator");
|
|
24
26
|
let OpenApiCommand = OpenApiCommand_1 = class OpenApiCommand {
|
|
25
27
|
logger;
|
|
@@ -28,30 +30,55 @@ let OpenApiCommand = OpenApiCommand_1 = class OpenApiCommand {
|
|
|
28
30
|
this.logger = logging_1.LoggerFactory.create(OpenApiCommand_1);
|
|
29
31
|
this.loader = new app_loader_1.AppLoader(this.logger);
|
|
30
32
|
}
|
|
31
|
-
async run(verbose, ifPresent, outPath, appPath, includeZones, excludeZones, title, version, description) {
|
|
33
|
+
async run(verbose, ifPresent, outPath, appPath, configPath, includeZones, excludeZones, title, version, description) {
|
|
32
34
|
if (verbose) {
|
|
33
35
|
this.logger.info(`app path: ${appPath}`);
|
|
34
36
|
this.logger.info(`output file: ${outPath}`);
|
|
35
37
|
this.logger.info(`--if-present: ${ifPresent}`);
|
|
36
38
|
}
|
|
37
|
-
const
|
|
39
|
+
const config = await this.readConfig(configPath);
|
|
40
|
+
// Command line options take precedence over config file
|
|
41
|
+
const effectiveOutPath = outPath ?? config.out ?? 'openapi.json';
|
|
42
|
+
const effectiveAppPath = appPath ?? config.app ?? './dist/app.js';
|
|
43
|
+
if (verbose) {
|
|
44
|
+
this.logger.info(`effective out path: ${effectiveOutPath}`);
|
|
45
|
+
this.logger.info(`effective app path: ${effectiveAppPath}`);
|
|
46
|
+
}
|
|
47
|
+
const app = await this.loader.loadApp(effectiveAppPath, !ifPresent);
|
|
38
48
|
if (!app) {
|
|
39
49
|
return;
|
|
40
50
|
}
|
|
41
|
-
const [absolutePath] = common_node_1.Path.absolutize(
|
|
51
|
+
const [absolutePath] = common_node_1.Path.absolutize(effectiveOutPath);
|
|
42
52
|
const [dirname, filename] = common_node_1.Path.split(absolutePath);
|
|
43
53
|
const options = {
|
|
54
|
+
...config,
|
|
44
55
|
...(includeZones && { includeZones }),
|
|
45
56
|
...(excludeZones && { excludeZones }),
|
|
57
|
+
...(title && { title }),
|
|
46
58
|
...(description && { description }),
|
|
47
59
|
...(version && { version }),
|
|
48
|
-
...(title && { title }),
|
|
49
60
|
};
|
|
61
|
+
if (verbose) {
|
|
62
|
+
this.logger.info('override options', options);
|
|
63
|
+
}
|
|
50
64
|
const generator = new openapi_json_generator_1.OpenapiGenerator(app, options);
|
|
51
65
|
const writer = new document_file_1.DocumentWriter(this.logger, dirname);
|
|
52
66
|
const document = await generator.createFile(filename);
|
|
53
67
|
await writer.write(document);
|
|
54
68
|
}
|
|
69
|
+
async readConfig(configPath) {
|
|
70
|
+
if (!configPath) {
|
|
71
|
+
return {};
|
|
72
|
+
}
|
|
73
|
+
this.logger.info(`reading config file: ${configPath}`);
|
|
74
|
+
const [absolutePath] = common_node_1.Path.absolutize(configPath);
|
|
75
|
+
const config = await (0, common_node_1.readObj)(absolutePath);
|
|
76
|
+
if (!value_1.Value.Check(generators_1.OpenApiConfigSchema, config)) {
|
|
77
|
+
const errors = [...value_1.Value.Errors(generators_1.OpenApiConfigSchema, config)];
|
|
78
|
+
throw new Error(`Invalid config file: ${configPath}\n${JSON.stringify(errors, null, 2)}`);
|
|
79
|
+
}
|
|
80
|
+
return config;
|
|
81
|
+
}
|
|
55
82
|
};
|
|
56
83
|
exports.OpenApiCommand = OpenApiCommand;
|
|
57
84
|
__decorate([
|
|
@@ -62,51 +89,47 @@ __decorate([
|
|
|
62
89
|
})),
|
|
63
90
|
__param(2, (0, cli_common_1.ValueOption)('out', new common_node_1.FsPathParser('file', { check: 'dirname' }), {
|
|
64
91
|
description: 'output file',
|
|
65
|
-
defaultValue: 'openapi.json',
|
|
66
92
|
alias: 'o',
|
|
67
93
|
})),
|
|
68
94
|
__param(3, (0, cli_common_1.ValueOption)('app', new common_node_1.FsPathParser('file'), {
|
|
69
95
|
description: 'path to app.js file',
|
|
70
|
-
defaultValue: './dist/app.js',
|
|
71
96
|
alias: 'a',
|
|
72
97
|
})),
|
|
73
|
-
__param(4, (0, cli_common_1.ValueOption)('
|
|
98
|
+
__param(4, (0, cli_common_1.ValueOption)('conf', new common_node_1.FsPathParser('file'), {
|
|
99
|
+
description: (0, common_1.text) `
|
|
100
|
+
Path to configuration file (YAML or JSON) containing any of the command options.
|
|
101
|
+
Command line options take precedence over config file values.
|
|
102
|
+
`,
|
|
103
|
+
})),
|
|
104
|
+
__param(5, (0, cli_common_1.ValueOption)('include-zones', new common_1.ArrayParser(new common_1.StringParser()), {
|
|
74
105
|
description: (0, common_1.text) `
|
|
75
106
|
API zones to include. Only controllers with these zones will be included in the output.
|
|
76
107
|
Zones are specified as a comma-separated list.
|
|
77
108
|
`,
|
|
78
|
-
defaultValue: undefined,
|
|
79
109
|
})),
|
|
80
|
-
__param(
|
|
110
|
+
__param(6, (0, cli_common_1.ValueOption)('exclude-zones', new common_1.ArrayParser(new common_1.StringParser()), {
|
|
81
111
|
description: (0, common_1.text) `
|
|
82
112
|
API zones to exclude. Only controllers without these zones will be included in the output.
|
|
83
113
|
Zones are specified as a comma-separated list.
|
|
84
114
|
`,
|
|
85
|
-
defaultValue: undefined,
|
|
86
115
|
})),
|
|
87
|
-
__param(
|
|
116
|
+
__param(7, (0, cli_common_1.ValueOption)('title', new common_1.StringParser(), {
|
|
88
117
|
description: (0, common_1.text) `
|
|
89
|
-
The title of OpenAPI document.
|
|
90
|
-
the app metadata which is used by default.
|
|
118
|
+
The title of OpenAPI document. Takes precedence over config file and app metadata.
|
|
91
119
|
`,
|
|
92
|
-
defaultValue: undefined,
|
|
93
120
|
})),
|
|
94
|
-
__param(
|
|
121
|
+
__param(8, (0, cli_common_1.ValueOption)('version', new common_1.StringParser(), {
|
|
95
122
|
description: (0, common_1.text) `
|
|
96
|
-
The version of OpenAPI document.
|
|
97
|
-
the app metadata which is used by default.
|
|
123
|
+
The version of OpenAPI document. Takes precedence over config file and app metadata.
|
|
98
124
|
`,
|
|
99
|
-
defaultValue: undefined,
|
|
100
125
|
})),
|
|
101
|
-
__param(
|
|
126
|
+
__param(9, (0, cli_common_1.ValueOption)('description', new common_1.StringParser(), {
|
|
102
127
|
description: (0, common_1.text) `
|
|
103
|
-
The description of OpenAPI document.
|
|
104
|
-
the app metadata which is used by default.
|
|
128
|
+
The description of OpenAPI document. Takes precedence over config file and app metadata.
|
|
105
129
|
`,
|
|
106
|
-
defaultValue: undefined,
|
|
107
130
|
})),
|
|
108
131
|
__metadata("design:type", Function),
|
|
109
|
-
__metadata("design:paramtypes", [Boolean, Boolean, String, String, Array, Array, String, String, String]),
|
|
132
|
+
__metadata("design:paramtypes", [Boolean, Boolean, String, String, String, Array, Array, String, String, String]),
|
|
110
133
|
__metadata("design:returntype", Promise)
|
|
111
134
|
], OpenApiCommand.prototype, "run", null);
|
|
112
135
|
exports.OpenApiCommand = OpenApiCommand = OpenApiCommand_1 = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi.variation.js","sourceRoot":"","sources":["../../src/commands/openapi.variation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAK0B;AAC1B,yCAA+D;AAC/D,
|
|
1
|
+
{"version":3,"file":"openapi.variation.js","sourceRoot":"","sources":["../../src/commands/openapi.variation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAK0B;AAC1B,yCAA+D;AAC/D,mDAAgE;AAChE,2CAAuD;AACvD,mDAAgD;AAEhD,mDAA+C;AAC/C,yDAAuD;AACvD,8CAAoD;AACpD,8FAG2D;AAUpD,IAAM,cAAc,sBAApB,MAAM,cAAc;IACR,MAAM,CAAU;IAChB,MAAM,CAAY;IAEnC;QACE,IAAI,CAAC,MAAM,GAAG,uBAAa,CAAC,MAAM,CAAC,gBAAc,CAAC,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAEK,AAAN,KAAK,CAAC,GAAG,CAEP,OAAgB,EAMhB,SAAkB,EAMlB,OAAgB,EAMhB,OAAgB,EAQhB,UAAmB,EAQnB,YAAuB,EAQvB,YAAuB,EAOvB,KAAc,EAOd,OAAgB,EAOhB,WAAoB;QAEpB,IAAI,OAAO,EAAE,CA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W,EAAE,IAAA,aAAI,EAAA;;OAEhB;KACF,CAAC,CAAA;IAGD,WAAA,IAAA,wBAAW,EAAC,aAAa,EAAE,IAAI,qBAAY,EAAE,EAAE;QAC9C,WAAW,EAAE,IAAA,aAAI,EAAA;;OAEhB;KACF,CAAC,CAAA;;;;yCA+CH;yBAxHU,cAAc;IAH1B,IAAA,6BAAgB,EAAC,iBAAiB,EAAE;QACnC,WAAW,EAAE,mBAAmB;KACjC,CAAC;;GACW,cAAc,CAgJ1B"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { Static } from '@sinclair/typebox';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration schema for OpenAPI document generation.
|
|
4
|
+
* @example
|
|
5
|
+
* {
|
|
6
|
+
* "out": "openapi.json",
|
|
7
|
+
* "app": "./dist/app.js",
|
|
8
|
+
* "title": "My API",
|
|
9
|
+
* "version": "1.0.0",
|
|
10
|
+
* "description": "API Description",
|
|
11
|
+
* "includeZones": ["public"],
|
|
12
|
+
* "excludeZones": ["internal"],
|
|
13
|
+
* "security": [{
|
|
14
|
+
* "type": "http",
|
|
15
|
+
* "scheme": "bearer",
|
|
16
|
+
* "bearerFormat": "JWT",
|
|
17
|
+
* "name": "JWT Auth"
|
|
18
|
+
* }]
|
|
19
|
+
* }
|
|
20
|
+
*/
|
|
21
|
+
export declare const OpenApiConfigSchema: import("@sinclair/typebox").TObject<{
|
|
22
|
+
/** Output file path for the generated OpenAPI document (includes dirname) */
|
|
23
|
+
out: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
24
|
+
/** Path to the application file (usually `dist/app.js`) */
|
|
25
|
+
app: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
26
|
+
/** API title */
|
|
27
|
+
title: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
28
|
+
/** API version */
|
|
29
|
+
version: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
30
|
+
/** API description */
|
|
31
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
32
|
+
/** List of zones to include in the documentation */
|
|
33
|
+
includeZones: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
34
|
+
/** List of zones to exclude from the documentation */
|
|
35
|
+
excludeZones: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
36
|
+
/** Security schemes configuration */
|
|
37
|
+
security: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
38
|
+
type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"http">, import("@sinclair/typebox").TLiteral<"apiKey">, import("@sinclair/typebox").TLiteral<"oauth2">, import("@sinclair/typebox").TLiteral<"mutualTLS">]>;
|
|
39
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
40
|
+
name: import("@sinclair/typebox").TString;
|
|
41
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
42
|
+
type: import("@sinclair/typebox").TLiteral<"http">;
|
|
43
|
+
scheme: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"basic">, import("@sinclair/typebox").TLiteral<"bearer">]>;
|
|
44
|
+
bearerFormat: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
45
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
46
|
+
type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"http">, import("@sinclair/typebox").TLiteral<"apiKey">, import("@sinclair/typebox").TLiteral<"oauth2">, import("@sinclair/typebox").TLiteral<"mutualTLS">]>;
|
|
47
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
48
|
+
name: import("@sinclair/typebox").TString;
|
|
49
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
50
|
+
type: import("@sinclair/typebox").TLiteral<"apiKey">;
|
|
51
|
+
in: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"query">, import("@sinclair/typebox").TLiteral<"header">, import("@sinclair/typebox").TLiteral<"cookie">]>;
|
|
52
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
53
|
+
type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"http">, import("@sinclair/typebox").TLiteral<"apiKey">, import("@sinclair/typebox").TLiteral<"oauth2">, import("@sinclair/typebox").TLiteral<"mutualTLS">]>;
|
|
54
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
55
|
+
name: import("@sinclair/typebox").TString;
|
|
56
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
57
|
+
type: import("@sinclair/typebox").TLiteral<"oauth2">;
|
|
58
|
+
flows: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
59
|
+
authorizationUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
60
|
+
tokenUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
61
|
+
refreshUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
62
|
+
scopes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>;
|
|
63
|
+
}>>;
|
|
64
|
+
}>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
|
|
65
|
+
type: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"http">, import("@sinclair/typebox").TLiteral<"apiKey">, import("@sinclair/typebox").TLiteral<"oauth2">, import("@sinclair/typebox").TLiteral<"mutualTLS">]>;
|
|
66
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
67
|
+
name: import("@sinclair/typebox").TString;
|
|
68
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
69
|
+
type: import("@sinclair/typebox").TLiteral<"mutualTLS">;
|
|
70
|
+
}>]>]>>>;
|
|
71
|
+
}>;
|
|
72
|
+
export type OpenApiConfigSchema = Static<typeof OpenApiConfigSchema>;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenApiConfigSchema = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
/**
|
|
6
|
+
* Base schema for all security schemes.
|
|
7
|
+
* Contains common fields that are present in all security scheme types.
|
|
8
|
+
*/
|
|
9
|
+
const SecuritySchemeBase = typebox_1.Type.Object({
|
|
10
|
+
type: typebox_1.Type.Union([
|
|
11
|
+
typebox_1.Type.Literal('http'),
|
|
12
|
+
typebox_1.Type.Literal('apiKey'),
|
|
13
|
+
typebox_1.Type.Literal('oauth2'),
|
|
14
|
+
typebox_1.Type.Literal('mutualTLS'),
|
|
15
|
+
]),
|
|
16
|
+
description: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
17
|
+
name: typebox_1.Type.String(),
|
|
18
|
+
}, { additionalProperties: false });
|
|
19
|
+
/**
|
|
20
|
+
* HTTP Authentication scheme (Basic or Bearer).
|
|
21
|
+
* @example
|
|
22
|
+
* {
|
|
23
|
+
* "type": "http",
|
|
24
|
+
* "scheme": "bearer",
|
|
25
|
+
* "bearerFormat": "JWT",
|
|
26
|
+
* "name": "JWT Auth"
|
|
27
|
+
* }
|
|
28
|
+
*/
|
|
29
|
+
const HttpSecurityScheme = typebox_1.Type.Intersect([
|
|
30
|
+
SecuritySchemeBase,
|
|
31
|
+
typebox_1.Type.Object({
|
|
32
|
+
type: typebox_1.Type.Literal('http'),
|
|
33
|
+
scheme: typebox_1.Type.Union([typebox_1.Type.Literal('basic'), typebox_1.Type.Literal('bearer')]),
|
|
34
|
+
bearerFormat: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
35
|
+
}, { additionalProperties: false }),
|
|
36
|
+
]);
|
|
37
|
+
/**
|
|
38
|
+
* API Key Authentication scheme.
|
|
39
|
+
* The API key can be passed in a header, query parameter, or cookie.
|
|
40
|
+
* @example
|
|
41
|
+
* {
|
|
42
|
+
* "type": "apiKey",
|
|
43
|
+
* "name": "api_key",
|
|
44
|
+
* "in": "header",
|
|
45
|
+
* "description": "API Key Authentication"
|
|
46
|
+
* }
|
|
47
|
+
*/
|
|
48
|
+
const ApiKeySecurityScheme = typebox_1.Type.Intersect([
|
|
49
|
+
SecuritySchemeBase,
|
|
50
|
+
typebox_1.Type.Object({
|
|
51
|
+
type: typebox_1.Type.Literal('apiKey'),
|
|
52
|
+
in: typebox_1.Type.Union([
|
|
53
|
+
typebox_1.Type.Literal('query'),
|
|
54
|
+
typebox_1.Type.Literal('header'),
|
|
55
|
+
typebox_1.Type.Literal('cookie'),
|
|
56
|
+
]),
|
|
57
|
+
}, { additionalProperties: false }),
|
|
58
|
+
]);
|
|
59
|
+
/**
|
|
60
|
+
* OAuth2 Authentication scheme.
|
|
61
|
+
* Supports multiple OAuth2 flows (implicit, password, clientCredentials, authorizationCode).
|
|
62
|
+
* @example
|
|
63
|
+
* {
|
|
64
|
+
* "type": "oauth2",
|
|
65
|
+
* "name": "OAuth2",
|
|
66
|
+
* "flows": {
|
|
67
|
+
* "implicit": {
|
|
68
|
+
* "authorizationUrl": "https://example.com/oauth/authorize",
|
|
69
|
+
* "scopes": {
|
|
70
|
+
* "read": "Read access",
|
|
71
|
+
* "write": "Write access"
|
|
72
|
+
* }
|
|
73
|
+
* }
|
|
74
|
+
* }
|
|
75
|
+
* }
|
|
76
|
+
*/
|
|
77
|
+
const OAuth2SecurityScheme = typebox_1.Type.Intersect([
|
|
78
|
+
SecuritySchemeBase,
|
|
79
|
+
typebox_1.Type.Object({
|
|
80
|
+
type: typebox_1.Type.Literal('oauth2'),
|
|
81
|
+
flows: typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Object({
|
|
82
|
+
authorizationUrl: typebox_1.Type.Optional(typebox_1.Type.String({ format: 'uri' })),
|
|
83
|
+
tokenUrl: typebox_1.Type.Optional(typebox_1.Type.String({ format: 'uri' })),
|
|
84
|
+
refreshUrl: typebox_1.Type.Optional(typebox_1.Type.String({ format: 'uri' })),
|
|
85
|
+
scopes: typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.String()),
|
|
86
|
+
}, { additionalProperties: false })),
|
|
87
|
+
}, { additionalProperties: false }),
|
|
88
|
+
]);
|
|
89
|
+
/**
|
|
90
|
+
* Mutual TLS Authentication scheme.
|
|
91
|
+
* Used when clients must present valid certificates to access the API.
|
|
92
|
+
* @example
|
|
93
|
+
* {
|
|
94
|
+
* "type": "mutualTLS",
|
|
95
|
+
* "name": "mtls",
|
|
96
|
+
* "description": "Client certificate required"
|
|
97
|
+
* }
|
|
98
|
+
*/
|
|
99
|
+
const MutualTLSSecurityScheme = typebox_1.Type.Intersect([
|
|
100
|
+
SecuritySchemeBase,
|
|
101
|
+
typebox_1.Type.Object({
|
|
102
|
+
type: typebox_1.Type.Literal('mutualTLS'),
|
|
103
|
+
}, { additionalProperties: false }),
|
|
104
|
+
]);
|
|
105
|
+
/**
|
|
106
|
+
* Union of all supported security schemes.
|
|
107
|
+
* Can be one of: HTTP (Basic/Bearer), API Key, OAuth2, or Mutual TLS.
|
|
108
|
+
*/
|
|
109
|
+
const SecurityScheme = typebox_1.Type.Union([
|
|
110
|
+
HttpSecurityScheme,
|
|
111
|
+
ApiKeySecurityScheme,
|
|
112
|
+
OAuth2SecurityScheme,
|
|
113
|
+
MutualTLSSecurityScheme,
|
|
114
|
+
]);
|
|
115
|
+
/**
|
|
116
|
+
* Configuration schema for OpenAPI document generation.
|
|
117
|
+
* @example
|
|
118
|
+
* {
|
|
119
|
+
* "out": "openapi.json",
|
|
120
|
+
* "app": "./dist/app.js",
|
|
121
|
+
* "title": "My API",
|
|
122
|
+
* "version": "1.0.0",
|
|
123
|
+
* "description": "API Description",
|
|
124
|
+
* "includeZones": ["public"],
|
|
125
|
+
* "excludeZones": ["internal"],
|
|
126
|
+
* "security": [{
|
|
127
|
+
* "type": "http",
|
|
128
|
+
* "scheme": "bearer",
|
|
129
|
+
* "bearerFormat": "JWT",
|
|
130
|
+
* "name": "JWT Auth"
|
|
131
|
+
* }]
|
|
132
|
+
* }
|
|
133
|
+
*/
|
|
134
|
+
exports.OpenApiConfigSchema = typebox_1.Type.Object({
|
|
135
|
+
/** Output file path for the generated OpenAPI document (includes dirname) */
|
|
136
|
+
out: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
137
|
+
/** Path to the application file (usually `dist/app.js`) */
|
|
138
|
+
app: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
139
|
+
/** API title */
|
|
140
|
+
title: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
141
|
+
/** API version */
|
|
142
|
+
version: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
143
|
+
/** API description */
|
|
144
|
+
description: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
145
|
+
/** List of zones to include in the documentation */
|
|
146
|
+
includeZones: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String())),
|
|
147
|
+
/** List of zones to exclude from the documentation */
|
|
148
|
+
excludeZones: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String())),
|
|
149
|
+
/** Security schemes configuration */
|
|
150
|
+
security: typebox_1.Type.Optional(typebox_1.Type.Array(SecurityScheme)),
|
|
151
|
+
}, { additionalProperties: false });
|
|
152
|
+
//# sourceMappingURL=config.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.schema.js","sourceRoot":"","sources":["../../../src/generators/openapi-json/config.schema.ts"],"names":[],"mappings":";;;AACA,+CAAyC;AAEzC;;;GAGG;AACH,MAAM,kBAAkB,GAAG,cAAI,CAAC,MAAM,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;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACU,QAAA,mBAAmB,GAAG,cAAI,CAAC,MAAM,CAC5C;IACE,6EAA6E;IAC7E,GAAG,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;IAEjC,2DAA2D;IAC3D,GAAG,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;IAEjC,gBAAgB;IAChB,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;IAEnC,kBAAkB;IAClB,OAAO,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;IAErC,sBAAsB;IACtB,WAAW,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;IAEzC,oDAAoD;IACpD,YAAY,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,KAAK,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAEtD,sDAAsD;IACtD,YAAY,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,KAAK,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAEtD,qCAAqC;IACrC,QAAQ,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;CACpD,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC"}
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./openapi-json.generator"), exports);
|
|
18
|
+
__exportStar(require("./config.schema"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generators/openapi-json/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generators/openapi-json/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,kDAAgC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { PlatformApp } from '@rsdk/core';
|
|
2
2
|
import { FileGenerator } from '../file-generator.interface';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
3
|
+
import { OpenApiConfigSchema } from './config.schema';
|
|
4
|
+
/**
|
|
5
|
+
* Here we don't need `out` and `app`,
|
|
6
|
+
* but `title`, `version` and `description` are required.
|
|
7
|
+
*/
|
|
8
|
+
export type OpenApiGeneratorOptions = Omit<OpenApiConfigSchema, 'out' | 'app'> & Required<Pick<OpenApiConfigSchema, 'title' | 'version' | 'description'>>;
|
|
10
9
|
export declare class OpenapiGenerator extends FileGenerator {
|
|
11
10
|
private readonly app;
|
|
12
11
|
private readonly options;
|
|
@@ -72,11 +72,29 @@ class OpenapiGenerator extends file_generator_interface_1.FileGenerator {
|
|
|
72
72
|
], OpenApiModule);
|
|
73
73
|
const createOptions = await this.app.context.getNestFactoryCreateOptions();
|
|
74
74
|
const app = await core_1.NestFactory.create(OpenApiModule, ...createOptions);
|
|
75
|
-
const { title, version, description } = options;
|
|
75
|
+
const { title, version, description, security } = options;
|
|
76
76
|
const builder = new swagger_1.DocumentBuilder()
|
|
77
77
|
.setTitle(title)
|
|
78
78
|
.setVersion(version)
|
|
79
79
|
.setDescription(description);
|
|
80
|
+
for (const scheme of security || []) {
|
|
81
|
+
switch (scheme.type) {
|
|
82
|
+
case 'http':
|
|
83
|
+
if (scheme.scheme === 'bearer') {
|
|
84
|
+
builder.addBearerAuth(scheme, scheme.name);
|
|
85
|
+
}
|
|
86
|
+
else if (scheme.scheme === 'basic') {
|
|
87
|
+
builder.addBasicAuth(scheme, scheme.name);
|
|
88
|
+
}
|
|
89
|
+
break;
|
|
90
|
+
case 'oauth2':
|
|
91
|
+
builder.addOAuth2(scheme, scheme.name);
|
|
92
|
+
break;
|
|
93
|
+
case 'apiKey':
|
|
94
|
+
builder.addApiKey(scheme, scheme.name);
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
80
98
|
const openApiConfig = builder.build();
|
|
81
99
|
const document = swagger_1.SwaggerModule.createDocument(app, openApiConfig);
|
|
82
100
|
this.logger.info('Generate openapi finished');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi-json.generator.js","sourceRoot":"","sources":["../../../src/generators/openapi-json/openapi-json.generator.ts"],"names":[],"mappings":";;;;;;;;;AACA,2CAAwC;AACxC,uCAA2C;AAC3C,6CAGyB;AACzB,qCAA0D;AAC1D,2CAA8C;AAC9C,iDAA8E;AAC9E,uCAAmC;AAGnC,0EAA4D;
|
|
1
|
+
{"version":3,"file":"openapi-json.generator.js","sourceRoot":"","sources":["../../../src/generators/openapi-json/openapi-json.generator.ts"],"names":[],"mappings":";;;;;;;;;AACA,2CAAwC;AACxC,uCAA2C;AAC3C,6CAGyB;AACzB,qCAA0D;AAC1D,2CAA8C;AAC9C,iDAA8E;AAC9E,uCAAmC;AAGnC,0EAA4D;AAW5D,MAAa,gBAAiB,SAAQ,wCAAa;IAE9B;IACA;IAFnB,YACmB,GAAgB,EAChB,UAA4C,EAAE;QAE/D,KAAK,CAAC,uBAAa,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAH7B,QAAG,GAAH,GAAG,CAAa;QAChB,YAAO,GAAP,OAAO,CAAuC;IAGjE,CAAC;IAEe,AAAN,KAAK,CAAC,UAAU;QACxB,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;QACvD,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,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AC1B,GAAgB,EAChB,MAAwC;QAExC,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QACpD,MAAM,QAAQ,GAA4B;YACxC,KAAK,EAAE,WAAW,CAAC,IAAI;YACvB,OAAO,EAAE,WAAW,CAAC,OAAO;YAC5B,WAAW,EAAE,WAAW,CAAC,WAAW;SACrC,CAAC;QAEF,OAAO,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC;IACpC,CAAC;CACF;AAzID,4CAyIC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/cli.cmd.autodoc",
|
|
3
|
-
"version": "6.0.0-next.
|
|
3
|
+
"version": "6.0.0-next.4",
|
|
4
4
|
"description": "autodoc your app!",
|
|
5
5
|
"homepage": "https://github.com/R-Vision/rsdk",
|
|
6
6
|
"license": "Apache License 2.0",
|
|
@@ -16,11 +16,13 @@
|
|
|
16
16
|
"url": "https://github.com/R-Vision/rsdk"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@sinclair/typebox": "^0.34.9",
|
|
19
20
|
"commander": "^12.1.0",
|
|
20
21
|
"lodash": "^4.17.21",
|
|
21
22
|
"log-update": "4.0.0",
|
|
22
23
|
"markdown-table": "2.0.0",
|
|
23
|
-
"pino-pretty": "^10.3.1"
|
|
24
|
+
"pino-pretty": "^10.3.1",
|
|
25
|
+
"rxjs": "^7.8.1"
|
|
24
26
|
},
|
|
25
27
|
"peerDependencies": {
|
|
26
28
|
"@nestjs/common": "^10.0.0",
|
|
@@ -38,5 +40,5 @@
|
|
|
38
40
|
"@rsdk/zones": "*",
|
|
39
41
|
"reflect-metadata": "^0.1.12 || ^0.2.0"
|
|
40
42
|
},
|
|
41
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "f0dec6323cbe016b5efd433484d2f2d044d12fa9"
|
|
42
44
|
}
|