@midwayjs/swagger 3.12.8 → 3.12.10

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.
@@ -3,6 +3,7 @@ export interface ApiPropertyOptions extends Omit<SchemaObjectMetadata, 'name' |
3
3
  name?: string;
4
4
  enum?: any[] | Record<string, any>;
5
5
  enumName?: string;
6
+ $ref?: string;
6
7
  }
7
8
  export declare function ApiProperty(options?: ApiPropertyOptions): PropertyDecorator;
8
9
  export declare function createApiPropertyDecorator(options?: ApiPropertyOptions): PropertyDecorator;
@@ -719,6 +719,9 @@ let SwaggerExplorer = class SwaggerExplorer {
719
719
  }
720
720
  delete metadata.items;
721
721
  }
722
+ else if (metadata.$ref) {
723
+ tt.properties[key] = {};
724
+ }
722
725
  else {
723
726
  tt.properties[key] = {
724
727
  type: currentType !== null && currentType !== void 0 ? currentType : (0, core_1.getPropertyType)(clzz.prototype, key).name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/swagger",
3
- "version": "3.12.8",
3
+ "version": "3.12.10",
4
4
  "main": "dist/index.js",
5
5
  "typings": "index.d.ts",
6
6
  "files": [
@@ -10,9 +10,9 @@
10
10
  ],
11
11
  "devDependencies": {
12
12
  "@midwayjs/core": "^3.12.3",
13
- "@midwayjs/koa": "^3.12.8",
14
- "@midwayjs/mock": "^3.12.8",
15
- "@midwayjs/validate": "^3.12.8",
13
+ "@midwayjs/koa": "^3.12.10",
14
+ "@midwayjs/mock": "^3.12.10",
15
+ "@midwayjs/validate": "^3.12.10",
16
16
  "swagger-ui-dist": "4.19.1"
17
17
  },
18
18
  "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": "598bf3584d655d41889237010edd8b3223d8f059"
30
+ "gitHead": "8d92c54424843d437fd5f77f6ff93f00c055117b"
31
31
  }