@midwayjs/swagger 3.1.2 → 3.1.7-alpha.0

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.
@@ -32,7 +32,7 @@ function getTypeIsArrayTuple(input, isArrayFlag) {
32
32
  exports.getTypeIsArrayTuple = getTypeIsArrayTuple;
33
33
  function getSchemaPath(clzz) {
34
34
  let str = clzz;
35
- if (typeof clzz === 'object') {
35
+ if (typeof clzz !== 'string') {
36
36
  str = clzz ? clzz.name : clzz;
37
37
  }
38
38
  return `#/components/schemas/${str}`;
@@ -637,7 +637,7 @@ function parseParamsInPath(url) {
637
637
  const names = [];
638
638
  url.split('/').forEach(item => {
639
639
  if (item.startsWith(':')) {
640
- const paramName = item.substr(1);
640
+ const paramName = item.slice(1);
641
641
  names.push(paramName);
642
642
  }
643
643
  });
package/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { SwaggerOptions } from './dist/index';
2
2
  export * from './dist/index';
3
3
 
4
- declare module '@midwayjs/core/dist/interface' {
4
+ declare module '@midwayjs/core' {
5
5
  interface MidwayConfig {
6
6
  swagger?: Partial<SwaggerOptions>;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/swagger",
3
- "version": "3.1.2",
3
+ "version": "3.1.7-alpha.0",
4
4
  "main": "dist/index",
5
5
  "typings": "index.d.ts",
6
6
  "files": [
@@ -9,10 +9,10 @@
9
9
  "index.d.ts"
10
10
  ],
11
11
  "devDependencies": {
12
- "@midwayjs/core": "^3.1.2",
13
- "@midwayjs/decorator": "^3.0.10",
14
- "@midwayjs/koa": "^3.1.2",
15
- "@midwayjs/mock": "^3.1.2",
12
+ "@midwayjs/core": "^3.1.7-alpha.0",
13
+ "@midwayjs/decorator": "^3.1.6",
14
+ "@midwayjs/koa": "^3.1.7-alpha.0",
15
+ "@midwayjs/mock": "^3.1.7-alpha.0",
16
16
  "swagger-ui-dist": "4.6.2"
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": "4ff3aa892b76d016f0ea123c7f9520d054d5c96b"
30
+ "gitHead": "8cb6db25f7eb794d9c61aaf69a43ac6506a289b5"
31
31
  }