https://github.com/dpecos/rest-swagger-example
Example of a Swagger REST API in Node.js
https://github.com/dpecos/rest-swagger-example
express nodejs rest swagger
Last synced: about 1 month ago
JSON representation
Example of a Swagger REST API in Node.js
- Host: GitHub
- URL: https://github.com/dpecos/rest-swagger-example
- Owner: dpecos
- Created: 2017-09-05T09:48:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-18T07:24:53.000Z (5 months ago)
- Last Synced: 2025-03-25T19:08:30.638Z (about 2 months ago)
- Topics: express, nodejs, rest, swagger
- Language: JavaScript
- Homepage: https://danielpecos.com/2017/09/06/rest-api-with-node-js-and-swagger
- Size: 467 KB
- Stars: 15
- Watchers: 1
- Forks: 13
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
About
=====Project showing how to setup Swagger for a REST API develop with Node.js and Express.
More details in the blog entry: https://danielpecos.com/2017/09/06/rest-api-with-node-js-and-swagger
Installation
============npm install
npm startSwagger documentation - HTML and JSON
===================================* Swagger UI:
http://localhost:3000/api/docs* JSON:
http://localhost:3000/api/docs/json
REST API Endpoints
==================* *GET* http://localhost:3000/api/stocks
* *GET* http://localhost:3000/api/stocks/1
* *POST* http://localhost:3000/api/stocks
* *PUT* http://localhost:3000/api/stocks/1