Skip to content

Commit

Permalink
fix: typescript parameter error
Browse files Browse the repository at this point in the history
  • Loading branch information
sumits-systango committed Aug 29, 2019
1 parent 2e66c6b commit 2e9bdbe
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 36 deletions.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function serveSwagger(
initialise(app, options);
compile(); // compile swagger document
app.use(swaggerUi.serve); // serve swagger static files
app.use(convert(mount(endPoint, swaggerUi.setup(json()))));
app.use(convert(mount(endPoint, swaggerUi.setup(json(), false, null, null, null))));
}

/**
Expand Down
50 changes: 25 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 17 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "swagger-generator-koa",
"title": "swagger-generator-koa",
"version": "1.0.0",
"version": "1.0.1",
"description": "Generate automatic swagger using joi validation.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"build": "tsc",
"build:watch": "tsc --watch",
"prepublish": "tsc",
"scripts": {
"lint": "tslint --project \"./tsconfig.json\"",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc",
"build:watch": "tsc --watch",
"prepublish": "tsc"
},
"author": {
"name": "systango-technologies",
Expand Down Expand Up @@ -49,13 +49,20 @@
"koa-mount": "^4.0.0",
"koa-static": "^5.0.0",
"lodash": "^4.17.15",
"swagger-spec-express": "^2.0.18",
"swagger-spec-express": "^2.0.19",
"swagger-ui-koa": "0.0.1"
},
"devDependencies": {
"@types/lodash": "^4.14.136",
"@types/node": "^12.7.1",
"tslint": "^5.18.0",
"@types/lodash": "^4.14.138",
"@types/node": "^12.7.2",
"tslint": "^5.19.0",
"typescript": "^3.5.3"
}
},
"files": [
"dist/index.js",
"dist/index.d.ts",
"dist/responsesEnum.js",
"dist/responsesEnum.d.ts",
"README.md"
]
}
8 changes: 8 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": { "*": ["types/*"] },
"baseUrl": ".",
"paths": { "*": ["types/*"] },
"baseUrl": ".",
"paths": { "*": ["types/*"] },
"baseUrl": ".",
"paths": { "*": ["types/*"] },
"target": "es6",
"module": "commonjs",
"esModuleInterop": true,
Expand Down
2 changes: 2 additions & 0 deletions types/swagger-ui-koa.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export function serve(ctx: any, next: any): void;
export function setup(swaggerDoc: any, explorer: any, options: any, customCss: any, customfavIcon: any): any;

0 comments on commit 2e9bdbe

Please sign in to comment.