-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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 #18576
Conversation
bf30b60
to
0d43b21
Compare
can you please also add a test or 2 in https://github.com/OpenAPITools/openapi-generator/blob/master/.github/workflows/maven-plugin-tests.yaml#L44 ? |
Will do so. I have to fix other tests, also. I have so issues to run the build locally. |
81144af
to
3ee767d
Compare
E.g., jar:jar-specific-uri!/spec.yml.
specifications: * URLs of the form jar:jar-specific-uri!/spec.yaml * Resources on the compilation classpath in addition to the existing FILE test case.
else it is a remote URL && url is not empty
69c1d77
to
904c663
Compare
@wing328 instead of adding another pom to https://github.com/OpenAPITools/openapi-generator/blob/master/.github/workflows/maven-plugin-tests.yaml#L44 , I've extended https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-maven-plugin/examples/java-client.xml with another There are also tests in |
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-resolver-provider</artifactId> | ||
<version>3.9.4</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can w use 3.9.6 instead which is the latest stable 3.x version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've aligned it with other maven dependencies. Should I update other references to 3.9.6, also? Or just use a property to reference same maven version and update in another PR?
https://github.com/apache/maven/blob/master/pom.xml#L308
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated maven dependencies to 3.9.6 via same property. Now it is clearer that they belong together updated.
Was introduced with OpenAPITools#7587 could be removed with OpenAPITools#10544
these artifacts are referenced by same ${project.version} in https://github.com/apache/maven/blob/master/pom.xml
@parenko thanks for the PR, which has been merged into the master. |
This is a PR in response to #10016. It changes
<inputSpec/>
processing to: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.
(This is a copy of PR #10037. I've rebased original branch on master, fixed merge conflicts and removed swagger-parser 2.0.28-SNAPSHOT since 2.1.19 is used now)
CC @wing328, @jimschubert