quarkus-openapi-generator
quarkus-openapi-generator copied to clipboard
Reusable requestBodies not recognized
Predefined request Bodies (components.requestBodies) are ignored when generating Classes.
See: https://swagger.io/docs/specification/v3_0/describing-request-body/describing-request-body/#reusable-bodies and: https://github.com/quarkiverse/quarkus-openapi-generator/blob/main/server/deployment/src/test/resources/openapi/petstore-openapi.yaml#L776
Hence, using
post:
summary: Some Method
requestBody:
$ref: '#/components/requestBodies/PetBody'
results in
@POST
void someMethod();
instead of
@POST
void someMethod(@NotNull PetBody data);
@krisraich which version are you using? Is this the server side version, right?
I use version ~~2.4.7~~ 2.8.0 on Quarkus 3.17.4 with java 17. Yes it's on the server side with the following configuration:
<quarkus.openapi.generator.spec>mySpecs.yml</quarkus.openapi.generator.spec>
<quarkus.openapi.generator.base-package>com.myProject</quarkus.openapi.generator.base-package>
pom dependency:
<dependency>
<groupId>io.quarkiverse.openapi.generator</groupId>
<artifactId>quarkus-openapi-generator-server</artifactId>
<version>2.8.0</version>
</dependency>
I just upgraded from 2.4.7 to 2.8.0 but it still seems not to work
cc @carlesarnal
@ricardozanini @hbelmiro This is being labeled as Stale.
@mcruzdev maybe it's your cup of tea now? :)
Hi @ricardozanini @mcruzdev
just a little bump :)
I'm also experiencing this issue on latest version 2.10.0 using Quarkus 3.22.2 with Java 17.
Hi @clemthi this is my next issue to solve, I think it is a apicurio issue.
Thanks @mcruzdev . I did check at apicurio issues before posting but didn't anything related to this.
Sorry for delay, I am solving it on this pull request https://github.com/Apicurio/apicurio-codegen/pull/343
ASAP we have a new version we will update here.
@ricardozanini @hbelmiro This is being labeled as Stale.
Solved by the latest server release.
@krisraich with you get some problems, please, let me know reopening this issue.