Hello everybody,<p>Currently we are storing our yml-API definition inside of an git repository. Any build which depends on these definitions (e.g. webapp and server) will download the source and genereates the specific necessary code.<p>I asked myself if there could be a better way of distributing these definitions using our internal GitLab CI/CD and package repositories, but I am not sure if this idea would be some kind of an antipattern.<p>My idea is that we could use the GitLab CI/CD to trigger automatic builds/code generations after each change for the different necessary modules. The generated code could be automatically pushed into different package repositories (our internal maven or internal npm package repository). The applications could then just import the generated code by using the pushed modules as dependencies.<p>For me this approach seems good on paper, but as I said before: I am not sure if this is the best way to deal with OpenAPI generated code. I researched a little bit (google and colleagues), but was not able to find a good answer. Maybe someone here could help me figuring out if this approach is a good way to handle it.
Thanks :)