Name: node-swagger-ui-middleware
Owner: International Business Machines
Description: Node.js Swagger UI middleware
Created: 2016-06-04 18:11:43.0
Updated: 2017-07-23 15:30:21.0
Pushed: 2016-07-01 09:53:37.0
Homepage: null
Size: 404
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This module offers an express middleware for generating a swagger UI from a spec. It provides endpoints for a instance of Swagger UI where mounted. The data for the UI is gathered from the provided object/spec.
Link to Bluemix Public IDS Experiment.
This is one of hundreds of IBM Open Source projects at GitHub.
Contributions are welcome via Pull Requests. Please submit your very first Pull Request against the Developer's Certificate of Origin, adding a line like the following to the end of the file… using your name and email address of course!
Signed-off-by: John Doe john.doe@example.org
/* Creates a swagger API viewer on port 8080 under /swagger, using the spec in spec/swagger-spec.json */
var
express = require("express"),
swaggerSpec = require(path.join(__dirname, "spec", "swagger-spec.json")),
swaggerUi = require("swagger-ui-middleware")
;
var app = express();
app
.use("/swagger", swaggerUi(swaggerSpec))
.listen(8080)
;