swagger-ui-express
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "swagger-ui-express", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Swagger UI Express", | ||
@@ -12,8 +12,11 @@ "main": "./lib/index.js", | ||
], | ||
"scripts": { | ||
"test": "./node_modules/.bin/mocha test/*" | ||
}, | ||
"keywords": [ | ||
"swagger", | ||
"express", | ||
"ui", | ||
"json", | ||
"documentation" | ||
"swagger", | ||
"express", | ||
"ui", | ||
"json", | ||
"documentation" | ||
], | ||
@@ -24,5 +27,10 @@ "private": false, | ||
}, | ||
"devDependencies": { | ||
"mocha": "2.2.5", | ||
"express": "4.12.2", | ||
"phantom": "2.1.21" | ||
}, | ||
"author": { | ||
"name": "Stephen Scott", | ||
"email": "scottie1984@gmail.com" | ||
"email": "scottie1984@gmail.com" | ||
}, | ||
@@ -29,0 +37,0 @@ "repository": { |
@@ -21,7 +21,26 @@ # Swagger UI Express | ||
Open http://<app_host>:<app_host>/api-docs in your browser to view the documentation. | ||
Open http://`<app_host>`:`<app_port>`/api-docs in your browser to view the documentation. | ||
If you want to set up routing based on the swagger document checkout [swagger-express-router](https://www.npmjs.com/package/swagger-express-router) | ||
## [swagger-jsdoc](https://www.npmjs.com/package/swagger-jsdoc) | ||
If you are using swagger-jsdoc simply pass the swaggerSpec into the setup function: | ||
```javascript | ||
// Initialize swagger-jsdoc -> returns validated swagger spec in json format | ||
const swaggerSpec = swaggerJSDoc(options); | ||
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec)); | ||
``` | ||
## Requirements | ||
* Node v4.2 or above | ||
* Express 4 or above | ||
* Express 4 or above | ||
## Testing | ||
Install phantom | ||
npm install | ||
npm test |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3002330
45
3