Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate OpenApi 3.0 spec from existing Spring Boot App?

Tags:

People also ask

Is OpenAPI 3.0 backwards compatibility?

OpenAPI 3 is the successor of the widely used OpenAPI/Swagger 2.0 format, for machine-readable API definitions. It contains a variety of changes, and even though everything that can be expressed in Version 2 is supported in Version 3 as well, specifications are not backwards-compatible.

How do I convert to OpenAPI?

Converting to OAS 3.0 All we need to do is open our document in Swagger Editor, then convert by using Edit > Convert to OpenAPI 3. This will replace our document with the OAS 3.0 version. It worked!


I have a project (Spring Boot App + Kotlin) that I would like to have an Open API 3.0 spec for (preferably in YAML). The Springfox libraries are nice but they generate Swagger 2.0 JSON. What is the best way to generate an Open Api 3.0 spec from the annotations in my controllers? Is writing it from scratch the only way?