-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add server extension #482
Add server extension #482
Conversation
@ricardozanini this is the extension wrapping the Apicurio codegen feature for generating server stubs. I'm opening this in draft so we can discuss what's the best structure since I believe the submitted one is not the best possible (maybe having two folders |
.../java/io/quarkiverse/openapi/server/generator/deployment/codegen/ApicurioCodegenWrapper.java
Dismissed
Show dismissed
Hide dismissed
.../java/io/quarkiverse/openapi/server/generator/deployment/codegen/ApicurioCodegenWrapper.java
Fixed
Show fixed
Hide fixed
@carlesarnal I think we can have a |
Sorry for the late reply, I've been off for a while. Ok, do you want me to go ahead and do the refactor (essentially moving everything into a Thanks! |
e83201a
to
2130cfb
Compare
@ricardozanini I have rebased main on this PR and created a separate |
1b35f5f
to
8353724
Compare
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.
Thanks @carlesarnal! Yeah, I believe we are on the right path.
8353724
to
fd20ddd
Compare
f7b5410
to
1a0cf2e
Compare
@ricardozanini CI is green and I have added the client pom. I think this is ready to go, let me know what you think. Thanks! |
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.
Looks great! I'm just missing the docs, otherwise I think we are good to go.
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 wonder if the client
directory will get the changes from the main branch. If that's not the case, we will lose the most recent changes when we merge this PR.
Edit: Yes, it seems it gets the most recent commits when we pull main
into this one.
3513a7d#diff-d54746b4518200dc549c201682ea7f5441abfe3aa9f26cb6768995f6dd2d83ab
Also, we need to backport this to the quarkus2
branch, otherwise, it will become a nightmare backporting other changes to quarkus2
. I believe this backport will not be as smooth as usual, so I think rather than backporting it after the merge, as we usually do, we should have two simultaneous PRs and merge both only when all tests are passing.
@hbelmiro or we can wait to merge this one until we drop quarkus 2, which will be soon, likely in 3 weeks maybe. wdyt? @carlesarnal cc |
I think that probably makes more sense than having to backport this to quarkus2. |
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.
Lets keep the existing client pom artifacts ids existing names to avoid backward compatibiity issues.
Everything else looks superb. Fantastic work, congrats.
I have updated this PR from the changes from main so being outdated does not prevent it from being merged. If anything else is needed just let me know. |
Co-authored-by: Matheus Cruz <56329339+mcruzdev@users.noreply.github.com>
5c0c429
to
869b328
Compare
Co-authored-by: Matheus Cruz <56329339+mcruzdev@users.noreply.github.com>
Sorry, I was on PTO. @ricardozanini rebase done and issue created. Let me know if anything else is needed. |
@allcontributors please add @carlesarnal for maintenance |
I've put up a pull request to add @carlesarnal! 🎉 |
@hbelmiro @mcruzdev I'd like to give this a try as a user. What's the next planned release? Am I right in the assumption that I would see an entry called I'm building with // file: build.gradle
dependencies {
// [...]
implementation "io.quarkiverse.openapi.generator:quarkus-openapi-generator-server:3.0.0-SNAPSHOT"
} But the build failed with this: $ ./gradlew clean build
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':compileJava'.
> Could not resolve all dependencies for configuration ':quarkusDependency'.
> Could not find io.quarkiverse.openapi.generator:quarkus-openapi-generator-server:3.0.0-SNAPSHOT.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/io/quarkiverse/openapi/generator/quarkus-openapi-generator-server/3.0.0-SNAPSHOT/maven-metadata.xml
- https://repo.maven.apache.org/maven2/io/quarkiverse/openapi/generator/quarkus-openapi-generator-server/3.0.0-SNAPSHOT/quarkus-openapi-generator-server-3.0.0-SNAPSHOT.pom
- file:/Users/markus/.m2/repository/io/quarkiverse/openapi/generator/quarkus-openapi-generator-server/3.0.0-SNAPSHOT/maven-metadata.xml
- file:/Users/markus/.m2/repository/io/quarkiverse/openapi/generator/quarkus-openapi-generator-server/3.0.0-SNAPSHOT/quarkus-openapi-generator-server-3.0.0-SNAPSHOT.pom
[...] |
@carlesarnal can you give us a hand? |
@markuszoeller many thanks for being the guinea pig. :) So if we have a trusted stable codebase for the server plugin, I can release a major version. |
I'll look at this ASAP. |
@markuszoeller Until there is a new release making the artifact available in maven central as you described, you need the artifact to be present in your local repository. If you add the dependency straight to a |
This worked for me, thank you! The generated code looks very good so far. We probably test this over the next weeks. If I notice something odd then I'm going to open a GH Issue. |
The generated code included lines such as the one below, where "Schema-" is an extra, and therefore doesn't compile: |
Hello @ygyg70 if you have a problem, please, open a new issue (this is the PR for introducing the support). Also, be sure to include some information to reproduce the problem. |
Many thanks for submitting your Pull Request ❤️!
Generating server stubs from OpenAPI definitions.
This PR adds support for generating server stubs from the OpenAPI definition.