@midwayjs/swagger 3.16.0 → 3.16.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.
@@ -357,10 +357,12 @@ 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
361
  const pp = {
361
362
  name: pName,
362
363
  in: p.in,
363
364
  schema: schema.properties[pName],
365
+ required: ((_a = schema.required) === null || _a === void 0 ? void 0 : _a.includes(pName)) || false,
364
366
  };
365
367
  parameters.push(pp);
366
368
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/swagger",
3
- "version": "3.16.0",
3
+ "version": "3.16.2",
4
4
  "main": "dist/index.js",
5
5
  "typings": "index.d.ts",
6
6
  "files": [
@@ -10,11 +10,11 @@
10
10
  "index.html"
11
11
  ],
12
12
  "devDependencies": {
13
- "@midwayjs/core": "^3.16.0",
14
- "@midwayjs/koa": "^3.16.0",
15
- "@midwayjs/mock": "^3.16.0",
16
- "@midwayjs/validate": "^3.16.0",
17
- "swagger-ui-dist": "5.17.4"
13
+ "@midwayjs/core": "^3.16.2",
14
+ "@midwayjs/koa": "^3.16.2",
15
+ "@midwayjs/mock": "^3.16.2",
16
+ "@midwayjs/validate": "^3.16.2",
17
+ "swagger-ui-dist": "5.17.14"
18
18
  },
19
19
  "author": "Kurten Chan <chinkurten@gmail.com>",
20
20
  "license": "MIT",
@@ -27,5 +27,5 @@
27
27
  "type": "git",
28
28
  "url": "https://github.com/midwayjs/midway.git"
29
29
  },
30
- "gitHead": "7e75fe1bdc9a6df2956f9c22e704063aaa022d76"
30
+ "gitHead": "45af90c8055ed62b4a0e811d3b5ce42a796b6d65"
31
31
  }