@midwayjs/swagger 3.17.0 → 3.17.2
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/swaggerExplorer.js +3 -2
- package/package.json +6 -6
package/dist/swaggerExplorer.js
CHANGED
|
@@ -357,12 +357,13 @@ let SwaggerExplorer = class SwaggerExplorer {
|
|
|
357
357
|
// 如果@Query()装饰的 是一个对象,则把该对象的子属性作为多个@Query参数
|
|
358
358
|
const schema = this.documentBuilder.getSchema(currentType.name);
|
|
359
359
|
Object.keys(schema.properties).forEach(pName => {
|
|
360
|
-
var _a;
|
|
360
|
+
var _a, _b;
|
|
361
361
|
const pp = {
|
|
362
362
|
name: pName,
|
|
363
363
|
in: p.in,
|
|
364
|
+
description: (_a = schema.properties[pName]) === null || _a === void 0 ? void 0 : _a.description,
|
|
364
365
|
schema: schema.properties[pName],
|
|
365
|
-
required: ((
|
|
366
|
+
required: ((_b = schema.required) === null || _b === void 0 ? void 0 : _b.includes(pName)) || false,
|
|
366
367
|
};
|
|
367
368
|
parameters.push(pp);
|
|
368
369
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/swagger",
|
|
3
|
-
"version": "3.17.
|
|
3
|
+
"version": "3.17.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"index.html"
|
|
11
11
|
],
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@midwayjs/core": "^3.17.
|
|
14
|
-
"@midwayjs/koa": "^3.17.
|
|
15
|
-
"@midwayjs/mock": "^3.17.
|
|
16
|
-
"@midwayjs/validate": "^3.17.
|
|
13
|
+
"@midwayjs/core": "^3.17.1",
|
|
14
|
+
"@midwayjs/koa": "^3.17.1",
|
|
15
|
+
"@midwayjs/mock": "^3.17.1",
|
|
16
|
+
"@midwayjs/validate": "^3.17.1",
|
|
17
17
|
"swagger-ui-dist": "5.17.14"
|
|
18
18
|
},
|
|
19
19
|
"author": "Kurten Chan <chinkurten@gmail.com>",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"type": "git",
|
|
28
28
|
"url": "https://github.com/midwayjs/midway.git"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "c878373ceee03f7922d6c61488e8881d43d6006b"
|
|
31
31
|
}
|