@midwayjs/swagger 3.7.1 → 3.7.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.
@@ -27,7 +27,7 @@ export declare class SwaggerExplorer {
27
27
  * 解析类型的 ApiProperty
28
28
  * @param clzz
29
29
  */
30
- private parseClzz;
30
+ protected parseClzz(clzz: Type): any;
31
31
  /**
32
32
  * 授权验证
33
33
  * @param opts
@@ -578,7 +578,7 @@ let SwaggerExplorer = class SwaggerExplorer {
578
578
  }
579
579
  else {
580
580
  tt.properties[key] = {
581
- type: (0, core_1.getPropertyType)(clzz.prototype, key).name,
581
+ type: currentType !== null && currentType !== void 0 ? currentType : (0, core_1.getPropertyType)(clzz.prototype, key).name,
582
582
  format: metadata === null || metadata === void 0 ? void 0 : metadata.format,
583
583
  };
584
584
  // Date 类型支持
@@ -597,6 +597,8 @@ let SwaggerExplorer = class SwaggerExplorer {
597
597
  this.documentBuilder.addSchema({
598
598
  [clzz.name]: tt,
599
599
  });
600
+ // just for test
601
+ return tt;
600
602
  }
601
603
  /**
602
604
  * 授权验证
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/swagger",
3
- "version": "3.7.1",
3
+ "version": "3.7.2",
4
4
  "main": "dist/index",
5
5
  "typings": "index.d.ts",
6
6
  "files": [
@@ -27,5 +27,5 @@
27
27
  "type": "git",
28
28
  "url": "https://github.com/midwayjs/midway.git"
29
29
  },
30
- "gitHead": "d41be2f6082d035ea4fb109e32b0e240c2435f9a"
30
+ "gitHead": "9b7dd3b9d1a44ea4cee484ba9e1046bc0c0b7c62"
31
31
  }