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

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

Closed
wants to merge 17 commits into from

Conversation

allen-ball
Copy link
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 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
@@ -1578,7 +1578,7 @@
<maven.compiler.target>1.8</maven.compiler.target>
<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
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

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
Copy link

setu9760 commented Sep 2, 2022

@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

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

@CC007
Copy link

CC007 commented Apr 6, 2023

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

@sambhav37
Copy link

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

@obfischer
Copy link
Contributor

@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
Copy link
Contributor

parenko commented May 4, 2024

@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
Copy link
Contributor Author

allen-ball commented May 5, 2024 via email

@wing328
Copy link
Member

wing328 commented May 21, 2024

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.

None yet

8 participants