Skip to content

Commit 30ea37b

Browse files
committed
feat: add ResponseStatus annotation for non-200 success codes in Quarkus library
1 parent e88b802 commit 30ea37b

10 files changed

Lines changed: 76 additions & 0 deletions

File tree

samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/PetApi.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212

1313

14+
1415
import java.io.InputStream;
1516
import java.util.Map;
1617
import java.util.List;
@@ -72,6 +73,7 @@ public Response addPet(@Valid @NotNull Pet pet) {
7273
return Response.ok().entity("magic!").build();
7374
}
7475

76+
7577
@DELETE
7678
@Path("/{petId}")
7779
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@@ -88,6 +90,7 @@ public Response deletePet(@PathParam("petId") @org.eclipse.microprofile.openapi.
8890
return Response.ok().entity("magic!").build();
8991
}
9092

93+
9194
@GET
9295
@Path("/findByStatus")
9396
@Produces({ "application/xml", "application/json" })
@@ -110,6 +113,7 @@ public Response findPetsByStatus(@QueryParam("status") @NotNull @org.eclipse.mi
110113
return Response.ok().entity("magic!").build();
111114
}
112115

116+
113117
@GET
114118
@Path("/findByTags")
115119
@Produces({ "application/xml", "application/json" })
@@ -132,6 +136,7 @@ public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microp
132136
return Response.ok().entity("magic!").build();
133137
}
134138

139+
135140
@GET
136141
@Path("/{petId}")
137142
@Produces({ "application/xml", "application/json" })
@@ -158,6 +163,7 @@ public Response getPetById(@PathParam("petId") @org.eclipse.microprofile.openapi
158163
return Response.ok().entity("magic!").build();
159164
}
160165

166+
161167
@PUT
162168
@Consumes({ "application/json", "application/xml" })
163169
@Produces({ "application/xml", "application/json" })
@@ -188,6 +194,7 @@ public Response updatePet(@Valid @NotNull Pet pet) {
188194
return Response.ok().entity("magic!").build();
189195
}
190196

197+
191198
@POST
192199
@Path("/{petId}")
193200
@Consumes({ "application/x-www-form-urlencoded" })
@@ -205,6 +212,7 @@ public Response updatePetWithForm(@PathParam("petId") @org.eclipse.microprofile.
205212
return Response.ok().entity("magic!").build();
206213
}
207214

215+
208216
@POST
209217
@Path("/{petId}/uploadImage")
210218
@Consumes({ "multipart/form-data" })
@@ -222,4 +230,5 @@ public Response updatePetWithForm(@PathParam("petId") @org.eclipse.microprofile.
222230
public Response uploadFile(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream) {
223231
return Response.ok().entity("magic!").build();
224232
}
233+
225234
}

samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/StoreApi.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111

1212

13+
1314
import java.io.InputStream;
1415
import java.util.Map;
1516
import java.util.List;
@@ -66,6 +67,7 @@ public Response deleteOrder(@PathParam("orderId") @org.eclipse.microprofile.open
6667
return Response.ok().entity("magic!").build();
6768
}
6869

70+
6971
@GET
7072
@Path("/inventory")
7173
@Produces({ "application/json" })
@@ -83,6 +85,7 @@ public Response getInventory() {
8385
return Response.ok().entity("magic!").build();
8486
}
8587

88+
8689
@GET
8790
@Path("/order/{orderId}")
8891
@Produces({ "application/xml", "application/json" })
@@ -107,6 +110,7 @@ public Response getOrderById(@PathParam("orderId") @Min(1L) @Max(5L) @org.eclips
107110
return Response.ok().entity("magic!").build();
108111
}
109112

113+
110114
@POST
111115
@Path("/order")
112116
@Consumes({ "application/json" })
@@ -127,4 +131,5 @@ public Response getOrderById(@PathParam("orderId") @Min(1L) @Max(5L) @org.eclips
127131
public Response placeOrder(@Valid @NotNull Order order) {
128132
return Response.ok().entity("magic!").build();
129133
}
134+
130135
}

samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/UserApi.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111

1212

13+
1314
import java.io.InputStream;
1415
import java.util.Map;
1516
import java.util.List;
@@ -65,6 +66,7 @@ public Response createUser(@Valid @NotNull User user) {
6566
return Response.ok().entity("magic!").build();
6667
}
6768

69+
6870
@POST
6971
@Path("/createWithArray")
7072
@Consumes({ "application/json" })
@@ -82,6 +84,7 @@ public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user
8284
return Response.ok().entity("magic!").build();
8385
}
8486

87+
8588
@POST
8689
@Path("/createWithList")
8790
@Consumes({ "application/json" })
@@ -99,6 +102,7 @@ public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user)
99102
return Response.ok().entity("magic!").build();
100103
}
101104

105+
102106
@DELETE
103107
@Path("/{username}")
104108
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@@ -118,6 +122,7 @@ public Response deleteUser(@PathParam("username") @org.eclipse.microprofile.open
118122
return Response.ok().entity("magic!").build();
119123
}
120124

125+
121126
@GET
122127
@Path("/{username}")
123128
@Produces({ "application/xml", "application/json" })
@@ -142,6 +147,7 @@ public Response getUserByName(@PathParam("username") @org.eclipse.microprofile.o
142147
return Response.ok().entity("magic!").build();
143148
}
144149

150+
145151
@GET
146152
@Path("/login")
147153
@Produces({ "application/xml", "application/json" })
@@ -166,6 +172,7 @@ public Response loginUser(@QueryParam("username") @NotNull @Pattern(regexp="^[a-
166172
return Response.ok().entity("magic!").build();
167173
}
168174

175+
169176
@GET
170177
@Path("/logout")
171178
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@@ -182,6 +189,7 @@ public Response logoutUser() {
182189
return Response.ok().entity("magic!").build();
183190
}
184191

192+
185193
@PUT
186194
@Path("/{username}")
187195
@Consumes({ "application/json" })
@@ -201,4 +209,5 @@ public Response logoutUser() {
201209
public Response updateUser(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="name that need to be deleted") String username,@Valid @NotNull User user) {
202210
return Response.ok().entity("magic!").build();
203211
}
212+
204213
}

samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/AnotherFakeApi.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010

1111

12+
1213
import java.io.InputStream;
1314
import java.util.Map;
1415
import java.util.List;
@@ -78,4 +79,5 @@ public class AnotherFakeApi {
7879
public Response call123testSpecialTags(@Valid @NotNull Client client) {
7980
return Response.ok().entity("magic!").build();
8081
}
82+
8183
}

samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/FakeApi.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626

2727

28+
2829
import java.io.InputStream;
2930
import java.util.Map;
3031
import java.util.List;
@@ -95,6 +96,7 @@ public Response fakeBigDecimalMap() {
9596
return Response.ok().entity("magic!").build();
9697
}
9798

99+
98100
@GET
99101
@Path("/health")
100102
@Produces({ "application/json" })
@@ -110,6 +112,7 @@ public Response fakeHealthGet() {
110112
return Response.ok().entity("magic!").build();
111113
}
112114

115+
113116
@GET
114117
@Path("/http-signature-test")
115118
@Consumes({ "application/json", "application/xml" })
@@ -127,6 +130,7 @@ public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query
127130
return Response.ok().entity("magic!").build();
128131
}
129132

133+
130134
@POST
131135
@Path("/outer/boolean")
132136
@Consumes({ "application/json" })
@@ -143,6 +147,7 @@ public Response fakeOuterBooleanSerialize(@Valid Boolean body) {
143147
return Response.ok().entity("magic!").build();
144148
}
145149

150+
146151
@POST
147152
@Path("/outer/composite")
148153
@Consumes({ "application/json" })
@@ -159,6 +164,7 @@ public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite
159164
return Response.ok().entity("magic!").build();
160165
}
161166

167+
162168
@POST
163169
@Path("/outer/number")
164170
@Consumes({ "application/json" })
@@ -175,6 +181,7 @@ public Response fakeOuterNumberSerialize(@Valid BigDecimal body) {
175181
return Response.ok().entity("magic!").build();
176182
}
177183

184+
178185
@POST
179186
@Path("/outer/string")
180187
@Consumes({ "application/json" })
@@ -191,6 +198,7 @@ public Response fakeOuterStringSerialize(@Valid String body) {
191198
return Response.ok().entity("magic!").build();
192199
}
193200

201+
194202
@POST
195203
@Path("/property/enum-int")
196204
@Consumes({ "application/json" })
@@ -207,6 +215,7 @@ public Response fakePropertyEnumIntegerSerialize(@Valid @NotNull OuterObjectWith
207215
return Response.ok().entity("magic!").build();
208216
}
209217

218+
210219
@POST
211220
@Path("/additionalProperties-reference")
212221
@Consumes({ "application/json" })
@@ -222,6 +231,7 @@ public Response testAdditionalPropertiesReference(@Valid @NotNull Map<String, Ob
222231
return Response.ok().entity("magic!").build();
223232
}
224233

234+
225235
@PUT
226236
@Path("/body-with-binary")
227237
@Consumes({ "image/png" })
@@ -237,6 +247,7 @@ public Response testBodyWithBinary(@Valid File body) {
237247
return Response.ok().entity("magic!").build();
238248
}
239249

250+
240251
@PUT
241252
@Path("/body-with-file-schema")
242253
@Consumes({ "application/json" })
@@ -252,6 +263,7 @@ public Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass fileS
252263
return Response.ok().entity("magic!").build();
253264
}
254265

266+
255267
@PUT
256268
@Path("/body-with-query-params")
257269
@Consumes({ "application/json" })
@@ -267,6 +279,7 @@ public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String q
267279
return Response.ok().entity("magic!").build();
268280
}
269281

282+
270283
@PATCH
271284
@Consumes({ "application/json" })
272285
@Produces({ "application/json" })
@@ -282,6 +295,7 @@ public Response testClientModel(@Valid @NotNull Client client) {
282295
return Response.ok().entity("magic!").build();
283296
}
284297

298+
285299
@POST
286300
@Consumes({ "application/x-www-form-urlencoded" })
287301
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@@ -301,6 +315,7 @@ public Response testEndpointParameters(@FormParam(value = "number") BigDecimal
301315
return Response.ok().entity("magic!").build();
302316
}
303317

318+
304319
@GET
305320
@Consumes({ "application/x-www-form-urlencoded" })
306321

@@ -318,6 +333,7 @@ public Response testEnumParameters(@HeaderParam("enum_header_string_array") @o
318333
return Response.ok().entity("magic!").build();
319334
}
320335

336+
321337
@DELETE
322338
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
323339
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "bearer_test")
@@ -333,6 +349,7 @@ public Response testGroupParameters(@QueryParam("required_string_group") @NotNul
333349
return Response.ok().entity("magic!").build();
334350
}
335351

352+
336353
@POST
337354
@Path("/inline-additionalProperties")
338355
@Consumes({ "application/json" })
@@ -348,6 +365,7 @@ public Response testInlineAdditionalProperties(@Valid @NotNull Map<String, Strin
348365
return Response.ok().entity("magic!").build();
349366
}
350367

368+
351369
@POST
352370
@Path("/inline-freeform-additionalProperties")
353371
@Consumes({ "application/json" })
@@ -363,6 +381,7 @@ public Response testInlineFreeformAdditionalProperties(@Valid @NotNull TestInlin
363381
return Response.ok().entity("magic!").build();
364382
}
365383

384+
366385
@GET
367386
@Path("/jsonFormData")
368387
@Consumes({ "application/x-www-form-urlencoded" })
@@ -378,6 +397,7 @@ public Response testJsonFormData(@FormParam(value = "param") String param,@Form
378397
return Response.ok().entity("magic!").build();
379398
}
380399

400+
381401
@POST
382402
@Path("/nullable")
383403
@Consumes({ "application/json" })
@@ -393,6 +413,7 @@ public Response testNullable(@Valid @NotNull ChildWithNullable childWithNullable
393413
return Response.ok().entity("magic!").build();
394414
}
395415

416+
396417
@PUT
397418
@Path("/test-query-parameters")
398419

@@ -407,6 +428,7 @@ public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull
407428
return Response.ok().entity("magic!").build();
408429
}
409430

431+
410432
@POST
411433
@Path("/stringMap-reference")
412434
@Consumes({ "application/json" })
@@ -422,6 +444,7 @@ public Response testStringMapReference(@Valid @NotNull Map<String, String> reque
422444
return Response.ok().entity("magic!").build();
423445
}
424446

447+
425448
@POST
426449
@Path("/{petId}/uploadImageWithRequiredFile")
427450
@Consumes({ "multipart/form-data" })
@@ -439,4 +462,5 @@ public Response testStringMapReference(@Valid @NotNull Map<String, String> reque
439462
public Response uploadFileWithRequiredFile(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) {
440463
return Response.ok().entity("magic!").build();
441464
}
465+
442466
}

samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010

1111

12+
1213
import java.io.InputStream;
1314
import java.util.Map;
1415
import java.util.List;
@@ -80,4 +81,5 @@ public class FakeClassnameTestApi {
8081
public Response testClassname(@Valid @NotNull Client client) {
8182
return Response.ok().entity("magic!").build();
8283
}
84+
8385
}

0 commit comments

Comments
 (0)