Server Generation #1040
Replies: 6 comments 3 replies
-
@carlesarnal can you pleae take a look? |
Beta Was this translation helpful? Give feedback.
-
I was able to get this to work with a very basic set-up, but it doesn't seem to meet my needs. I have some external refs like
that this plugin seems unable to resolve. I am getting the following errors when I try: Server Stack Trace: These get written out to target/classes/generated-sources/jaxrs/PROJECT_GENERATION_FAILED.txt To workaround this I was trying to pre-process my spec via:
This works, and properly resolves the refs but when I try to update my config to use the outputted file:
I get the following: |
Beta Was this translation helpful? Give feedback.
-
I was trying this version because I recently upgraded Quarkus. I am going to revert back to 2.2.16 of quarkus-openapi-generator which even though it is generating a client seems to work well enough for the server. |
Beta Was this translation helpful? Give feedback.
-
Hi @dmarginian let's by part. I do not know if you know but the The config between those extension are not equal, the default |
Beta Was this translation helpful? Give feedback.
-
@mcruzdev, thank you for your time. I was able to get everything working by making some changes to the refs in my openapi spec. I took a look at the source and it seems like apicuriou either doesn't expose a lot or does not have a lot of features. Because this extension is quite limited in the configuration options available, I am going to have to look into using openapi-generator directly. For example, I want to build my controllers via the tags property (this exists on the jaxrs-resteasy generator in openapi generator). I also want to use a specific dateLibrary, add some custom annotations, etc. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, does this server generation work?
https://docs.quarkiverse.io/quarkus-openapi-generator/dev/server.html
Contrary to this page, published artifacts exist, I am trying to use 2.8.2-lts (I have tried a few other versions too).
My setup:
In my application.yml, I have tried several variations of the config (guide says it should be quarkus.openapi.generator.spec):
The above config seems to partially work. But, I have the input-base-dir set as target/openapi/combined (exists) but something is appending src/main/resources ...
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:3.19.2:generate-code (default) on project mp-backend: Quarkus code generation phase has failed: InvocationTargetException: The OpenAPI input base directory does not exist. Please create the directory at /Users/davidmarginian/projects/Marketplace-Backend/target/openapi/combined/src/main/resources -> [Help 1]
If I switch my dependency to:
and build (the client), everything works fine with the following config (per the client guide):
I am not sure if the documentation/guide is out of date or if this isn't supposed to work yet. I am happy to update the guide if this is supposed to work.
Beta Was this translation helpful? Give feedback.
All reactions