Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: what if we have multiple input files? #106

Open
djensen47 opened this issue Feb 10, 2020 · 3 comments
Open

Question: what if we have multiple input files? #106

djensen47 opened this issue Feb 10, 2020 · 3 comments
Labels
question Further information is requested

Comments

@djensen47
Copy link

I'm in a situation where we rely on at least three swagger files for 3rd party APIs that we consume.

What is the recommendation for setting up a gradle file to generate code for three or several dozen swagger files?

Thanks!

@cortinico
Copy link
Collaborator

I'm in a situation where we rely on at least three swagger files for 3rd party APIs that we consume.

Are those swagger files all independent? If that it's the case, then the simplest approach would be to create 3 gradle modules and apply swagger-gradle-codegen on each of the module with a separate input file

@cortinico cortinico added the question Further information is requested label Feb 10, 2020
@djensen47
Copy link
Author

Yeah, they do need to be independent of each other. 😕

Can we turn this question intern a feature request? I think a dozen gradle modules is a bit excessive. 😁

@cortinico
Copy link
Collaborator

Can we turn this question intern a feature request? I think a dozen gradle modules is a bit excessive. 😁

Well, I'd argue that having a dozen modules is actually better than having a single module with 12 input files.

Currently, the generateSwagger is incremental and you can leverage this feature by making sure that you run the generator only for the spec files that actually changed.
Having multiple files as Input of a single task, will most likely result in calling the generator on every single file (even if just one was edited).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants