Tutorial on Creating RESTful API using Swagger

Written on June 10, 2016

I found one of the best tutorial on using Swagger to write RESTful API using Node.js. It covers end to end CRUD (Create, Read, Update, Delete) cycle. This tutorial is written by Samuela Zara on scotch.io and provides step by step instructions to create Restful API to manage movies collection.

If you haven’t heard of Swagger, it’s an open API initiative aimed at making powerful, consistent and sharable definitions of RESTful APIs. It offers interactive documentation, client side SDK generation and discoverability so that your APIs are easily discovered, described and used by developers.

In this tutorial Samuela starts of with setting up Swagger module for Node.js, then uses the mock mode feature, which helps you start off with the APIs setup without writing single line of code. Once the structure is in place then you implement APIs for Get movie, Update movie, Add movie and Delete movie.

You can find this tutorial here at - Restful API in Node.js using Swagger.

More references on learning swagger:

  1. Swagger
  2. Writing Open API with Swagger
  3. Visualization OPenAPI Specs

Enjoy!!!