@midwayjs/swagger 3.0.0-beta.16 → 3.0.1
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 +4 -4
- package/index.d.ts +1 -1
- package/package.json +9 -9
package/dist/swaggerExplorer.js
CHANGED
|
@@ -202,7 +202,7 @@ let SwaggerExplorer = class SwaggerExplorer {
|
|
|
202
202
|
continue;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
if (decorator_1.
|
|
205
|
+
if (decorator_1.Types.isClass(currentType)) {
|
|
206
206
|
this.parseClzz(currentType);
|
|
207
207
|
p.schema = {
|
|
208
208
|
$ref: '#/components/schemas/' + currentType.name,
|
|
@@ -296,7 +296,7 @@ let SwaggerExplorer = class SwaggerExplorer {
|
|
|
296
296
|
// 这里是引用,赋值可以直接更改
|
|
297
297
|
const tt = resp[k];
|
|
298
298
|
if (tt.type) {
|
|
299
|
-
if (decorator_1.
|
|
299
|
+
if (decorator_1.Types.isClass(tt.type)) {
|
|
300
300
|
this.parseClzz(tt.type);
|
|
301
301
|
if (tt.isArray) {
|
|
302
302
|
tt.content = {
|
|
@@ -396,7 +396,7 @@ let SwaggerExplorer = class SwaggerExplorer {
|
|
|
396
396
|
}
|
|
397
397
|
else {
|
|
398
398
|
if (param.type) {
|
|
399
|
-
if (decorator_1.
|
|
399
|
+
if (decorator_1.Types.isClass(param.type)) {
|
|
400
400
|
this.parseClzz(param.type);
|
|
401
401
|
p.schema = {
|
|
402
402
|
$ref: '#/components/schemas/' + param.type.name,
|
|
@@ -488,7 +488,7 @@ let SwaggerExplorer = class SwaggerExplorer {
|
|
|
488
488
|
currentType = (_b = metadata === null || metadata === void 0 ? void 0 : metadata.items) === null || _b === void 0 ? void 0 : _b.type;
|
|
489
489
|
delete metadata.items;
|
|
490
490
|
}
|
|
491
|
-
if (decorator_1.
|
|
491
|
+
if (decorator_1.Types.isClass(currentType)) {
|
|
492
492
|
this.parseClzz(currentType);
|
|
493
493
|
if (isArray) {
|
|
494
494
|
tt.properties[key] = {
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/swagger",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"main": "dist/index",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -9,23 +9,23 @@
|
|
|
9
9
|
"index.d.ts"
|
|
10
10
|
],
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@midwayjs/core": "^3.0.
|
|
13
|
-
"@midwayjs/decorator": "^3.0.0
|
|
14
|
-
"@midwayjs/koa": "^3.0.
|
|
15
|
-
"@midwayjs/mock": "^3.0.
|
|
16
|
-
"swagger-ui-dist": "4.1
|
|
12
|
+
"@midwayjs/core": "^3.0.1",
|
|
13
|
+
"@midwayjs/decorator": "^3.0.0",
|
|
14
|
+
"@midwayjs/koa": "^3.0.1",
|
|
15
|
+
"@midwayjs/mock": "^3.0.1",
|
|
16
|
+
"swagger-ui-dist": "4.2.1"
|
|
17
17
|
},
|
|
18
18
|
"author": "Kurten Chan <chinkurten@gmail.com>",
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "tsc",
|
|
22
22
|
"jest": "node --require=ts-node/register ../../node_modules/jest/bin/jest.js",
|
|
23
|
-
"test": "node --require=ts-node/register ../../node_modules/.bin/jest",
|
|
24
|
-
"cov": "node --require=ts-node/register ../../node_modules/.bin/jest --coverage --forceExit"
|
|
23
|
+
"test": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand",
|
|
24
|
+
"cov": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand --coverage --forceExit"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
28
28
|
"url": "https://github.com/midwayjs/midway.git"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "f345b4ed0392e5c3b9e815438ef0a377ad6da076"
|
|
31
31
|
}
|