IBM/node-swagger-ui-middleware

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

IBM Bluemix DevOps Services - node-swagger-ui-middleware

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.

License

The MIT License (MIT)

Contributing

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

USAGE

/* 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)
;

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.