'Automatic OpenAPI YAML generation

I am working on the backend of a Spring Boot application that uses OpenAPI and Swagger to provide the interface for frontend application via an schema.yml file. When a change is done on the controllers, we use the swagger-ui to get the api-docs JSON, convert it to yaml using the online swagger editor and paste the result in th schema.yml file

Now, I want to automate this so that we can just call a maven task that will automatically generate the yaml file, but I could not find any maven plugin that does this.

Is there a way to automate the generation of the yaml file or do I need to write my own plugin?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source