openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

PR for openapi-generator-maven-plugin inputSpec -- Allow jar: URLs

Open allen-ball opened this issue 4 years ago • 7 comments

This is a PR in response to https://github.com/OpenAPITools/openapi-generator/issues/10016. It changes <inputSpec/> processing to:

  1. Search a classpath of Maven compilation dependencies for resources.
  2. 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 avatar Jul 25 '21 19:07 allen-ball

@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.

setu9760 avatar Sep 02 '22 09:09 setu9760

@allen-ball are you planning to merge this??

nitish-atomic avatar Feb 20 '23 11:02 nitish-atomic

I would also like this feature to be available as fast as is reasonable.

CC007 avatar Apr 06 '23 20:04 CC007

When are we planning to merge this ? This is much needed.

sambhav37 avatar Apr 24 '23 11:04 sambhav37

@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.

obfischer avatar Apr 04 '24 13:04 obfischer

@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.

parenko avatar May 04 '24 22:05 parenko

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.

allen-ball avatar May 05 '24 13:05 allen-ball

closed via https://github.com/OpenAPITools/openapi-generator/pull/18576

wing328 avatar May 21 '24 05:05 wing328