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
Specify a different root path for files #176
Comments
Go ahead @gwydionmv. I can help with the review. Regarding a filter, we already have something similar implemented but not yet released. |
Nice @hbelmiro , thanks a lot! About that filter using an ignore property, I considered using it but for our use case it's going to be much better having a "positive filter" than a negative one. I also think that it helps towards maintainability specifying which files to use than which not to use. And if not, better having both functionalities and let everyone use the one they prefer 😃 |
@gwydionmv sounds reasonable. |
@gwydionmv, why change the default directory from quarkus.open-api.generator.codegen.include=<expression>
quarkus.open-api.generator.codegen.exclude=<expression> Also, let's design so that Lastly, you can implement your own filtering/source via I'd rather not change the default path via property. |
@ricardozanini I'm working on a project in which we have several products (microservices) that comunicate with each other. We want to use git submodules to share the openapi formats across all of them, and we just need some of the client classes in each of the microservices. That's the reason for both features: changing the base directory to be able to load the files from the submodule, and selecting which files are to be analysed depending on the product (as I said before, it's more maintainable to select the ones we want than the ones we don't). I already aligned the properties to be include/exclude as you said before, I'll open the PR and we can continue the discussion over there. Thanks! |
I'd like to add a new functionality to the generators to allow changing the root path from "src/main/openapi" to a custom one, and also being able to filter which files inside that directory must be used. I've been doing some tests and it could be done with just 2 new optional properties and a couple of new lines in OpenApiGeneratorCodeGenBase.
I found that OpenApiGeneratorStreamCodeGen could potentially achieve something similar but it needs to create a new library to define the new provider.
What do you think? Thanks!
The text was updated successfully, but these errors were encountered: