Skip to content

Commit b13fe92

Browse files
committed
Refactored to address bug and simplify testing
1 parent 2258481 commit b13fe92

11 files changed

Lines changed: 67 additions & 67 deletions

File tree

docs/generators/jaxrs-cxf-cdi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
8282
|title|a title describing the application| |OpenAPI Server|
8383
|useBeanValidation|Use BeanValidation API annotations| |true|
8484
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
85-
|useJakartaSecurityAnnotations|Whether to generate Jakarta security annotations (@RolesAllowed, @PermitAll). Currently only supported when library is set to quarkus.| |false|
85+
|useJakartaSecurityAnnotations|Whether to generate Jakarta security annotations (@RolesAllowed, @PermitAll). Requires useJakartaEe=true. Currently only supported when library is set to quarkus.| |false|
8686
|useMicroProfileOpenAPIAnnotations|Whether to generate Microprofile OpenAPI annotations. Only valid when library is set to quarkus.| |false|
8787
|useMutiny|Whether to use Smallrye Mutiny instead of CompletionStage for asynchronous computation. Only valid when library is set to quarkus.| |false|
8888
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public class PetApi {
6666
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
6767
})
6868
})
69-
public Response addPet(@Valid @NotNull Pet pet) {
69+
public Response addPet(@Valid @NotNull Pet pet) {
7070
return Response.ok().entity("magic!").build();
7171
}
7272

@@ -83,7 +83,7 @@ public Response addPet(@Valid @NotNull Pet pet) {
8383

8484
})
8585
})
86-
public Response deletePet(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Pet id to delete") Long petId) {
86+
public Response deletePet(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Pet id to delete") Long petId) {
8787
return Response.ok().entity("magic!").build();
8888
}
8989

@@ -106,7 +106,7 @@ public Response deletePet(@PathParam("petId") @org.eclipse.microprofile.openapi.
106106
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
107107
})
108108
})
109-
public Response findPetsByStatus(@Deprecated @QueryParam("status") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Status values that need to be considered for filter") List<String> status) {
109+
public Response findPetsByStatus(@Deprecated @QueryParam("status") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Status values that need to be considered for filter") List<String> status) {
110110
return Response.ok().entity("magic!").build();
111111
}
112112

@@ -130,7 +130,7 @@ public Response findPetsByStatus(@Deprecated @QueryParam("status") @NotNull @or
130130
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
131131
})
132132
})
133-
public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Tags to filter by") List<String> tags) {
133+
public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Tags to filter by") List<String> tags) {
134134
return Response.ok().entity("magic!").build();
135135
}
136136

@@ -157,7 +157,7 @@ public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microp
157157
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
158158
})
159159
})
160-
public Response getPetById(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to return") Long petId) {
160+
public Response getPetById(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to return") Long petId) {
161161
return Response.ok().entity("magic!").build();
162162
}
163163

@@ -188,7 +188,7 @@ public Response getPetById(@PathParam("petId") @org.eclipse.microprofile.openapi
188188
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
189189
})
190190
})
191-
public Response updatePet(@Valid @NotNull Pet pet) {
191+
public Response updatePet(@Valid @NotNull Pet pet) {
192192
return Response.ok().entity("magic!").build();
193193
}
194194

@@ -206,7 +206,7 @@ public Response updatePet(@Valid @NotNull Pet pet) {
206206

207207
})
208208
})
209-
public Response updatePetWithForm(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) {
209+
public Response updatePetWithForm(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) {
210210
return Response.ok().entity("magic!").build();
211211
}
212212

@@ -225,7 +225,7 @@ public Response updatePetWithForm(@PathParam("petId") @org.eclipse.microprofile.
225225
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = ModelApiResponse.class))
226226
})
227227
})
228-
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) {
228+
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) {
229229
return Response.ok().entity("magic!").build();
230230
}
231231

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class StoreApi {
6060

6161
})
6262
})
63-
public Response deleteOrder(@PathParam("orderId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of the order that needs to be deleted") String orderId) {
63+
public Response deleteOrder(@PathParam("orderId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of the order that needs to be deleted") String orderId) {
6464
return Response.ok().entity("magic!").build();
6565
}
6666

@@ -78,7 +78,7 @@ public Response deleteOrder(@PathParam("orderId") @org.eclipse.microprofile.open
7878
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Map.class))
7979
})
8080
})
81-
public Response getInventory() {
81+
public Response getInventory() {
8282
return Response.ok().entity("magic!").build();
8383
}
8484

@@ -103,7 +103,7 @@ public Response getInventory() {
103103
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
104104
})
105105
})
106-
public Response getOrderById(@PathParam("orderId") @Min(1L) @Max(5L) @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be fetched") Long orderId) {
106+
public Response getOrderById(@PathParam("orderId") @Min(1L) @Max(5L) @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be fetched") Long orderId) {
107107
return Response.ok().entity("magic!").build();
108108
}
109109

@@ -125,7 +125,7 @@ public Response getOrderById(@PathParam("orderId") @Min(1L) @Max(5L) @org.eclips
125125
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
126126
})
127127
})
128-
public Response placeOrder(@Valid @NotNull Order order) {
128+
public Response placeOrder(@Valid @NotNull Order order) {
129129
return Response.ok().entity("magic!").build();
130130
}
131131

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public class UserApi {
5959

6060
})
6161
})
62-
public Response createUser(@Valid @NotNull User user) {
62+
public Response createUser(@Valid @NotNull User user) {
6363
return Response.ok().entity("magic!").build();
6464
}
6565

@@ -77,7 +77,7 @@ public Response createUser(@Valid @NotNull User user) {
7777

7878
})
7979
})
80-
public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user) {
80+
public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user) {
8181
return Response.ok().entity("magic!").build();
8282
}
8383

@@ -95,7 +95,7 @@ public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user
9595

9696
})
9797
})
98-
public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) {
98+
public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) {
9999
return Response.ok().entity("magic!").build();
100100
}
101101

@@ -115,7 +115,7 @@ public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user)
115115

116116
})
117117
})
118-
public Response deleteUser(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be deleted") String username) {
118+
public Response deleteUser(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be deleted") String username) {
119119
return Response.ok().entity("magic!").build();
120120
}
121121

@@ -140,7 +140,7 @@ public Response deleteUser(@PathParam("username") @org.eclipse.microprofile.open
140140
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
141141
})
142142
})
143-
public Response getUserByName(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be fetched. Use user1 for testing.") String username) {
143+
public Response getUserByName(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be fetched. Use user1 for testing.") String username) {
144144
return Response.ok().entity("magic!").build();
145145
}
146146

@@ -165,7 +165,7 @@ public Response getUserByName(@PathParam("username") @org.eclipse.microprofile.o
165165
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
166166
})
167167
})
168-
public Response loginUser(@QueryParam("username") @NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The user name for login") String username,@QueryParam("password") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The password for login in clear text") String password) {
168+
public Response loginUser(@QueryParam("username") @NotNull @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The user name for login") String username,@QueryParam("password") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The password for login in clear text") String password) {
169169
return Response.ok().entity("magic!").build();
170170
}
171171

@@ -182,7 +182,7 @@ public Response loginUser(@QueryParam("username") @NotNull @Pattern(regexp="^[a-
182182

183183
})
184184
})
185-
public Response logoutUser() {
185+
public Response logoutUser() {
186186
return Response.ok().entity("magic!").build();
187187
}
188188

@@ -203,7 +203,7 @@ public Response logoutUser() {
203203

204204
})
205205
})
206-
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) {
206+
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) {
207207
return Response.ok().entity("magic!").build();
208208
}
209209

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class AnotherFakeApi {
7373
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class))
7474
})
7575
})
76-
public Response call123testSpecialTags(@Valid @NotNull Client client) {
76+
public Response call123testSpecialTags(@Valid @NotNull Client client) {
7777
return Response.ok().entity("magic!").build();
7878
}
7979

0 commit comments

Comments
 (0)