openapi-generator
openapi-generator copied to clipboard
PR for openapi-generator-maven-plugin inputSpec -- Allow jar: URLs
This is a PR in response to https://github.com/OpenAPITools/openapi-generator/issues/10016. It changes <inputSpec/> processing to:
- Search a classpath of Maven compilation dependencies for resources.
- Allow URLs of the form jar:jar-file-specific-url!/spec.yaml
In the case that a compilation classpath resource is specified, the resource URL is passed to the swagger-parser OpenAPIV3Parser instead of the <inputSpec/> string since the OpenAPIV3Parser does not have access to the Maven compilation classpath. This requires https://github.com/swagger-api/swagger-parser/issues/1592 and https://github.com/swagger-api/swagger-parser/pull/1593.
modules/openapi-generator-maven-plugin/src/test/java/org/openapitools/codegen/plugin/CodeGenMojoTest.java has been expanded to include tests for resource and URL input specs.
@allen-ball Are you looking to fix the merge conflicts on this MR so it can be be ready to merge ? The dependency spring-parser version is now released.
@allen-ball are you planning to merge this??
I would also like this feature to be available as fast as is reasonable.
When are we planning to merge this ? This is much needed.
@jimschubert Can we support you somehow? This is a top 10 feature, needed very much. Being able to take the spec from classpath would ease the setup of a project as well as sharing specs and lead to an better build structure.
@allen-ball is there any chance you will work on this PR? If not, I've rebased your branch on master, fixed merge conflicts, removed swagger-parser 2.0.28-SNAPSHOT since openapi-generator uses 2.1.19 now, and could create a PR.
Please go ahead and do so — I haven’t been able to find the time to follow up on this.
Thanks!
— Allen
On May 4, 2024, at 3:08 PM, Paul Parenko @.***> wrote:
@allen-ball https://github.com/allen-ball is the any chance you will work on this PR? If not, I've rebased your branch on master https://github.com/parenko/openapi-generator/tree/fix-10016, fixed merge conflicts, removed swagger-parser 2.0.28-SNAPSHOT since openapi-generator uses 2.1.19 https://github.com/OpenAPITools/openapi-generator/blob/master/pom.xml#L1255 now, and could create a PR.
— Reply to this email directly, view it on GitHub https://github.com/OpenAPITools/openapi-generator/pull/10037#issuecomment-2094444715, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMXB7XYH5B47E7WFXOGGMGTZAVL7RAVCNFSM5A62VAWKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBZGQ2DINBXGE2Q. You are receiving this because you were mentioned.
closed via https://github.com/OpenAPITools/openapi-generator/pull/18576