Skip to content

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

Closed
allen-ball wants to merge 17 commits into
OpenAPITools:masterfrom
allen-ball:master
Closed

PR for openapi-generator-maven-plugin inputSpec -- Allow jar: URLs#10037
allen-ball wants to merge 17 commits into
OpenAPITools:masterfrom
allen-ball:master

Conversation

@allen-ball

Copy link
Copy Markdown
Contributor

This is a PR in response to #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 swagger-api/swagger-parser#1592 and swagger-api/swagger-parser#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 allen-ball requested a review from jimschubert as a code owner July 25, 2021 19:36
@allen-ball allen-ball changed the title PR for openapi-generator-maven-plugin inputSpec -- Allow jar: URLs #10016 PR for openapi-generator-maven-plugin inputSpec -- Allow jar: URLs Jul 25, 2021
Comment thread pom.xml
<swagger-core-version>2.1.2</swagger-core-version>
<swagger-parser-groupid>io.swagger.parser.v3</swagger-parser-groupid>
<swagger-parser-version>2.0.26</swagger-parser-version>
<swagger-parser-version>2.0.28-SNAPSHOT</swagger-parser-version>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will need to wait for the 2.0.28 release before merging this enhancement.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that 2.1.12 has already been released

@setu9760

setu9760 commented Sep 2, 2022

Copy link
Copy Markdown

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

@nitish-atomic

Copy link
Copy Markdown

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

@CC007

CC007 commented Apr 6, 2023

Copy link
Copy Markdown

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

@sambhav37

Copy link
Copy Markdown

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

@obfischer

Copy link
Copy Markdown

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

@parenko

parenko commented May 4, 2024

Copy link
Copy Markdown
Contributor

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

@allen-ball

allen-ball commented May 5, 2024 via email

Copy link
Copy Markdown
Contributor Author

@wing328

wing328 commented May 21, 2024

Copy link
Copy Markdown
Member

closed via #18576

@wing328 wing328 closed this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants