Tell us the extension you're using
Client
I tried this:
summary:
The OpenAPI generator incorrectly uses response wrapper classes (e.g., CreateFruit201Response) instead of actual schema classes (e.g., Fruit) when resolving $ref references in component schemas.
in detail:
I recreated the issue at https://github.com/gunnarpruefer/openapi-client-generator-schema-reference-bug
which is a newly created Quarkus application (3.30.6) sticking to the known Fruits example and using two relevant dependencies only:
- quarkus-openapi-generator
- quarkus-rest-client-jackson
Using all the default settings, application.properties is basically empty.
I provided a custom OpenAPI spec, having just 2 operations (a paged GET and a POST).
The generator creates response wrapper classes for operation responses:
createFruit (201) → CreateFruit201Response
getFruits (200) → FruitPagedResult which incorrectly uses CreateFruit201Response for _list / the items
When processing component schemas like FruitPagedResult.list's items which references #/components/schemas/Fruit, the generator incorrectly resolves it to CreateFruit201Response instead of Fruit.
This happened:
FruitPagedResult having
private List _list = ...
I expected this:
FruitPagedResult having
private List _list = ...
Is there a workaround?
not that I am aware - the issue also exists with quarkus-rest-client-reactive-jackson
How can we try to reproduce the issue?
I recreated the issue at https://github.com/gunnarpruefer/openapi-client-generator-schema-reference-bug
./mvnw compile and inspect the FruitPagedResult from the model package under target.
Anything else?
the demo app has just been created using the latest https://code.quarkus.io/?a=openapi-client-generator-schema-reference-bug&e=io.quarkiverse.openapi.generator%3Aquarkus-openapi-generator&extension-search=openapi
the sample OpenAPI is correct to the best of my knowledge, but correct me if I am wrong.
Output of uname -a or ver
No response
Output of java -version
openjdk version "25" 2025-09-16 OpenJDK Runtime Environment GraalVM CE 25+37.1 (build 25+37-jvmci-b01) OpenJDK 64-Bit Server VM GraalVM CE 25+37.1 (build 25+37-jvmci-b01, mixed mode, sharing)
Quarkus OpenApi version or git rev
3.30.6, OpenAPI version 3.1.0, for quarkus-rest-client-reactive-jackson 3.15.7
Build tool (ie. output of mvnw --version or gradlew --version)
wrapperVersion=3.3.4 distributionType=only-script distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip
Additional information
No response
Community Notes
- Please vote by adding a 👍 reaction to the issue to help us prioritize.
- If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞
Tell us the extension you're using
Client
I tried this:
summary:
The OpenAPI generator incorrectly uses response wrapper classes (e.g.,
CreateFruit201Response) instead of actual schema classes (e.g.,Fruit) when resolving$refreferences in component schemas.in detail:
I recreated the issue at https://github.com/gunnarpruefer/openapi-client-generator-schema-reference-bug
which is a newly created Quarkus application (3.30.6) sticking to the known Fruits example and using two relevant dependencies only:
Using all the default settings, application.properties is basically empty.
I provided a custom OpenAPI spec, having just 2 operations (a paged GET and a POST).
The generator creates response wrapper classes for operation responses:
createFruit(201) →CreateFruit201ResponsegetFruits(200) →FruitPagedResultwhich incorrectly usesCreateFruit201Responsefor _list / the itemsWhen processing component schemas like
FruitPagedResult.list's items which references#/components/schemas/Fruit, the generator incorrectly resolves it toCreateFruit201Responseinstead ofFruit.This happened:
FruitPagedResult having
private List _list = ...
I expected this:
FruitPagedResult having
private List _list = ...
Is there a workaround?
not that I am aware - the issue also exists with quarkus-rest-client-reactive-jackson
How can we try to reproduce the issue?
I recreated the issue at https://github.com/gunnarpruefer/openapi-client-generator-schema-reference-bug
./mvnw compile and inspect the FruitPagedResult from the model package under target.
Anything else?
the demo app has just been created using the latest https://code.quarkus.io/?a=openapi-client-generator-schema-reference-bug&e=io.quarkiverse.openapi.generator%3Aquarkus-openapi-generator&extension-search=openapi
the sample OpenAPI is correct to the best of my knowledge, but correct me if I am wrong.
Output of
uname -aorverNo response
Output of
java -versionopenjdk version "25" 2025-09-16 OpenJDK Runtime Environment GraalVM CE 25+37.1 (build 25+37-jvmci-b01) OpenJDK 64-Bit Server VM GraalVM CE 25+37.1 (build 25+37-jvmci-b01, mixed mode, sharing)
Quarkus OpenApi version or git rev
3.30.6, OpenAPI version 3.1.0, for quarkus-rest-client-reactive-jackson 3.15.7
Build tool (ie. output of
mvnw --versionorgradlew --version)wrapperVersion=3.3.4 distributionType=only-script distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip
Additional information
No response
Community Notes