I'm working on an API (Spring Boot) that is somewhat legacy - it is using openapi version 2.0 and it also uses the swagger-codegen-maven-plugin plugin in the pom.xml.
I recently did a LinkedIn learning course where we used the Swagger Editor (locally using Docker) to write the api specification (openapi 3.0) and "export" the Server Stub in any language of your choosing, in this case Java Spring. I noticed the API classes that the Controllers implement were already generated in this stub. However, when using the swagger-codegen-maven-plugin, these interfaces aren't generated until you compile the project (mvn install), the same goes with the schemas for any data structures you define, for say, your request body in the "definitions" section of the swagger yaml.
I wanted to inquire what is the preferred method here to build the API - is it to use the Swagger editor via the web GUI or locally and write the specification in YAML then export the Server Stub in the language/framework of your choice OR is it to manually write some of the classes locally (Even if you add the swagger yaml, it still looks like you have to write the code for the Controllers etc.. using this method, please correct me if I'm wrong) i.e. IntelliJ using Spring, then add the swagger-codegen-maven-plugin to your project and have it generate the interfaces/concrete classes for you?