@gaias/basenode 1.0.11 ā 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libs/koa/KoaLoader.js +360 -53
- package/dist/libs/koa/KoaLoader.js.map +1 -1
- package/dist/libs/logger/Logger.js +12 -0
- package/dist/libs/logger/Logger.js.map +1 -1
- package/dist/libs/rabbitmq/DistributedEventsLoader.js +1 -1
- package/dist/libs/rabbitmq/DistributedEventsLoader.js.map +1 -1
- package/dist/libs/redis/RedisLoader.js +1 -1
- package/dist/libs/redis/RedisLoader.js.map +1 -1
- package/open.json +104 -0
- package/package.json +2 -3
|
@@ -68,71 +68,378 @@ const koaLoader = (option) => (options) => {
|
|
|
68
68
|
});
|
|
69
69
|
}));
|
|
70
70
|
const setupOpenAPI = () => {
|
|
71
|
+
var _a;
|
|
71
72
|
const storage = (0, routing_controllers_1.getMetadataArgsStorage)();
|
|
72
|
-
|
|
73
|
+
console.log('\nš Checking controller parameters...');
|
|
74
|
+
const filteredControllers = (option.restfulControllers || []).filter((c) => c);
|
|
75
|
+
const usedClasses = new Set();
|
|
76
|
+
storage.actions.forEach((action) => {
|
|
77
|
+
const controllerName = action.target.name;
|
|
78
|
+
const methodName = action.method;
|
|
79
|
+
const isOurController = filteredControllers.some((ctrl) => ctrl.name === controllerName) || controllerName === 'HealthCheckController';
|
|
80
|
+
if (isOurController) {
|
|
81
|
+
const params = storage.params.filter((p) => p.object === action.target && p.method === methodName);
|
|
82
|
+
params.forEach((param) => {
|
|
83
|
+
const paramType = param.type;
|
|
84
|
+
if (!paramType || paramType === Object) {
|
|
85
|
+
console.warn(`ā ļø Parameter without explicit type: ${controllerName}.${methodName}() - ` + `parameter index ${param.index} (${param.name || 'unnamed'})`);
|
|
86
|
+
}
|
|
87
|
+
else if (typeof paramType === 'function' && paramType.name) {
|
|
88
|
+
const typeName = paramType.name;
|
|
89
|
+
const builtInTypes = ['String', 'Number', 'Boolean', 'Date', 'Array', 'Object'];
|
|
90
|
+
if (!builtInTypes.includes(typeName)) {
|
|
91
|
+
usedClasses.add(typeName);
|
|
92
|
+
console.log(`š ${controllerName}.${methodName}() uses class: ${typeName} ` + `(parameter: ${param.name || `index ${param.index}`})`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
console.log(`\nš Total unique classes used in parameters: ${usedClasses.size}`);
|
|
99
|
+
const rawSchemas = (0, class_validator_jsonschema_1.validationMetadatasToSchemas)({
|
|
73
100
|
refPointerPrefix: '#/components/schemas/',
|
|
74
101
|
});
|
|
75
|
-
schemas
|
|
76
|
-
|
|
102
|
+
const schemas = {};
|
|
103
|
+
console.log('\nš Checking generated schemas...');
|
|
104
|
+
Object.keys(rawSchemas).forEach((key) => {
|
|
105
|
+
if (rawSchemas[key] !== null && rawSchemas[key] !== undefined) {
|
|
106
|
+
schemas[key] = rawSchemas[key];
|
|
107
|
+
console.log(`ā
Schema found: ${key}`);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
console.warn(`ā Null/undefined schema detected for key: ${key}`);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
console.log('\nš Checking for missing schemas...');
|
|
114
|
+
const missingSchemas = [];
|
|
115
|
+
usedClasses.forEach((className) => {
|
|
116
|
+
if (!schemas[className]) {
|
|
117
|
+
console.error(`ā MISSING SCHEMA: ${className} - This will cause OpenAPI generation to fail!`);
|
|
118
|
+
missingSchemas.push(className);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
console.log(`ā
Schema exists: ${className}`);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
if (missingSchemas.length > 0) {
|
|
125
|
+
console.error('\n' + '='.repeat(80));
|
|
126
|
+
console.error('šØ ACTION REQUIRED: Classes without validation decorators detected!');
|
|
127
|
+
console.error('='.repeat(80));
|
|
128
|
+
console.error('\nThe following classes are used in @QueryParams() but lack validation decorators:');
|
|
129
|
+
missingSchemas.forEach((className) => {
|
|
130
|
+
console.error(` ā ${className}`);
|
|
131
|
+
});
|
|
132
|
+
console.error('\nš HOW TO FIX:');
|
|
133
|
+
console.error('Add class-validator decorators to each property in these classes.');
|
|
134
|
+
console.error('\nExample fix:\n');
|
|
135
|
+
console.error(" import { IsString, IsOptional } from 'class-validator';");
|
|
136
|
+
console.error(" // or use your project's wrapper:");
|
|
137
|
+
console.error(" import { cv, i18n } from '../../src';");
|
|
138
|
+
console.error('');
|
|
139
|
+
console.error(' @Expose()');
|
|
140
|
+
console.error(' class YourClass extends PaginationIn {');
|
|
141
|
+
console.error(' @IsString() // ā
Add this');
|
|
142
|
+
console.error(' @IsOptional() // ā
Add this (for optional fields)');
|
|
143
|
+
console.error(' @Expose()');
|
|
144
|
+
console.error(' yourField: string;');
|
|
145
|
+
console.error('');
|
|
146
|
+
console.error(' // Or using i18n wrapper:');
|
|
147
|
+
console.error(' @i18n(cv.IsString)');
|
|
148
|
+
console.error(' @cv.IsOptional()');
|
|
149
|
+
console.error(' @Expose()');
|
|
150
|
+
console.error(' anotherField: string;');
|
|
151
|
+
console.error(' }');
|
|
152
|
+
console.error('');
|
|
153
|
+
console.error('š” Why this is needed:');
|
|
154
|
+
console.error(' - Generates OpenAPI documentation automatically');
|
|
155
|
+
console.error(' - Provides runtime validation for API requests');
|
|
156
|
+
console.error(' - Ensures type safety and data integrity');
|
|
157
|
+
console.error('\n' + '='.repeat(80) + '\n');
|
|
158
|
+
console.log('š§ Creating temporary placeholder schemas to allow server to start...');
|
|
159
|
+
missingSchemas.forEach((className) => {
|
|
160
|
+
schemas[className] = {
|
|
161
|
+
type: 'object',
|
|
162
|
+
properties: {},
|
|
163
|
+
additionalProperties: true,
|
|
164
|
+
required: [],
|
|
165
|
+
description: `TEMPORARY: Add @IsString(), @IsOptional() etc. decorators to ${className} class properties`,
|
|
166
|
+
};
|
|
167
|
+
console.log(` ā ļø Created placeholder for ${className}`);
|
|
168
|
+
});
|
|
169
|
+
console.log('ā
Server will start, but please fix the classes above for proper OpenAPI docs!\n');
|
|
170
|
+
}
|
|
171
|
+
schemas['Object'] = { type: 'object' };
|
|
172
|
+
schemas['Array'] = { type: 'array', items: {} };
|
|
173
|
+
schemas['String'] = { type: 'string' };
|
|
174
|
+
schemas['Number'] = { type: 'number' };
|
|
175
|
+
schemas['Boolean'] = { type: 'boolean' };
|
|
176
|
+
schemas['Date'] = { type: 'string', format: 'date-time' };
|
|
177
|
+
if (!schemas['UserSearch']) {
|
|
178
|
+
console.log('ā ļø Manually creating schema for UserSearch (no validation decorators found)');
|
|
179
|
+
schemas['UserSearch'] = {
|
|
180
|
+
type: 'object',
|
|
181
|
+
properties: {
|
|
182
|
+
app: { type: 'string' },
|
|
183
|
+
userName: { type: 'string' },
|
|
184
|
+
pageIndex: { type: 'number' },
|
|
185
|
+
recordIndex: { type: 'number' },
|
|
186
|
+
pageSize: { type: 'number' },
|
|
187
|
+
search: { type: 'string' },
|
|
188
|
+
sort: { type: 'string' },
|
|
189
|
+
},
|
|
190
|
+
required: [],
|
|
191
|
+
};
|
|
192
|
+
}
|
|
77
193
|
const apiDoccfg = configure_1.ConfigManager.getConfig('openapiCfg');
|
|
78
194
|
if (!apiDoccfg.disabled) {
|
|
79
195
|
const pkgVersion = configure_1.ConfigManager.getPkgVersion();
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
196
|
+
console.log('\nš§ Patching parameter metadata...');
|
|
197
|
+
storage.params.forEach((param) => {
|
|
198
|
+
const paramType = param.type;
|
|
199
|
+
const isQueryParams = param.parse === true && paramType && paramType !== Object;
|
|
200
|
+
if (!paramType || paramType === Object) {
|
|
201
|
+
if (param.parse === true) {
|
|
202
|
+
console.warn(`ā ļø @QueryParams() in ${param.object.name}.${param.method}() uses class "${(paramType === null || paramType === void 0 ? void 0 : paramType.name) || 'Object'}". ` + `Ensure this class has validation decorators (@IsString(), @IsNumber(), etc.) for OpenAPI generation.`);
|
|
203
|
+
}
|
|
204
|
+
else if (paramType === Object) {
|
|
205
|
+
console.warn(`ā ļø Object type detected for parameter in ${param.object.name}.${param.method}() - ` + `parameter "${param.name || `index ${param.index}`}". Consider adding explicit type.`);
|
|
206
|
+
param.type = String;
|
|
207
|
+
}
|
|
208
|
+
else if (!paramType) {
|
|
209
|
+
param.type = String;
|
|
210
|
+
console.warn(`š§ Auto-patched parameter type to String: ${param.object.name}.${param.method}() - ` + `parameter ${param.name || `index ${param.index}`}`);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if (paramType && typeof paramType === 'function') {
|
|
214
|
+
const builtInTypes = [String, Number, Boolean, Date, Array, Object];
|
|
215
|
+
const isBuiltIn = builtInTypes.some((t) => paramType === t);
|
|
216
|
+
if (!isBuiltIn && paramType.name) {
|
|
217
|
+
const className = paramType.name;
|
|
218
|
+
if (!schemas[className]) {
|
|
219
|
+
console.error(`šØ CRITICAL: Schema missing for class "${className}" in ${param.object.name}.${param.method}(). ` + `Creating placeholder schema to prevent crash.`);
|
|
220
|
+
schemas[className] = {
|
|
221
|
+
type: 'object',
|
|
222
|
+
properties: {},
|
|
223
|
+
additionalProperties: true,
|
|
224
|
+
description: `Placeholder schema for ${className}. Add @IsString(), @IsNumber(), etc. decorators to class properties.`,
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
console.log('\nš Final schema count:', Object.keys(schemas).length);
|
|
231
|
+
console.log('\nš§¹ Deep cleaning schemas...');
|
|
232
|
+
const cleanSchema = (obj) => {
|
|
233
|
+
if (obj === null || obj === undefined) {
|
|
234
|
+
return { type: 'object' };
|
|
235
|
+
}
|
|
236
|
+
if (typeof obj !== 'object') {
|
|
237
|
+
return obj;
|
|
238
|
+
}
|
|
239
|
+
if (Array.isArray(obj)) {
|
|
240
|
+
return obj.map(cleanSchema);
|
|
241
|
+
}
|
|
242
|
+
const cleaned = {};
|
|
243
|
+
for (const key in obj) {
|
|
244
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
245
|
+
const value = obj[key];
|
|
246
|
+
if (value !== null && value !== undefined) {
|
|
247
|
+
cleaned[key] = cleanSchema(value);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return cleaned;
|
|
83
252
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
routingOptions.controllers.push(healthcheck_1.HealthCheckController);
|
|
88
|
-
const spec = (0, routing_controllers_openapi_1.routingControllersToSpec)(storage, routingOptions, {
|
|
89
|
-
info: {
|
|
90
|
-
title: cfg.appName,
|
|
91
|
-
description: `Open API 3 doc for module ${cfg.appName}`,
|
|
92
|
-
version: `v${cfg.version} / ${pkgVersion}`,
|
|
93
|
-
},
|
|
94
|
-
servers: [
|
|
95
|
-
{
|
|
96
|
-
url: `http://localhost:${cfg.port}`,
|
|
97
|
-
description: 'Local Development',
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
url: `http://${cfg.appName}:${cfg.port}`,
|
|
101
|
-
description: 'Dev Development (Must via Dev Proxy)',
|
|
102
|
-
},
|
|
103
|
-
],
|
|
104
|
-
components: { schemas },
|
|
253
|
+
Object.keys(schemas).forEach((key) => {
|
|
254
|
+
schemas[key] = cleanSchema(schemas[key]);
|
|
105
255
|
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
256
|
+
console.log('ā
Schema cleaning completed');
|
|
257
|
+
console.log('\nš Checking query parameters in detail...');
|
|
258
|
+
const ensureSchema = (typeName) => {
|
|
259
|
+
if (!schemas[typeName]) {
|
|
260
|
+
console.warn(` ā ļø Creating emergency schema for: ${typeName}`);
|
|
261
|
+
schemas[typeName] = {
|
|
262
|
+
type: 'object',
|
|
263
|
+
properties: {},
|
|
264
|
+
additionalProperties: true,
|
|
265
|
+
description: `Auto-generated placeholder for ${typeName}`,
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
storage.params.forEach((param) => {
|
|
270
|
+
var _a;
|
|
271
|
+
const paramAny = param;
|
|
272
|
+
if (param.name === 'query' || param.name === 'queries' || param.parse === true) {
|
|
273
|
+
const paramType = paramAny.explicitType || paramAny.type;
|
|
274
|
+
const typeName = typeof paramType === 'function' ? paramType.name : String(paramType);
|
|
275
|
+
console.log(`š Query param in ${param.object.name}.${param.method}(): ` + `name="${param.name}", type="${typeName}", parse=${param.parse}, ` + `explicitType=${((_a = paramAny.explicitType) === null || _a === void 0 ? void 0 : _a.name) || 'none'}`);
|
|
276
|
+
if (typeof paramType === 'function' && paramType.name) {
|
|
277
|
+
const builtInTypes = ['String', 'Number', 'Boolean', 'Date', 'Array', 'Object'];
|
|
278
|
+
if (!builtInTypes.includes(paramType.name)) {
|
|
279
|
+
ensureSchema(paramType.name);
|
|
280
|
+
if (schemas[paramType.name]) {
|
|
281
|
+
console.log(` ā
Schema exists for ${paramType.name}`);
|
|
282
|
+
const schemaStr = JSON.stringify(schemas[paramType.name], null, 2);
|
|
283
|
+
console.log(` š Schema preview:`, schemaStr.substring(0, 200) + '...');
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
console.log('\nš Final sweep - ensuring all parameter types have schemas...');
|
|
290
|
+
storage.params.forEach((param) => {
|
|
291
|
+
const paramType = param.type || param.explicitType;
|
|
292
|
+
if (paramType && typeof paramType === 'function' && paramType.name) {
|
|
293
|
+
const builtInTypes = ['String', 'Number', 'Boolean', 'Date', 'Array', 'Object'];
|
|
294
|
+
if (!builtInTypes.includes(paramType.name)) {
|
|
295
|
+
ensureSchema(paramType.name);
|
|
296
|
+
}
|
|
113
297
|
}
|
|
114
|
-
const tags = [];
|
|
115
|
-
Array.from(names).forEach((name) => {
|
|
116
|
-
tags.push({
|
|
117
|
-
name,
|
|
118
|
-
description: `Generated from ${name} controller`,
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
spec.tags = tags;
|
|
122
|
-
})
|
|
123
|
-
.catch((error) => {
|
|
124
|
-
console.error('Error processing API tags:', error);
|
|
125
|
-
spec.tags = [];
|
|
126
298
|
});
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
299
|
+
console.log(`\nš Final schema count after all checks: ${Object.keys(schemas).length}`);
|
|
300
|
+
console.log('\nš All schema keys:', Object.keys(schemas).join(', '));
|
|
301
|
+
console.log('\nš Validating schema structure...');
|
|
302
|
+
let validSchemaCount = 0;
|
|
303
|
+
for (const key in schemas) {
|
|
304
|
+
if (Object.prototype.hasOwnProperty.call(schemas, key)) {
|
|
305
|
+
const schema = schemas[key];
|
|
306
|
+
if (schema === null || schema === undefined) {
|
|
307
|
+
console.error(`ā NULL SCHEMA FOUND for key: ${key}`);
|
|
308
|
+
schemas[key] = { type: 'object', properties: {}, additionalProperties: true };
|
|
309
|
+
}
|
|
310
|
+
else if (typeof schema !== 'object') {
|
|
311
|
+
console.error(`ā INVALID SCHEMA TYPE for key: ${key} (${typeof schema})`);
|
|
312
|
+
schemas[key] = { type: 'object', properties: {}, additionalProperties: true };
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
validSchemaCount++;
|
|
316
|
+
if (schema.properties) {
|
|
317
|
+
for (const propKey in schema.properties) {
|
|
318
|
+
if (Object.prototype.hasOwnProperty.call(schema.properties, propKey)) {
|
|
319
|
+
const prop = schema.properties[propKey];
|
|
320
|
+
if (prop === null || prop === undefined) {
|
|
321
|
+
console.error(` ā NULL PROPERTY in ${key}.${propKey}`);
|
|
322
|
+
schema.properties[propKey] = { type: 'string' };
|
|
323
|
+
}
|
|
324
|
+
else if (prop.$ref === null || (prop.$ref === undefined && prop.$ref !== undefined)) {
|
|
325
|
+
console.error(` ā NULL $ref in ${key}.${propKey}`);
|
|
326
|
+
delete schema.properties[propKey].$ref;
|
|
327
|
+
schema.properties[propKey].type = 'string';
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
console.log(`ā
${validSchemaCount} valid schemas found`);
|
|
336
|
+
console.log('\nš§ Normalizing all schemas to OpenAPI 3.0 format...');
|
|
337
|
+
for (const key in schemas) {
|
|
338
|
+
if (Object.prototype.hasOwnProperty.call(schemas, key)) {
|
|
339
|
+
const schema = schemas[key];
|
|
340
|
+
if (['String', 'Number', 'Boolean', 'Date', 'Object', 'Array'].includes(key)) {
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
if (schema.type === 'object' && schema.properties) {
|
|
344
|
+
if (!schema.required) {
|
|
345
|
+
schema.required = [];
|
|
346
|
+
}
|
|
347
|
+
for (const propKey in schema.properties) {
|
|
348
|
+
if (Object.prototype.hasOwnProperty.call(schema.properties, propKey)) {
|
|
349
|
+
const prop = schema.properties[propKey];
|
|
350
|
+
if (typeof prop !== 'object' || prop === null) {
|
|
351
|
+
console.warn(` ā ļø Fixing invalid property ${key}.${propKey}`);
|
|
352
|
+
schema.properties[propKey] = { type: 'string' };
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
console.log(` ā
Normalized: ${key}`);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
const routingOptions = {
|
|
361
|
+
routePrefix: svcPath,
|
|
362
|
+
controllers: filteredControllers,
|
|
363
|
+
};
|
|
364
|
+
(_a = routingOptions.controllers) === null || _a === void 0 ? void 0 : _a.push(healthcheck_1.HealthCheckController);
|
|
365
|
+
console.log('\nš§ Patching metadata storage...');
|
|
366
|
+
let patchCount = 0;
|
|
367
|
+
storage.params.forEach((param, index) => {
|
|
368
|
+
const paramAny = param;
|
|
369
|
+
if (!paramAny.type) {
|
|
370
|
+
paramAny.type = String;
|
|
371
|
+
patchCount++;
|
|
372
|
+
}
|
|
373
|
+
if (paramAny.explicitType === null || paramAny.explicitType === undefined) {
|
|
374
|
+
if (paramAny.type && paramAny.type !== Object && typeof paramAny.type === 'function') {
|
|
375
|
+
paramAny.explicitType = paramAny.type;
|
|
376
|
+
}
|
|
131
377
|
}
|
|
132
|
-
|
|
133
|
-
|
|
378
|
+
for (const key in paramAny) {
|
|
379
|
+
if (paramAny[key] === null || paramAny[key] === undefined) {
|
|
380
|
+
if (key !== 'required' && key !== 'index' && key !== 'name') {
|
|
381
|
+
delete paramAny[key];
|
|
382
|
+
patchCount++;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
134
385
|
}
|
|
135
|
-
})
|
|
386
|
+
});
|
|
387
|
+
console.log(`ā
Patched ${patchCount} metadata issues\n`);
|
|
388
|
+
try {
|
|
389
|
+
const spec = (0, routing_controllers_openapi_1.routingControllersToSpec)(storage, routingOptions, {
|
|
390
|
+
info: {
|
|
391
|
+
title: cfg.appName,
|
|
392
|
+
description: `Open API 3 doc for module ${cfg.appName}`,
|
|
393
|
+
version: `v${cfg.version} / ${pkgVersion}`,
|
|
394
|
+
},
|
|
395
|
+
servers: [
|
|
396
|
+
{
|
|
397
|
+
url: `http://localhost:${cfg.port}`,
|
|
398
|
+
description: 'Local Development',
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
url: `http://${cfg.appName}:${cfg.port}`,
|
|
402
|
+
description: 'Dev Development (Must via Dev Proxy)',
|
|
403
|
+
},
|
|
404
|
+
],
|
|
405
|
+
components: { schemas },
|
|
406
|
+
});
|
|
407
|
+
const names = new Set();
|
|
408
|
+
const expression = (0, jsonata_1.default)('$sort(*.*.*.tags)');
|
|
409
|
+
expression
|
|
410
|
+
.evaluate(spec)
|
|
411
|
+
.then((result) => {
|
|
412
|
+
if (Array.isArray(result)) {
|
|
413
|
+
result.forEach((tag) => names.add(tag));
|
|
414
|
+
}
|
|
415
|
+
const tags = [];
|
|
416
|
+
Array.from(names).forEach((name) => {
|
|
417
|
+
tags.push({
|
|
418
|
+
name,
|
|
419
|
+
description: `Generated from ${name} controller`,
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
spec.tags = tags;
|
|
423
|
+
})
|
|
424
|
+
.catch((error) => {
|
|
425
|
+
console.error('Error processing API tags:', error);
|
|
426
|
+
spec.tags = [];
|
|
427
|
+
});
|
|
428
|
+
webapp.use((ctx, next) => __awaiter(void 0, void 0, void 0, function* () {
|
|
429
|
+
if (ctx.request.url === `${svcPath}/api/openapi`) {
|
|
430
|
+
ctx.response.type = 'application/json; charset=utf-8';
|
|
431
|
+
ctx.body = JSON.stringify(spec, null, 2);
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
yield next();
|
|
435
|
+
}
|
|
436
|
+
}));
|
|
437
|
+
console.log('ā
OpenAPI spec generated successfully\n');
|
|
438
|
+
}
|
|
439
|
+
catch (error) {
|
|
440
|
+
console.error('\nā Error generating OpenAPI spec:', error);
|
|
441
|
+
console.error('š” Tip: Add validation decorators (@IsString(), @IsNumber(), etc.) to all controller parameters\n');
|
|
442
|
+
}
|
|
136
443
|
}
|
|
137
444
|
};
|
|
138
445
|
setupOpenAPI();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KoaLoader.js","sourceRoot":"","sources":["../../../../src/libs/koa/KoaLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qDAA6B;AAC7B,2EAA0E;AAC1E,gDAAwB;AACxB,sDAA8B;AAC9B,8CAAqC;AACrC,8DAAkC;AAClC,wDAA4B;AAC5B,4DAAgC;AAGhC,4BAA0B;AAC1B,6DAAwH;AACxH,6EAAuE;AACvE,0DAAiC;AACjC,mCAAmC;AACnC,4CAAgE;AAChE,gDAAuD;AAEvD,uDAA8C;AAC9C,uEAAoE;AACpE,qEAAkE;AAE3D,MAAM,SAAS,GAAG,CAAC,MAAuB,EAAE,EAAE,CAAC,CAAC,OAAgC,EAAE,EAAE;IAEzF,IAAA,kCAAc,EAAC,kBAAS,CAAC,CAAC;IAE1B,MAAM,GAAG,GAAG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,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;gBAC3D,OAAO,CAAC,KAAK,CAAC,mGAAmG,CAAC,CAAC;YACrH,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IAGF,YAAY,EAAE,CAAC;IAGf,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QACxB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE;gBAC3B,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;AAngBW,QAAA,SAAS,aAmgBpB"}
|
|
@@ -21,6 +21,18 @@ class Logger {
|
|
|
21
21
|
name: tag,
|
|
22
22
|
level: transformedConfig.level,
|
|
23
23
|
};
|
|
24
|
+
if (transformedConfig.transport && transformedConfig.transport.target === 'pino-pretty') {
|
|
25
|
+
try {
|
|
26
|
+
const pretty = require('pino-pretty');
|
|
27
|
+
const prettyOptions = transformedConfig.transport.options || {};
|
|
28
|
+
const prettyStream = pretty(prettyOptions);
|
|
29
|
+
return (0, pino_1.default)(options, prettyStream);
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
console.error('Pino-pretty failed to load as stream. Falling back to raw JSON logs.', err);
|
|
33
|
+
return (0, pino_1.default)(options);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
24
36
|
if (transformedConfig.transport) {
|
|
25
37
|
options.transport = transformedConfig.transport;
|
|
26
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../../../src/libs/logger/Logger.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../../../src/libs/logger/Logger.ts"],"names":[],"mappings":";;;;;;AAMA,gDAA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O,MAAM,CAAC;IAChB,CAAC;IAGO,MAAM,CAAC,eAAe,CAAC,MAAoB;QACjD,MAAM,SAAS,qBAAQ,MAAM,CAAE,CAAC;QAEhC,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC;YACxB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,SAAS,CAAC,WAAW,EAAE,CAAC;YAC1B,SAAS,CAAC,SAAS,GAAG;gBACpB,MAAM,EAAE,aAAa;gBACrB,OAAO,EAAE,EAAE;aACZ,CAAC;YAEF,IAAI,OAAO,SAAS,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;gBAC9C,SAAS,CAAC,SAAS,CAAC,OAAO,mCACtB,SAAS,CAAC,WAAW,KACxB,QAAQ,EAAE,SAAS,CAAC,WAAW,CAAC,QAAQ,KAAK,KAAK,GACnD,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,SAAS,CAAC,SAAS,CAAC,OAAO,GAAG;oBAC5B,QAAQ,EAAE,IAAI;oBACd,aAAa,EAAE,cAAc;iBAC9B,CAAC;YACJ,CAAC;YAED,OAAO,SAAS,CAAC,WAAW,CAAC;QAC/B,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAhFD,wBAgFC"}
|
|
@@ -22,7 +22,7 @@ const rabbitmqLoader = (option) => (settings) => {
|
|
|
22
22
|
typedi_1.Container.set(DistributedEvents_1.DistributedEvents, events);
|
|
23
23
|
settings === null || settings === void 0 ? void 0 : settings.onShutdown(() => __awaiter(void 0, void 0, void 0, function* () { return events.close(); }));
|
|
24
24
|
return EventsManager_1.EventsManager.start(events, option.eventsHandlers).then(() => {
|
|
25
|
-
logger_1.Logger.getLogger('RabbitmqLoader').info(`šRabbitMQ connected
|
|
25
|
+
logger_1.Logger.getLogger('RabbitmqLoader').info(`šRabbitMQ connected. rabbitmqCfg: ${rabbitmqCfg.connection}`);
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DistributedEventsLoader.js","sourceRoot":"","sources":["../../../../src/libs/rabbitmq/DistributedEventsLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mCAAmC;AACnC,sCAAmC;AAEnC,4CAAgE;AAChE,mDAAgD;AAChD,2DAAwE;AAKjE,MAAM,cAAc,GAAG,CAAC,MAAqC,EAAE,EAAE,CAAC,CAAC,QAAiC,EAAE,EAAE;IAC7G,MAAM,MAAM,GAAG,yBAAa,CAAC,SAAS,CAAoB,aAAa,CAAC,CAAC;IACzE,MAAM,WAAW,GAAG,yBAAa,CAAC,SAAS,CAAiB,UAAU,CAAC,CAAC;IACxE,OAAO,qCAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QACzE,kBAAS,CAAC,GAAG,CAAC,qCAAiB,EAAE,MAAM,CAAC,CAAC;QACzC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,CAAC,GAAS,EAAE,kDAAC,OAAA,MAAM,CAAC,KAAK,EAAE,CAAA,GAAA,CAAC,CAAC;QACjD,OAAO,6BAAa,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YAClE,eAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"DistributedEventsLoader.js","sourceRoot":"","sources":["../../../../src/libs/rabbitmq/DistributedEventsLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mCAAmC;AACnC,sCAAmC;AAEnC,4CAAgE;AAChE,mDAAgD;AAChD,2DAAwE;AAKjE,MAAM,cAAc,GAAG,CAAC,MAAqC,EAAE,EAAE,CAAC,CAAC,QAAiC,EAAE,EAAE;IAC7G,MAAM,MAAM,GAAG,yBAAa,CAAC,SAAS,CAAoB,aAAa,CAAC,CAAC;IACzE,MAAM,WAAW,GAAG,yBAAa,CAAC,SAAS,CAAiB,UAAU,CAAC,CAAC;IACxE,OAAO,qCAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QACzE,kBAAS,CAAC,GAAG,CAAC,qCAAiB,EAAE,MAAM,CAAC,CAAC;QACzC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,CAAC,GAAS,EAAE,kDAAC,OAAA,MAAM,CAAC,KAAK,EAAE,CAAA,GAAA,CAAC,CAAC;QACjD,OAAO,6BAAa,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YAClE,eAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,sCAAsC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC;QAC1G,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAVW,QAAA,cAAc,kBAUzB"}
|
|
@@ -20,7 +20,7 @@ const redisLoader = (option) => (settings) => {
|
|
|
20
20
|
typedi_1.Container.set(RedisClient_1.RedisClient, redisClient);
|
|
21
21
|
const { redis } = redisClient;
|
|
22
22
|
settings === null || settings === void 0 ? void 0 : settings.onShutdown(() => __awaiter(void 0, void 0, void 0, function* () { return redis.disconnect(); }));
|
|
23
|
-
logger_1.Logger.getLogger('RedisLoader').info(`šRedis connected
|
|
23
|
+
logger_1.Logger.getLogger('RedisLoader').info(`šRedis connected. redisCfg: ${cfg.redis} `);
|
|
24
24
|
return new Promise((resolve) => {
|
|
25
25
|
redis.once('connect', () => {
|
|
26
26
|
resolve();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedisLoader.js","sourceRoot":"","sources":["../../../../src/libs/redis/RedisLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mCAAmC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,SAAS,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,gCAAgC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC;IAEnF,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QACnC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE;YACzB,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAbW,QAAA,WAAW,eAatB"}
|
package/open.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": {
|
|
3
|
+
"schemas": {
|
|
4
|
+
"PaginationIn": { "properties": { "pageIndex": { "type": "number" }, "recordIndex": { "type": "number" }, "pageSize": { "type": "number" }, "search": { "type": "string" }, "sort": { "type": "string" } }, "type": "object", "required": [] },
|
|
5
|
+
"SearchVo": { "properties": { "pageIndex": { "type": "number" }, "recordIndex": { "type": "number" }, "pageSize": { "type": "number" }, "search": { "type": "string" }, "sort": { "type": "string" } }, "type": "object", "required": [] },
|
|
6
|
+
"AssignRolesToUser": { "properties": { "app": { "minLength": 1, "maxLength": 128, "type": "string" }, "roleIds": { "items": { "minLength": 1, "maxLength": 10, "type": "string" }, "type": "array" } }, "type": "object", "required": ["app", "roleIds"] },
|
|
7
|
+
"AssignFunctionsToRole": { "properties": { "app": { "minLength": 1, "maxLength": 128, "type": "string" }, "functions": { "items": { "minLength": 1, "maxLength": 128, "type": "string" }, "type": "array" } }, "type": "object", "required": ["app", "functions"] },
|
|
8
|
+
"AssignMenusToRole": { "properties": { "app": { "minLength": 1, "maxLength": 128, "type": "string" }, "funcs": { "items": { "minLength": 1, "maxLength": 128, "type": "string" }, "type": "array" } }, "type": "object", "required": ["app", "funcs"] },
|
|
9
|
+
"AssignUsersToRole": { "properties": { "app": { "minLength": 1, "maxLength": 128, "type": "string" }, "userIds": { "items": { "minLength": 1, "maxLength": 128, "type": "string" }, "type": "array" } }, "type": "object", "required": ["app", "userIds"] },
|
|
10
|
+
"RoleVo": { "properties": { "name": { "minLength": 1, "maxLength": 32, "type": "string" }, "app": { "minLength": 1, "maxLength": 32, "type": "string" }, "isDefault": { "type": "number", "enum": [0, 1] } }, "type": "object", "required": ["name", "app"] },
|
|
11
|
+
"RoleSearchVo": { "properties": { "app": { "type": "string" }, "pageIndex": { "type": "number" }, "recordIndex": { "type": "number" }, "pageSize": { "type": "number" }, "search": { "type": "string" }, "sort": { "type": "string" } }, "type": "object", "required": [] },
|
|
12
|
+
"Who": { "properties": { "name": { "maxLength": 3, "type": "string" }, "name1": { "maxLength": 1, "type": "string" } }, "type": "object", "required": ["name1"] },
|
|
13
|
+
"WhoResponse": { "properties": { "hi": { "type": "string" } }, "type": "object", "required": ["hi"] },
|
|
14
|
+
"Object": { "type": "object" },
|
|
15
|
+
"Array": { "type": "array", "items": {} },
|
|
16
|
+
"String": { "type": "string" },
|
|
17
|
+
"Number": { "type": "number" },
|
|
18
|
+
"Boolean": { "type": "boolean" },
|
|
19
|
+
"Date": { "type": "string", "format": "date-time" },
|
|
20
|
+
"UserSearch": { "type": "object", "properties": { "app": { "type": "string" }, "userName": { "type": "string" }, "pageIndex": { "type": "number" }, "recordIndex": { "type": "number" }, "pageSize": { "type": "number" }, "search": { "type": "string" }, "sort": { "type": "string" } }, "required": [] }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"info": { "title": "example", "version": "v1 / 1.0.11", "description": "Open API 3 doc for module example" },
|
|
24
|
+
"openapi": "3.0.0",
|
|
25
|
+
"paths": {
|
|
26
|
+
"/api/v1/example/_healthcheck": { "get": { "operationId": "HealthCheckController.healthCheck", "parameters": [{ "in": "query", "name": "os", "required": false, "schema": { "type": "boolean" } }], "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Health check", "tags": ["Health Check"] } },
|
|
27
|
+
"/api/v1/example/api/list": { "get": { "operationId": "ApiRegisterController.showAllApisOfThisModule", "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Show all apis of this module", "tags": ["Api Register"] } },
|
|
28
|
+
"/api/v1/example/": { "get": { "operationId": "ApiRegisterController.index", "responses": { "200": { "content": { "text/html": {} }, "description": "Successful response" } }, "summary": "Index", "tags": ["Api Register"] } },
|
|
29
|
+
"/api/v1/example/api/web/CommonApiParam.yaml": { "get": { "operationId": "ApiRegisterController.restClientConfigWebCommonApiParamWeb", "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Rest client config web common api param web", "tags": ["Api Register"] } },
|
|
30
|
+
"/api/v1/example/api/web/API.yaml": { "get": { "operationId": "ApiRegisterController.restClientConfigWeb", "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Rest client config web", "tags": ["Api Register"] } },
|
|
31
|
+
"/api/v1/example/api/web/API.json": { "get": { "operationId": "ApiRegisterController.restClientWebApis", "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Rest client web apis", "tags": ["Api Register"] } },
|
|
32
|
+
"/api/v1/example/api/svc/CommonApiParam.yaml": { "get": { "operationId": "ApiRegisterController.restClientConfigWebCommonApiParamSvc", "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Rest client config web common api param svc", "tags": ["Api Register"] } },
|
|
33
|
+
"/api/v1/example/api/svc/API.yaml": { "get": { "operationId": "ApiRegisterController.restClientConfigService", "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Rest client config service", "tags": ["Api Register"] } },
|
|
34
|
+
"/api/v1/example/api/svc/API.json": { "get": { "operationId": "ApiRegisterController.restClientSvcApi", "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Rest client svc api", "tags": ["Api Register"] } },
|
|
35
|
+
"/api/v1/example/crud/user": {
|
|
36
|
+
"post": { "operationId": "UserController.createUser", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserVo" } } }, "description": "UserVo", "required": false }, "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Create user", "tags": ["User"] },
|
|
37
|
+
"get": {
|
|
38
|
+
"operationId": "UserController.queryUser",
|
|
39
|
+
"parameters": [
|
|
40
|
+
{ "in": "query", "name": "app", "required": false, "schema": { "type": "string" } },
|
|
41
|
+
{ "in": "query", "name": "userName", "required": false, "schema": { "type": "string" } },
|
|
42
|
+
{ "in": "query", "name": "pageIndex", "required": false, "schema": { "type": "number" } },
|
|
43
|
+
{ "in": "query", "name": "recordIndex", "required": false, "schema": { "type": "number" } },
|
|
44
|
+
{ "in": "query", "name": "pageSize", "required": false, "schema": { "type": "number" } },
|
|
45
|
+
{ "in": "query", "name": "search", "required": false, "schema": { "type": "string" } },
|
|
46
|
+
{ "in": "query", "name": "sort", "required": false, "schema": { "type": "string" } }
|
|
47
|
+
],
|
|
48
|
+
"responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } },
|
|
49
|
+
"summary": "Query user",
|
|
50
|
+
"tags": ["User"]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"/api/v1/example/crud/user/{id}": {
|
|
54
|
+
"get": { "operationId": "UserController.getUser", "parameters": [{ "in": "path", "name": "id", "required": true, "schema": { "pattern": "[^\\/#\\?]+?", "type": "string" } }], "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Get user", "tags": ["User"] },
|
|
55
|
+
"put": { "operationId": "UserController.modifyUser", "parameters": [{ "in": "path", "name": "id", "required": true, "schema": { "pattern": "[^\\/#\\?]+?", "type": "string" } }], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserVo" } } }, "description": "UserVo", "required": false }, "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Modify user", "tags": ["User"] },
|
|
56
|
+
"delete": { "operationId": "UserController.removeUser", "parameters": [{ "in": "path", "name": "id", "required": true, "schema": { "pattern": "[^\\/#\\?]+?", "type": "string" } }], "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Remove user", "tags": ["User"] }
|
|
57
|
+
},
|
|
58
|
+
"/api/v1/example/crud/allUsers": { "get": { "operationId": "UserController.getAllUsers", "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Get all users", "tags": ["User"] } },
|
|
59
|
+
"/api/v1/example/all": {
|
|
60
|
+
"get": {
|
|
61
|
+
"operationId": "UserController.allUsers",
|
|
62
|
+
"parameters": [
|
|
63
|
+
{ "in": "query", "name": "email", "required": false, "schema": { "type": "string" } },
|
|
64
|
+
{ "in": "query", "name": "reset", "required": false, "schema": { "type": "string" } },
|
|
65
|
+
{ "in": "query", "name": "cache", "required": false, "schema": { "type": "string" } },
|
|
66
|
+
{ "in": "query", "name": "update", "required": false, "schema": { "type": "string" } },
|
|
67
|
+
{ "in": "query", "name": "del", "required": false, "schema": { "type": "string" } }
|
|
68
|
+
],
|
|
69
|
+
"responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } },
|
|
70
|
+
"summary": "All users",
|
|
71
|
+
"tags": ["User"]
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"/api/v1/example/actions/who": { "get": { "operationId": "UserController.whoami1", "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Whoami 1", "tags": ["User"] } },
|
|
75
|
+
"/api/v1/example/hello/{who}": { "get": { "operationId": "UserController.whoami2", "parameters": [{ "in": "path", "name": "who", "required": true, "schema": { "pattern": "[^\\/#\\?]+?", "type": "string" } }], "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "Whoami 2", "tags": ["User"] } },
|
|
76
|
+
"/api/v1/example/hello": { "post": { "operationId": "UserController.whoami3", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Who" } } }, "description": "Who", "required": false }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WhoResponse" } } }, "description": "" } }, "summary": "Whoami 3", "tags": ["User"] } },
|
|
77
|
+
"/api/v1/example/query/roles": {
|
|
78
|
+
"get": {
|
|
79
|
+
"operationId": "UserController.queryRoles",
|
|
80
|
+
"parameters": [
|
|
81
|
+
{ "in": "query", "name": "app", "required": false, "schema": { "type": "string" } },
|
|
82
|
+
{ "in": "query", "name": "pageIndex", "required": false, "schema": { "type": "number" } },
|
|
83
|
+
{ "in": "query", "name": "recordIndex", "required": false, "schema": { "type": "number" } },
|
|
84
|
+
{ "in": "query", "name": "pageSize", "required": false, "schema": { "type": "number" } },
|
|
85
|
+
{ "in": "query", "name": "search", "required": false, "schema": { "type": "string" } },
|
|
86
|
+
{ "in": "query", "name": "sort", "required": false, "schema": { "type": "string" } }
|
|
87
|
+
],
|
|
88
|
+
"responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WhoResponse" } } }, "description": "" } },
|
|
89
|
+
"summary": "Query roles",
|
|
90
|
+
"tags": ["User"]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"/api/v1/example/error": { "post": { "operationId": "UserController.thisApiWillThrowAnError", "responses": { "200": { "content": { "application/json": {} }, "description": "Successful response" } }, "summary": "This api will throw an error", "tags": ["User"] } }
|
|
94
|
+
},
|
|
95
|
+
"servers": [
|
|
96
|
+
{ "url": "http://localhost:3000", "description": "Local Development" },
|
|
97
|
+
{ "url": "http://example:3000", "description": "Dev Development (Must via Dev Proxy)" }
|
|
98
|
+
],
|
|
99
|
+
"tags": [
|
|
100
|
+
{ "name": "Api Register", "description": "Generated from Api Register controller" },
|
|
101
|
+
{ "name": "Health Check", "description": "Generated from Health Check controller" },
|
|
102
|
+
{ "name": "User", "description": "Generated from User controller" }
|
|
103
|
+
]
|
|
104
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gaias/basenode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"buildNumber": 251008015,
|
|
5
5
|
"description": "API development framework for NodeJs",
|
|
6
6
|
"author": "FOT",
|
|
@@ -74,7 +74,6 @@
|
|
|
74
74
|
"@koa/cors": "^5.0.0",
|
|
75
75
|
"@koa/multer": "^4.0.0",
|
|
76
76
|
"@types/amqplib": "^0.10.7",
|
|
77
|
-
"@types/ioredis": "^5.0.0",
|
|
78
77
|
"@types/js-yaml": "^4.0.9",
|
|
79
78
|
"@types/jsonwebtoken": "^9.0.10",
|
|
80
79
|
"@types/koa": "^3.0.0",
|
|
@@ -118,7 +117,7 @@
|
|
|
118
117
|
"npe": "^1.2.0",
|
|
119
118
|
"pagination-calculator": "^1.0.0",
|
|
120
119
|
"pino": "^10.0.0",
|
|
121
|
-
"pino-pretty": "
|
|
120
|
+
"pino-pretty": "^11.0.0",
|
|
122
121
|
"reflect-metadata": "^0.2.2",
|
|
123
122
|
"routing-controllers": "^0.11.3",
|
|
124
123
|
"routing-controllers-openapi": "^5.0.0",
|