@midwayjs/swagger 3.3.5 → 3.3.13
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 +9 -1
- package/package.json +3 -3
package/dist/swaggerExplorer.js
CHANGED
|
@@ -553,6 +553,7 @@ let SwaggerExplorer = class SwaggerExplorer {
|
|
|
553
553
|
$ref: '#components/schemas/' + (currentType === null || currentType === void 0 ? void 0 : currentType.name),
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
|
+
delete metadata.items;
|
|
556
557
|
}
|
|
557
558
|
else {
|
|
558
559
|
if (isArray) {
|
|
@@ -562,7 +563,6 @@ let SwaggerExplorer = class SwaggerExplorer {
|
|
|
562
563
|
type: 'array',
|
|
563
564
|
items: metadata === null || metadata === void 0 ? void 0 : metadata.items,
|
|
564
565
|
};
|
|
565
|
-
delete metadata.items;
|
|
566
566
|
}
|
|
567
567
|
else {
|
|
568
568
|
tt.properties[key] = {
|
|
@@ -572,12 +572,20 @@ let SwaggerExplorer = class SwaggerExplorer {
|
|
|
572
572
|
},
|
|
573
573
|
};
|
|
574
574
|
}
|
|
575
|
+
delete metadata.items;
|
|
575
576
|
}
|
|
576
577
|
else {
|
|
577
578
|
tt.properties[key] = {
|
|
578
579
|
type: (0, decorator_1.getPropertyType)(clzz.prototype, key).name,
|
|
579
580
|
format: metadata === null || metadata === void 0 ? void 0 : metadata.format,
|
|
580
581
|
};
|
|
582
|
+
// Date 类型支持
|
|
583
|
+
if (tt.properties[key].type === 'Date') {
|
|
584
|
+
tt.properties[key].type = 'string';
|
|
585
|
+
if (!tt.properties[key].format) {
|
|
586
|
+
tt.properties[key].format = 'date';
|
|
587
|
+
}
|
|
588
|
+
}
|
|
581
589
|
delete metadata.format;
|
|
582
590
|
}
|
|
583
591
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/swagger",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.13",
|
|
4
4
|
"main": "dist/index",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@midwayjs/core": "^3.3.5",
|
|
13
13
|
"@midwayjs/decorator": "^3.3.4",
|
|
14
|
-
"@midwayjs/koa": "^3.3.
|
|
14
|
+
"@midwayjs/koa": "^3.3.6",
|
|
15
15
|
"@midwayjs/mock": "^3.3.5",
|
|
16
16
|
"swagger-ui-dist": "4.6.2"
|
|
17
17
|
},
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"type": "git",
|
|
28
28
|
"url": "https://github.com/midwayjs/midway.git"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "bd3b724f3902522d58c6cc3eddfd515a450c62cc"
|
|
31
31
|
}
|