Member-only story

Generating and Consuming REST APIs with Spring Boot 2, Angular 7 and Swagger 2

Imagine you want to integrate backend APIs or third party APIs with minimal effort, how do you pull it off?

Swathi Prasad
9 min readApr 22, 2019

--

Integrating Backend APIs manually can be time consuming and error-prone. Hence, Swagger comes into picture. Swagger is the most popular framework to generate and consume OpenAPI specification. The tool greatly relieves the burden of documenting and interacting with APIs.

In this article, we are going to generate API documentation from Spring Boot REST API and generate Angular API client from the documentation using Swagger.

Tools and Technologies Used

  • Spring Boot — 2.1.4.RELEASE
  • JDK — OpenJDK 12
  • Spring Framework — 5.1.6 RELEASE
  • JPA
  • Hibernate
  • H2 in-memory database
  • Swagger — 2
  • springfox-swagger2–2.9.4
  • springfox-swagger-ui — 2.9.4
  • Swagger Codegen CLI — 2.4.4
  • IDE — IntelliJ and Visual Studio Code
  • Angular CLI — 7.2.0
  • Node — 8.11.3

--

--

Swathi Prasad
Swathi Prasad

Written by Swathi Prasad

Software architect and developer living in Germany. Sharing my opinion and what I learn.

Responses (8)