API-First with Spring WebFlux and OpenAPI Generator

Eric Anicet
14 min readDec 13, 2022

In this story, we’ll explore how to generate codes using the swagger-codegen from the defined OpenAPI file in a spring reactive application.

· What we need
·
Overview
What is API-First?
Why API-First?
·
OpenAPI Specification
·
Spring Webflux Application
·
Test the API
Import OpenAPI definition in insomnia
Test
·
Conclusion
·
References

Teams and organizations continue to embrace an API-first philosophy. — 2022 State of the API Report

In recent years, APIs have become the building blocks of software for companies and organizations. These companies use them to offer new services for their internal or external partners.
Therefore, it is necessary to provide service contracts, with documentation that constitutes an agreement between the different stakeholders.

What we need

  • Spring Boot 3.4+
  • Maven 3.8.+
  • Java 21

--

--

Responses (4)