Quantcast
Channel: REST API Versioning with Swagger 2.0 - Stack Overflow
Viewing all articles
Browse latest Browse all 2

REST API Versioning with Swagger 2.0

$
0
0

I needed my Node REST API's to be versioned. I am using swagger 2.0 for the validation middleware and documentation. Currently i have only a single swagger yml file that is used for all purposed.

I am using url prefixes (version number: /v1/... /v2/... etc) to support versioning in my Node Rest API. And i need to support multiple versions at any point of time.

  1. Should i create a separate swagger yml file for each API version? If yes, how to load/manage multiple swagger yml files in the swagger-validation middleware
  2. Does Swagger 2.0 format specification allow definition of versioned paths within the same file.

Viewing all articles
Browse latest Browse all 2

Trending Articles