How do I generate a swagger.json within a build step?
I would like to feed swagger-codegen with that to generate a client.
You can make it part of your build step by running an integration test. See instructions of how to do that here. The idea is to use springfox to generate the specification at build time, which u can use to for codegen.
Yeah, I've looked at those but I think it's a little late in the process. I better explain my use case,
what we would like to do is use a swagger-codegen generated java client as the client for the integration tests.
You have a 馃悢and 馃嵆 problem. The only way to do that is for your swagger-code-gen to use the contract generated from the previous build that is cached. At least that way you'll know if the service changes broke the swagger-codegenned client. Once successful you can re-gen the client. Caution: Slippery slope
Most helpful comment
You can make it part of your build step by running an integration test. See instructions of how to do that here. The idea is to use springfox to generate the specification at build time, which u can use to for codegen.