@nestia/sdk 4.0.0-dev.20241022 → 4.0.0-dev.20241116
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/README.md +2 -2
- package/lib/NestiaSdkApplication.js +1 -1
- package/lib/NestiaSdkApplication.js.map +1 -1
- package/lib/executable/internal/NestiaConfigLoader.js +149 -149
- package/lib/generates/SwaggerGenerator.js +22 -17
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/SdkAliasCollection.js +7 -7
- package/lib/generates/internal/SdkDistributionComposer.js +7 -7
- package/lib/generates/internal/SwaggerOperationParameterComposer.js +4 -3
- package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -1
- package/package.json +7 -7
- package/src/NestiaSdkApplication.ts +1 -1
- package/src/generates/SwaggerGenerator.ts +15 -6
- package/src/generates/internal/SwaggerOperationParameterComposer.ts +4 -3
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.SwaggerGenerator = void 0;
|
|
39
|
-
const
|
|
39
|
+
const __typia_transform__assertGuard = __importStar(require("typia/lib/internal/_assertGuard.js"));
|
|
40
40
|
const openapi_1 = require("@samchon/openapi");
|
|
41
41
|
const fs_1 = __importDefault(require("fs"));
|
|
42
42
|
const path_1 = __importDefault(require("path"));
|
|
@@ -85,8 +85,8 @@ var SwaggerGenerator;
|
|
|
85
85
|
var _a;
|
|
86
86
|
var _b;
|
|
87
87
|
// GATHER METADATA
|
|
88
|
-
const
|
|
89
|
-
|
|
88
|
+
const routes = props.routes.filter((r) => r.jsDocTags.every((tag) => tag.name !== "internal" && tag.name !== "hidden"));
|
|
89
|
+
const metadatas = routes
|
|
90
90
|
.map((r) => [
|
|
91
91
|
r.success.metadata,
|
|
92
92
|
...r.parameters.map((p) => p.metadata),
|
|
@@ -95,7 +95,10 @@ var SwaggerGenerator;
|
|
|
95
95
|
.flat()
|
|
96
96
|
.filter((m) => m.size() !== 0);
|
|
97
97
|
// COMPOSE JSON SCHEMAS
|
|
98
|
-
const json = JsonSchemasProgrammer_1.JsonSchemasProgrammer.write(
|
|
98
|
+
const json = JsonSchemasProgrammer_1.JsonSchemasProgrammer.write({
|
|
99
|
+
version: "3.1",
|
|
100
|
+
metadatas,
|
|
101
|
+
});
|
|
99
102
|
const dict = new WeakMap();
|
|
100
103
|
json.schemas.forEach((schema, i) => dict.set(metadatas[i], schema));
|
|
101
104
|
const schema = (metadata) => dict.get(metadata);
|
|
@@ -103,7 +106,9 @@ var SwaggerGenerator;
|
|
|
103
106
|
const document = props.document;
|
|
104
107
|
(_a = (_b = document.components).schemas) !== null && _a !== void 0 ? _a : (_b.schemas = {});
|
|
105
108
|
Object.assign(document.components.schemas, json.components.schemas);
|
|
106
|
-
fillPaths(Object.assign(Object.assign({}, props), {
|
|
109
|
+
fillPaths(Object.assign(Object.assign({}, props), { routes,
|
|
110
|
+
schema,
|
|
111
|
+
document }));
|
|
107
112
|
return document;
|
|
108
113
|
};
|
|
109
114
|
SwaggerGenerator.initialize = (config) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -114,60 +119,60 @@ var SwaggerGenerator;
|
|
|
114
119
|
return null;
|
|
115
120
|
try {
|
|
116
121
|
const content = yield fs_1.default.promises.readFile(location, "utf8");
|
|
117
|
-
const data = (() => { const
|
|
122
|
+
const data = (() => { const _io0 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.version || "string" === typeof input.version) && (undefined === input.description || "string" === typeof input.description) && (null !== input.license && (undefined === input.license || "string" === typeof input.license || "object" === typeof input.license && null !== input.license && _io1(input.license))); const _io1 = input => "string" === typeof input.type && ("string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url))); const _ao0 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
118
123
|
method: "typia.json.assertParse",
|
|
119
124
|
path: _path + ".name",
|
|
120
125
|
expected: "(string | undefined)",
|
|
121
126
|
value: input.name
|
|
122
|
-
}, _errorFactory)) && (undefined === input.version || "string" === typeof input.version ||
|
|
127
|
+
}, _errorFactory)) && (undefined === input.version || "string" === typeof input.version || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
123
128
|
method: "typia.json.assertParse",
|
|
124
129
|
path: _path + ".version",
|
|
125
130
|
expected: "(string | undefined)",
|
|
126
131
|
value: input.version
|
|
127
|
-
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description ||
|
|
132
|
+
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
128
133
|
method: "typia.json.assertParse",
|
|
129
134
|
path: _path + ".description",
|
|
130
135
|
expected: "(string | undefined)",
|
|
131
136
|
value: input.description
|
|
132
|
-
}, _errorFactory)) && ((null !== input.license ||
|
|
137
|
+
}, _errorFactory)) && ((null !== input.license || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
133
138
|
method: "typia.json.assertParse",
|
|
134
139
|
path: _path + ".license",
|
|
135
140
|
expected: "(__type.o1 | string | undefined)",
|
|
136
141
|
value: input.license
|
|
137
|
-
}, _errorFactory)) && (undefined === input.license || "string" === typeof input.license || ("object" === typeof input.license && null !== input.license ||
|
|
142
|
+
}, _errorFactory)) && (undefined === input.license || "string" === typeof input.license || ("object" === typeof input.license && null !== input.license || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
138
143
|
method: "typia.json.assertParse",
|
|
139
144
|
path: _path + ".license",
|
|
140
145
|
expected: "(__type.o1 | string | undefined)",
|
|
141
146
|
value: input.license
|
|
142
|
-
}, _errorFactory)) &&
|
|
147
|
+
}, _errorFactory)) && _ao1(input.license, _path + ".license", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
143
148
|
method: "typia.json.assertParse",
|
|
144
149
|
path: _path + ".license",
|
|
145
150
|
expected: "(__type.o1 | string | undefined)",
|
|
146
151
|
value: input.license
|
|
147
|
-
}, _errorFactory))); const
|
|
152
|
+
}, _errorFactory))); const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
148
153
|
method: "typia.json.assertParse",
|
|
149
154
|
path: _path + ".type",
|
|
150
155
|
expected: "string",
|
|
151
156
|
value: input.type
|
|
152
|
-
}, _errorFactory)) && ("string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url) ||
|
|
157
|
+
}, _errorFactory)) && ("string" === typeof input.url && (/\/|:/.test(input.url) && /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(input.url) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
153
158
|
method: "typia.json.assertParse",
|
|
154
159
|
path: _path + ".url",
|
|
155
160
|
expected: "string & Format<\"uri\">",
|
|
156
161
|
value: input.url
|
|
157
|
-
}, _errorFactory)) ||
|
|
162
|
+
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
158
163
|
method: "typia.json.assertParse",
|
|
159
164
|
path: _path + ".url",
|
|
160
165
|
expected: "(string & Format<\"uri\">)",
|
|
161
166
|
value: input.url
|
|
162
|
-
}, _errorFactory)); const __is = input => "object" === typeof input && null !== input && false === Array.isArray(input) &&
|
|
167
|
+
}, _errorFactory)); const __is = input => "object" === typeof input && null !== input && false === Array.isArray(input) && _io0(input); let _errorFactory; const __assert = (input, errorFactory) => {
|
|
163
168
|
if (false === __is(input)) {
|
|
164
169
|
_errorFactory = errorFactory;
|
|
165
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input && false === Array.isArray(input) ||
|
|
170
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input && false === Array.isArray(input) || __typia_transform__assertGuard._assertGuard(true, {
|
|
166
171
|
method: "typia.json.assertParse",
|
|
167
172
|
path: _path + "",
|
|
168
173
|
expected: "__type",
|
|
169
174
|
value: input
|
|
170
|
-
}, _errorFactory)) &&
|
|
175
|
+
}, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
171
176
|
method: "typia.json.assertParse",
|
|
172
177
|
path: _path + "",
|
|
173
178
|
expected: "__type",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwaggerGenerator.js","sourceRoot":"","sources":["../../src/generates/SwaggerGenerator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,8CAAiE;AACjE,4CAAoB;AACpB,gDAAwB;AACxB,+BAAiC;AACjC,kDAAqD;AACrD,4FAAyF;AAOzF,0DAAuD;AACvD,kFAA+E;AAE/E,IAAiB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"SwaggerGenerator.js","sourceRoot":"","sources":["../../src/generates/SwaggerGenerator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,8CAAiE;AACjE,4CAAoB;AACpB,gDAAwB;AACxB,+BAAiC;AACjC,kDAAqD;AACrD,4FAAyF;AAOzF,0DAAuD;AACvD,kFAA+E;AAE/E,IAAiB,gBAAgB,CAyQhC;AAzQD,WAAiB,gBAAgB;IAClB,yBAAQ,GAAG,CAAO,GAAsB,EAAiB,EAAE;QACtE,oBAAoB;QACpB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;QAC3C,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,KAAK,SAAS;YAC1C,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,MAAM,MAAM,GAAiC,GAAG,CAAC,O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AC,CAAC;QAC3D,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;AACJ,CAAC,EAzQgB,gBAAgB,gCAAhB,gBAAgB,QAyQhC"}
|
|
@@ -53,23 +53,23 @@ var SdkAliasCollection;
|
|
|
53
53
|
return typescript_1.default.factory.createTypeReferenceNode(importer.external({
|
|
54
54
|
type: true,
|
|
55
55
|
library: "typia",
|
|
56
|
-
instance: (() => { const $io0 = input => ("application/json" === input.contentType || "application/x-www-form-urlencoded" === input.contentType || "multipart/form-data" === input.contentType || "text/plain" === input.contentType) && "boolean" === typeof input.encrypted && "body" === input.category && "string" === typeof input.name && "number" === typeof input.index && ("object" === typeof input.type && null !== input.type && $io1(input.type)) && ("object" === typeof input.metadata && null !== input.metadata && $io2(input.metadata)) && ("object" === typeof input.components && null !== input.components && $io26(input.components)) && "function" === typeof input.validate && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && $io32(input.examples)) && (null === input.description || "string" === typeof input.description) && (Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && $io5(elem))); const $io1 = input => "string" === typeof input.name && (undefined === input.typeArguments || Array.isArray(input.typeArguments) && input.typeArguments.every(elem => "object" === typeof elem && null !== elem && $io1(elem))); const $io2 = input => "boolean" === typeof input.any && "boolean" === typeof input.required && "boolean" === typeof input.optional && "boolean" === typeof input.nullable && (Array.isArray(input.functions) && input.functions.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (Array.isArray(input.atomics) && input.atomics.every(elem => "object" === typeof elem && null !== elem && $io7(elem))) && (Array.isArray(input.constants) && input.constants.every(elem => "object" === typeof elem && null !== elem && $iu0(elem))) && (Array.isArray(input.templates) && input.templates.every(elem => "object" === typeof elem && null !== elem && $io17(elem))) && (null === input.escaped || "object" === typeof input.escaped && null !== input.escaped && $io18(input.escaped)) && (null === input.rest || "object" === typeof input.rest && null !== input.rest && $io2(input.rest)) && (Array.isArray(input.arrays) && input.arrays.every(elem => "object" === typeof elem && null !== elem && $io19(elem))) && (Array.isArray(input.tuples) && input.tuples.every(elem => "object" === typeof elem && null !== elem && $io20(elem))) && (Array.isArray(input.objects) && input.objects.every(elem => "object" === typeof elem && null !== elem && $io21(elem))) && (Array.isArray(input.aliases) && input.aliases.every(elem => "object" === typeof elem && null !== elem && $io22(elem))) && (Array.isArray(input.natives) && input.natives.every(elem => "object" === typeof elem && null !== elem && $io23(elem))) && (Array.isArray(input.sets) && input.sets.every(elem => "object" === typeof elem && null !== elem && $io24(elem))) && (Array.isArray(input.maps) && input.maps.every(elem => "object" === typeof elem && null !== elem && $io25(elem))); const $io3 = input => Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && $io4(elem)) && ("object" === typeof input.output && null !== input.output && $io2(input.output)) && "boolean" === typeof input.async; const $io4 = input => "string" === typeof input.name && ("object" === typeof input.type && null !== input.type && $io2(input.type)) && (null === input.description || "string" === typeof input.description) && (Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && $io5(elem))); const $io5 = input => "string" === typeof input.name && (undefined === input.text || Array.isArray(input.text) && input.text.every(elem => "object" === typeof elem && null !== elem && $io6(elem))); const $io6 = input => "string" === typeof input.text && "string" === typeof input.kind; const $io7 = input => ("string" === input.type || "number" === input.type || "bigint" === input.type || "boolean" === input.type) && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && $io8(elem)))); const $io8 = input => ("string" === input.target || "number" === input.target || "bigint" === input.target || "boolean" === input.target || "object" === input.target || "array" === input.target) && "string" === typeof input.name && "string" === typeof input.kind && (null !== input.exclusive && undefined !== input.exclusive && ("boolean" === typeof input.exclusive || Array.isArray(input.exclusive) && input.exclusive.every(elem => "string" === typeof elem))) && true && (undefined === input.validate || "string" === typeof input.validate) && (undefined === input.schema || "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && $io9(input.schema)); const $io9 = input => true; const $io10 = input => "boolean" === input.type && (Array.isArray(input.values) && input.values.every(elem => "object" === typeof elem && null !== elem && $io11(elem))); const $io11 = input => "boolean" === typeof input.value && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && $io8(elem)))) && (null === input.description || undefined === input.description || "string" === typeof input.description) && (undefined === input.jsDocTags || Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && $io5(elem))); const $io12 = input => "number" === input.type && (Array.isArray(input.values) && input.values.every(elem => "object" === typeof elem && null !== elem && $io13(elem))); const $io13 = input => "number" === typeof input.value && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && $io8(elem)))) && (null === input.description || undefined === input.description || "string" === typeof input.description) && (undefined === input.jsDocTags || Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && $io5(elem))); const $io14 = input => "string" === input.type && (Array.isArray(input.values) && input.values.every(elem => "object" === typeof elem && null !== elem && $io15(elem))); const $io15 = input => "string" === typeof input.value && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && $io8(elem)))) && (null === input.description || undefined === input.description || "string" === typeof input.description) && (undefined === input.jsDocTags || Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && $io5(elem))); const $io16 = input => "bigint" === input.type && (Array.isArray(input.values) && input.values.every(elem => "object" === typeof elem && null !== elem && $io15(elem))); const $io17 = input => Array.isArray(input.row) && input.row.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && $io8(elem)))); const $io18 = input => "object" === typeof input.original && null !== input.original && $io2(input.original) && ("object" === typeof input.returns && null !== input.returns && $io2(input.returns)); const $io19 = input => "string" === typeof input.name && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && $io8(elem)))); const $io20 = input => "string" === typeof input.name && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && $io8(elem)))); const $io21 = input => "string" === typeof input.name && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && $io8(elem)))); const $io22 = input => "string" === typeof input.name && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && $io8(elem)))); const $io23 = input => "string" === typeof input.name && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && $io8(elem)))); const $io24 = input => "object" === typeof input.value && null !== input.value && $io2(input.value) && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && $io8(elem)))); const $io25 = input => "object" === typeof input.key && null !== input.key && $io2(input.key) && ("object" === typeof input.value && null !== input.value && $io2(input.value)) && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && $io8(elem)))); const $io26 = input => Array.isArray(input.objects) && input.objects.every(elem => "object" === typeof elem && null !== elem && $io27(elem)) && (Array.isArray(input.aliases) && input.aliases.every(elem => "object" === typeof elem && null !== elem && $io29(elem))) && (Array.isArray(input.arrays) && input.arrays.every(elem => "object" === typeof elem && null !== elem && $io30(elem))) && (Array.isArray(input.tuples) && input.tuples.every(elem => "object" === typeof elem && null !== elem && $io31(elem))); const $io27 = input => "string" === typeof input.name && (Array.isArray(input.properties) && input.properties.every(elem => "object" === typeof elem && null !== elem && $io28(elem))) && (undefined === input.description || "string" === typeof input.description) && (Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && $io5(elem))) && "number" === typeof input.index && "boolean" === typeof input.recursive && (Array.isArray(input.nullables) && input.nullables.every(elem => "boolean" === typeof elem)); const $io28 = input => "object" === typeof input.key && null !== input.key && $io2(input.key) && ("object" === typeof input.value && null !== input.value && $io2(input.value)) && (null === input.description || "string" === typeof input.description) && (Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && $io5(elem))); const $io29 = input => "string" === typeof input.name && ("object" === typeof input.value && null !== input.value && $io2(input.value)) && (Array.isArray(input.nullables) && input.nullables.every(elem => "boolean" === typeof elem)) && (null === input.description || "string" === typeof input.description) && (Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && $io5(elem))) && "boolean" === typeof input.recursive; const $io30 = input => "string" === typeof input.name && ("object" === typeof input.value && null !== input.value && $io2(input.value)) && (Array.isArray(input.nullables) && input.nullables.every(elem => "boolean" === typeof elem)) && "boolean" === typeof input.recursive && (null === input.index || "number" === typeof input.index); const $io31 = input => "string" === typeof input.name && (Array.isArray(input.elements) && input.elements.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && (null === input.index || "number" === typeof input.index) && "boolean" === typeof input.recursive && (Array.isArray(input.nullables) && input.nullables.every(elem => "boolean" === typeof elem)); const $io32 = input => Object.keys(input).every(key => {
|
|
56
|
+
instance: (() => { const _io0 = input => ("application/json" === input.contentType || "application/x-www-form-urlencoded" === input.contentType || "multipart/form-data" === input.contentType || "text/plain" === input.contentType) && "boolean" === typeof input.encrypted && "body" === input.category && "string" === typeof input.name && "number" === typeof input.index && ("object" === typeof input.type && null !== input.type && _io1(input.type)) && ("object" === typeof input.metadata && null !== input.metadata && _io2(input.metadata)) && ("object" === typeof input.components && null !== input.components && _io26(input.components)) && "function" === typeof input.validate && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io32(input.examples)) && (null === input.description || "string" === typeof input.description) && (Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && _io5(elem))); const _io1 = input => "string" === typeof input.name && (undefined === input.typeArguments || Array.isArray(input.typeArguments) && input.typeArguments.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => "boolean" === typeof input.any && "boolean" === typeof input.required && "boolean" === typeof input.optional && "boolean" === typeof input.nullable && (Array.isArray(input.functions) && input.functions.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (Array.isArray(input.atomics) && input.atomics.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.constants) && input.constants.every(elem => "object" === typeof elem && null !== elem && _iu0(elem))) && (Array.isArray(input.templates) && input.templates.every(elem => "object" === typeof elem && null !== elem && _io17(elem))) && (null === input.escaped || "object" === typeof input.escaped && null !== input.escaped && _io18(input.escaped)) && (null === input.rest || "object" === typeof input.rest && null !== input.rest && _io2(input.rest)) && (Array.isArray(input.arrays) && input.arrays.every(elem => "object" === typeof elem && null !== elem && _io19(elem))) && (Array.isArray(input.tuples) && input.tuples.every(elem => "object" === typeof elem && null !== elem && _io20(elem))) && (Array.isArray(input.objects) && input.objects.every(elem => "object" === typeof elem && null !== elem && _io21(elem))) && (Array.isArray(input.aliases) && input.aliases.every(elem => "object" === typeof elem && null !== elem && _io22(elem))) && (Array.isArray(input.natives) && input.natives.every(elem => "object" === typeof elem && null !== elem && _io23(elem))) && (Array.isArray(input.sets) && input.sets.every(elem => "object" === typeof elem && null !== elem && _io24(elem))) && (Array.isArray(input.maps) && input.maps.every(elem => "object" === typeof elem && null !== elem && _io25(elem))); const _io3 = input => Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io4(elem)) && ("object" === typeof input.output && null !== input.output && _io2(input.output)) && "boolean" === typeof input.async; const _io4 = input => "string" === typeof input.name && ("object" === typeof input.type && null !== input.type && _io2(input.type)) && (null === input.description || "string" === typeof input.description) && (Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && _io5(elem))); const _io5 = input => "string" === typeof input.name && (undefined === input.text || Array.isArray(input.text) && input.text.every(elem => "object" === typeof elem && null !== elem && _io6(elem))); const _io6 = input => "string" === typeof input.text && "string" === typeof input.kind; const _io7 = input => ("string" === input.type || "number" === input.type || "bigint" === input.type || "boolean" === input.type) && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && _io8(elem)))); const _io8 = input => ("string" === input.target || "number" === input.target || "bigint" === input.target || "boolean" === input.target || "object" === input.target || "array" === input.target) && "string" === typeof input.name && "string" === typeof input.kind && (null !== input.exclusive && undefined !== input.exclusive && ("boolean" === typeof input.exclusive || Array.isArray(input.exclusive) && input.exclusive.every(elem => "string" === typeof elem))) && true && (undefined === input.validate || "string" === typeof input.validate) && (undefined === input.schema || "object" === typeof input.schema && null !== input.schema && false === Array.isArray(input.schema) && _io9(input.schema)); const _io9 = input => true; const _io10 = input => "boolean" === input.type && (Array.isArray(input.values) && input.values.every(elem => "object" === typeof elem && null !== elem && _io11(elem))); const _io11 = input => "boolean" === typeof input.value && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && _io8(elem)))) && (null === input.description || undefined === input.description || "string" === typeof input.description) && (undefined === input.jsDocTags || Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && _io5(elem))); const _io12 = input => "number" === input.type && (Array.isArray(input.values) && input.values.every(elem => "object" === typeof elem && null !== elem && _io13(elem))); const _io13 = input => "number" === typeof input.value && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && _io8(elem)))) && (null === input.description || undefined === input.description || "string" === typeof input.description) && (undefined === input.jsDocTags || Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && _io5(elem))); const _io14 = input => "string" === input.type && (Array.isArray(input.values) && input.values.every(elem => "object" === typeof elem && null !== elem && _io15(elem))); const _io15 = input => "string" === typeof input.value && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && _io8(elem)))) && (null === input.description || undefined === input.description || "string" === typeof input.description) && (undefined === input.jsDocTags || Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && _io5(elem))); const _io16 = input => "bigint" === input.type && (Array.isArray(input.values) && input.values.every(elem => "object" === typeof elem && null !== elem && _io15(elem))); const _io17 = input => Array.isArray(input.row) && input.row.every(elem => "object" === typeof elem && null !== elem && _io2(elem)) && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && _io8(elem)))); const _io18 = input => "object" === typeof input.original && null !== input.original && _io2(input.original) && ("object" === typeof input.returns && null !== input.returns && _io2(input.returns)); const _io19 = input => "string" === typeof input.name && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && _io8(elem)))); const _io20 = input => "string" === typeof input.name && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && _io8(elem)))); const _io21 = input => "string" === typeof input.name && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && _io8(elem)))); const _io22 = input => "string" === typeof input.name && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && _io8(elem)))); const _io23 = input => "string" === typeof input.name && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && _io8(elem)))); const _io24 = input => "object" === typeof input.value && null !== input.value && _io2(input.value) && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && _io8(elem)))); const _io25 = input => "object" === typeof input.key && null !== input.key && _io2(input.key) && ("object" === typeof input.value && null !== input.value && _io2(input.value)) && (Array.isArray(input.tags) && input.tags.every(elem => Array.isArray(elem) && elem.every(elem => "object" === typeof elem && null !== elem && _io8(elem)))); const _io26 = input => Array.isArray(input.objects) && input.objects.every(elem => "object" === typeof elem && null !== elem && _io27(elem)) && (Array.isArray(input.aliases) && input.aliases.every(elem => "object" === typeof elem && null !== elem && _io29(elem))) && (Array.isArray(input.arrays) && input.arrays.every(elem => "object" === typeof elem && null !== elem && _io30(elem))) && (Array.isArray(input.tuples) && input.tuples.every(elem => "object" === typeof elem && null !== elem && _io31(elem))); const _io27 = input => "string" === typeof input.name && (Array.isArray(input.properties) && input.properties.every(elem => "object" === typeof elem && null !== elem && _io28(elem))) && (undefined === input.description || "string" === typeof input.description) && (Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && "number" === typeof input.index && "boolean" === typeof input.recursive && (Array.isArray(input.nullables) && input.nullables.every(elem => "boolean" === typeof elem)); const _io28 = input => "object" === typeof input.key && null !== input.key && _io2(input.key) && ("object" === typeof input.value && null !== input.value && _io2(input.value)) && (null === input.description || "string" === typeof input.description) && (Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && _io5(elem))); const _io29 = input => "string" === typeof input.name && ("object" === typeof input.value && null !== input.value && _io2(input.value)) && (Array.isArray(input.nullables) && input.nullables.every(elem => "boolean" === typeof elem)) && (null === input.description || "string" === typeof input.description) && (Array.isArray(input.jsDocTags) && input.jsDocTags.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && "boolean" === typeof input.recursive; const _io30 = input => "string" === typeof input.name && ("object" === typeof input.value && null !== input.value && _io2(input.value)) && (Array.isArray(input.nullables) && input.nullables.every(elem => "boolean" === typeof elem)) && "boolean" === typeof input.recursive && (null === input.index || "number" === typeof input.index); const _io31 = input => "string" === typeof input.name && (Array.isArray(input.elements) && input.elements.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.index || "number" === typeof input.index) && "boolean" === typeof input.recursive && (Array.isArray(input.nullables) && input.nullables.every(elem => "boolean" === typeof elem)); const _io32 = input => Object.keys(input).every(key => {
|
|
57
57
|
const value = input[key];
|
|
58
58
|
if (undefined === value)
|
|
59
59
|
return true;
|
|
60
60
|
return true;
|
|
61
|
-
}); const
|
|
61
|
+
}); const _iu0 = input => (() => {
|
|
62
62
|
if ("bigint" === input.type)
|
|
63
|
-
return
|
|
63
|
+
return _io16(input);
|
|
64
64
|
else if ("string" === input.type)
|
|
65
|
-
return
|
|
65
|
+
return _io14(input);
|
|
66
66
|
else if ("number" === input.type)
|
|
67
|
-
return
|
|
67
|
+
return _io12(input);
|
|
68
68
|
else if ("boolean" === input.type)
|
|
69
|
-
return
|
|
69
|
+
return _io10(input);
|
|
70
70
|
else
|
|
71
71
|
return false;
|
|
72
|
-
})(); return input => "object" === typeof input && null !== input &&
|
|
72
|
+
})(); return input => "object" === typeof input && null !== input && _io0(input); })()(param) &&
|
|
73
73
|
(param.contentType === "application/json" ||
|
|
74
74
|
param.encrypted === true)
|
|
75
75
|
? "Primitive"
|
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.SdkDistributionComposer = void 0;
|
|
39
|
-
const
|
|
39
|
+
const __typia_transform__assertGuard = __importStar(require("typia/lib/internal/_assertGuard.js"));
|
|
40
40
|
const child_process_1 = __importDefault(require("child_process"));
|
|
41
41
|
const fs_1 = __importDefault(require("fs"));
|
|
42
42
|
const path_1 = __importDefault(require("path"));
|
|
@@ -98,30 +98,30 @@ var SdkDistributionComposer;
|
|
|
98
98
|
const dependencies = () => __awaiter(this, void 0, void 0, function* () {
|
|
99
99
|
const content = yield fs_1.default.promises.readFile(__dirname + "/../../../package.json", "utf8");
|
|
100
100
|
const json = JSON.parse(content);
|
|
101
|
-
return (() => { const
|
|
101
|
+
return (() => { const _io0 = input => "string" === typeof input.version && "string" === typeof input.typia && "string" === typeof input.tgrid; const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.version || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
102
102
|
method: "typia.assert",
|
|
103
103
|
path: _path + ".version",
|
|
104
104
|
expected: "string",
|
|
105
105
|
value: input.version
|
|
106
|
-
}, _errorFactory)) && ("string" === typeof input.typia ||
|
|
106
|
+
}, _errorFactory)) && ("string" === typeof input.typia || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
107
107
|
method: "typia.assert",
|
|
108
108
|
path: _path + ".typia",
|
|
109
109
|
expected: "string",
|
|
110
110
|
value: input.typia
|
|
111
|
-
}, _errorFactory)) && ("string" === typeof input.tgrid ||
|
|
111
|
+
}, _errorFactory)) && ("string" === typeof input.tgrid || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
112
112
|
method: "typia.assert",
|
|
113
113
|
path: _path + ".tgrid",
|
|
114
114
|
expected: "string",
|
|
115
115
|
value: input.tgrid
|
|
116
|
-
}, _errorFactory)); const __is = input => "object" === typeof input && null !== input &&
|
|
116
|
+
}, _errorFactory)); const __is = input => "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => {
|
|
117
117
|
if (false === __is(input)) {
|
|
118
118
|
_errorFactory = errorFactory;
|
|
119
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input ||
|
|
119
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
|
|
120
120
|
method: "typia.assert",
|
|
121
121
|
path: _path + "",
|
|
122
122
|
expected: "IDependencies",
|
|
123
123
|
value: input
|
|
124
|
-
}, _errorFactory)) &&
|
|
124
|
+
}, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
|
|
125
125
|
method: "typia.assert",
|
|
126
126
|
path: _path + "",
|
|
127
127
|
expected: "IDependencies",
|
|
@@ -64,9 +64,10 @@ var SwaggerOperationParameterComposer;
|
|
|
64
64
|
.map((p) => {
|
|
65
65
|
var _a, _b, _c, _d;
|
|
66
66
|
var _e, _f;
|
|
67
|
-
const json = JsonSchemasProgrammer_1.JsonSchemasProgrammer.write(
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
const json = JsonSchemasProgrammer_1.JsonSchemasProgrammer.write({
|
|
68
|
+
version: "3.1",
|
|
69
|
+
metadatas: [p.value],
|
|
70
|
+
});
|
|
70
71
|
if (Object.keys((_a = json.components.schemas) !== null && _a !== void 0 ? _a : {}).length !== 0) {
|
|
71
72
|
(_b = (_e = props.document).components) !== null && _b !== void 0 ? _b : (_e.components = {});
|
|
72
73
|
(_c = (_f = props.document.components).schemas) !== null && _c !== void 0 ? _c : (_f.schemas = {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwaggerOperationParameterComposer.js","sourceRoot":"","sources":["../../../src/generates/internal/SwaggerOperationParameterComposer.ts"],"names":[],"mappings":";;;AACA,+BAAyC;AAEzC,4FAAyF;AAIzF,6EAA0E;AAE1E,IAAiB,iCAAiC,
|
|
1
|
+
{"version":3,"file":"SwaggerOperationParameterComposer.js","sourceRoot":"","sources":["../../../src/generates/internal/SwaggerOperationParameterComposer.ts"],"names":[],"mappings":";;;AACA,+BAAyC;AAEzC,4FAAyF;AAIzF,6EAA0E;AAE1E,IAAiB,iCAAiC,CAsJjD;AAtJD,WAAiB,iCAAiC;IASnC,yCAAO,GAAG,CACrB,KAAuC,EACN,EAAE,CACnC,KAAK,CAAC,SAAS,CAAC,QAAQ,KAAK,MAAM;QACjC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,KAAK,OAAO;YACpC,CAAC,CAAC,CAAC,kCAAA,IAAI,iCAAM,KAAK,KAAE,SAAS,EAAE,KAAK,CAAC,SAAS,IAAG,CAAC;YAClD,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,KAAK,OAAO;gBACpC,CAAC,CAAC,kCAAA,KAAK,iCAAM,KAAK,KA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KAAK,CAAC,UAAU,EAAE,IAC3B,uDAA0B,CAAC,OAAO,CAAC;gBACpC,WAAW,EAAE,MAAA,CAAC,CAAC,WAAW,mCAAI,IAAI;gBAClC,SAAS,EAAE,CAAC,CAAC,SAAS;gBACtB,IAAI,EAAE,OAAO;aACd,CAAC,EACF;QACJ,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;AACJ,CAAC,EAtJgB,iCAAiC,iDAAjC,iCAAiC,QAsJjD;AAED,MAAM,OAAO,GAAG,IAAI,wBAAiB,CAAC,CAAC,SAAkB,EAAU,EAAE;IACnE,MAAM,OAAO,GAAG,iCAAiC,CAAC;IAClD,MAAM,SAAS,GACb,wEAAwE,CAAC;IAC3E,MAAM,OAAO,GAAa;QACxB,YAAY;QACZ,EAAE;QACF,OAAO;QACP,EAAE;QACF,yHAAyH,SAAS,aAAa;QAC/I,EAAE;QACF,mMAAmM;KACpM,CAAC;IACF,IAAI,SAAS,KAAK,IAAI;QAAE,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACrE,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestia/sdk",
|
|
3
|
-
"version": "4.0.0-dev.
|
|
3
|
+
"version": "4.0.0-dev.20241116",
|
|
4
4
|
"description": "Nestia SDK and Swagger generator",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://nestia.io",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@nestia/core": "^4.0.0-dev.
|
|
36
|
-
"@nestia/fetcher": "^4.0.0-dev.
|
|
35
|
+
"@nestia/core": "^4.0.0-dev.20241116",
|
|
36
|
+
"@nestia/fetcher": "^4.0.0-dev.20241116",
|
|
37
37
|
"@samchon/openapi": "^1.1.0",
|
|
38
38
|
"cli": "^1.0.1",
|
|
39
39
|
"get-function-location": "^2.0.0",
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
"tsconfck": "^2.1.2",
|
|
45
45
|
"tsconfig-paths": "^4.1.1",
|
|
46
46
|
"tstl": "^3.0.0",
|
|
47
|
-
"typia": "^7.0.0-dev.
|
|
47
|
+
"typia": "^7.0.0-dev.20241115"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@nestia/core": ">=4.0.0-dev.
|
|
51
|
-
"@nestia/fetcher": ">=4.0.0-dev.
|
|
50
|
+
"@nestia/core": ">=4.0.0-dev.20241116",
|
|
51
|
+
"@nestia/fetcher": ">=4.0.0-dev.20241116",
|
|
52
52
|
"@nestjs/common": ">=7.0.1",
|
|
53
53
|
"@nestjs/core": ">=7.0.1",
|
|
54
54
|
"reflect-metadata": ">=0.1.12",
|
|
55
55
|
"ts-node": ">=10.6.0",
|
|
56
|
-
"typia": ">=7.0.0-dev.
|
|
56
|
+
"typia": ">=7.0.0-dev.20241115 <8.0.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
@@ -71,8 +71,12 @@ export namespace SwaggerGenerator {
|
|
|
71
71
|
document: OpenApi.IDocument;
|
|
72
72
|
}): OpenApi.IDocument => {
|
|
73
73
|
// GATHER METADATA
|
|
74
|
-
const
|
|
75
|
-
.
|
|
74
|
+
const routes: ITypedHttpRoute[] = props.routes.filter((r) =>
|
|
75
|
+
r.jsDocTags.every(
|
|
76
|
+
(tag) => tag.name !== "internal" && tag.name !== "hidden",
|
|
77
|
+
),
|
|
78
|
+
);
|
|
79
|
+
const metadatas: Metadata[] = routes
|
|
76
80
|
.map((r) => [
|
|
77
81
|
r.success.metadata,
|
|
78
82
|
...r.parameters.map((p) => p.metadata),
|
|
@@ -82,9 +86,10 @@ export namespace SwaggerGenerator {
|
|
|
82
86
|
.filter((m) => m.size() !== 0);
|
|
83
87
|
|
|
84
88
|
// COMPOSE JSON SCHEMAS
|
|
85
|
-
const json: IJsonSchemaCollection = JsonSchemasProgrammer.write(
|
|
89
|
+
const json: IJsonSchemaCollection = JsonSchemasProgrammer.write({
|
|
90
|
+
version: "3.1",
|
|
86
91
|
metadatas,
|
|
87
|
-
)
|
|
92
|
+
});
|
|
88
93
|
const dict: WeakMap<Metadata, OpenApi.IJsonSchema> = new WeakMap();
|
|
89
94
|
json.schemas.forEach((schema, i) => dict.set(metadatas[i], schema));
|
|
90
95
|
const schema = (metadata: Metadata): OpenApi.IJsonSchema | undefined =>
|
|
@@ -94,8 +99,12 @@ export namespace SwaggerGenerator {
|
|
|
94
99
|
const document: OpenApi.IDocument = props.document;
|
|
95
100
|
document.components.schemas ??= {};
|
|
96
101
|
Object.assign(document.components.schemas, json.components.schemas);
|
|
97
|
-
fillPaths({
|
|
98
|
-
|
|
102
|
+
fillPaths({
|
|
103
|
+
...props,
|
|
104
|
+
routes,
|
|
105
|
+
schema,
|
|
106
|
+
document,
|
|
107
|
+
});
|
|
99
108
|
return document;
|
|
100
109
|
};
|
|
101
110
|
|
|
@@ -132,9 +132,10 @@ export namespace SwaggerOperationParameterComposer {
|
|
|
132
132
|
),
|
|
133
133
|
)
|
|
134
134
|
.map((p) => {
|
|
135
|
-
const json: IJsonSchemaCollection = JsonSchemasProgrammer.write(
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
const json: IJsonSchemaCollection = JsonSchemasProgrammer.write({
|
|
136
|
+
version: "3.1",
|
|
137
|
+
metadatas: [p.value],
|
|
138
|
+
}) as IJsonSchemaCollection;
|
|
138
139
|
if (Object.keys(json.components.schemas ?? {}).length !== 0) {
|
|
139
140
|
props.document.components ??= {};
|
|
140
141
|
props.document.components.schemas ??= {};
|