Using OpenAPI to document our RESTful API
Now that we have a RESTful API, we can create a consumer application. We could create an application and just perform HTTP requests. That would require that we provide the consumers with the source code of our application and that they understand it. But what if they are developing their application in a different language and they don’t know Java and Spring Boot? For this reason, OpenAPI was created. OpenAPI is a standard to document RESTful APIs and can be used to generate client applications. It’s widely adopted and is supported by different languages and frameworks. Spring Boot’s support for OpenAPI is excellent.
In this recipe, we’ll learn how to add OpenAPI support to our RESTful API and consume it using the tools provided by OpenAPI.
Getting ready
In this recipe, we will enhance the RESTful API created in the previous recipe. If you haven’t completed the previous recipe, you can find a working...