Skip to main content

Posts

Showing posts from 2021

API first approach with Swagger v3/OpenAPI Specs & Spring Boot

API first approach has a ton of advantage's, it helps developers and functional analysts to visualize the APIs before developers start implementing it. It also helps the UI developers and the testers to start working on their tasks parallelly while developers are busy implementing. In this blog I will explain how to create such API contracts with Swagger 3.0 on OpenAPI specifications (OAS) and using Maven, how can we easily generate Spring Boot code for such contracts. Swagger/OpenAPI contract   The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. An OpenAPI definition can then be used by documentation generation tools to