Skip to content

Commit b8f0eb8

Browse files
committed
feat: add ResponseStatus annotation for non-200 success codes in Quarkus library
1 parent 7fa00b8 commit b8f0eb8

4 files changed

Lines changed: 31 additions & 0 deletions

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List<Mo
353353
if (objs.getOperations().getOperation().stream()
354354
.anyMatch(op -> op.vendorExtensions.containsKey("x-java-success-response-code"))) {
355355
objs.put("hasResponseStatusAnnotations", true);
356+
additionalProperties.put("hasResponseStatusAnnotations", true);
356357
}
357358
}
358359
return objs;

modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@
9090
<groupId>io.quarkus.resteasy.reactive</groupId>
9191
<artifactId>resteasy-reactive</artifactId>
9292
</dependency>
93+
{{/returnJBossResponse}}
94+
{{^returnJBossResponse}}
95+
{{#hasResponseStatusAnnotations}}
96+
<dependency>
97+
<groupId>io.quarkus.resteasy.reactive</groupId>
98+
<artifactId>resteasy-reactive</artifactId>
99+
</dependency>
100+
{{/hasResponseStatusAnnotations}}
93101
{{/returnJBossResponse}}
94102
<dependency>
95103
<groupId>jakarta.ws.rs</groupId>
@@ -104,6 +112,20 @@
104112
</dependency>
105113
{{/useJakartaEe}}
106114
{{^useJakartaEe}}
115+
{{#returnJBossResponse}}
116+
<dependency>
117+
<groupId>io.quarkus.resteasy.reactive</groupId>
118+
<artifactId>resteasy-reactive</artifactId>
119+
</dependency>
120+
{{/returnJBossResponse}}
121+
{{^returnJBossResponse}}
122+
{{#hasResponseStatusAnnotations}}
123+
<dependency>
124+
<groupId>io.quarkus.resteasy.reactive</groupId>
125+
<artifactId>resteasy-reactive</artifactId>
126+
</dependency>
127+
{{/hasResponseStatusAnnotations}}
128+
{{/returnJBossResponse}}
107129
<dependency>
108130
<groupId>javax.ws.rs</groupId>
109131
<artifactId>javax.ws.rs-api</artifactId>

samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@
5454
<groupId>io.quarkus</groupId>
5555
<artifactId>quarkus-smallrye-openapi</artifactId>
5656
</dependency>
57+
<dependency>
58+
<groupId>io.quarkus.resteasy.reactive</groupId>
59+
<artifactId>resteasy-reactive</artifactId>
60+
</dependency>
5761
<dependency>
5862
<groupId>javax.ws.rs</groupId>
5963
<artifactId>javax.ws.rs-api</artifactId>

samples/server/petstore/jaxrs-spec-quarkus-mutiny/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@
5555
<groupId>io.quarkus</groupId>
5656
<artifactId>quarkus-smallrye-openapi</artifactId>
5757
</dependency>
58+
<dependency>
59+
<groupId>io.quarkus.resteasy.reactive</groupId>
60+
<artifactId>resteasy-reactive</artifactId>
61+
</dependency>
5862
<dependency>
5963
<groupId>javax.ws.rs</groupId>
6064
<artifactId>javax.ws.rs-api</artifactId>

0 commit comments

Comments
 (0)