Skip to content

Commit d6e3a9f

Browse files
committed
updated samples for jaxrs generators
1 parent b30267e commit d6e3a9f

File tree

89 files changed

+622
-564
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+622
-564
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.28-SNAPSHOT
1+
3.0.35-SNAPSHOT
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.28-SNAPSHOT
1+
3.0.35-SNAPSHOT
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.25-SNAPSHOT
1+
3.0.35-SNAPSHOT

samples/server/petstore/jaxrs-cxf-cdi/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,5 @@
8787

8888
</dependencies>
8989

90+
9091
</project>

samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/AllPetsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class AllPetsApi {
4646
@Produces({ "application/json" })
4747
@Operation(summary = "", description = "", tags={ "pet" })
4848
@ApiResponses(value = {
49-
@ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) })
49+
@ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) })
5050
public Response getAllPets() {
5151
return delegate.getAllPets(securityContext);
5252
}

samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/PetApi.java

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ public class PetApi {
4848

4949
@Operation(summary = "Add a new pet to the store", description = "", security = {
5050
@SecurityRequirement(name = "petstore_auth", scopes = {
51-
"" }) }, tags={ "pet" })
51+
"write:pets",
52+
"read:pets" }) }, tags={ "pet" })
5253
@ApiResponses(value = {
5354
@ApiResponse(responseCode = "405", description = "Invalid input") })
5455
public Response addPet(
@@ -63,7 +64,8 @@ public Response addPet(
6364

6465
@Operation(summary = "Deletes a pet", description = "", security = {
6566
@SecurityRequirement(name = "petstore_auth", scopes = {
66-
"" }) }, tags={ "pet" })
67+
"write:pets",
68+
"read:pets" }) }, tags={ "pet" })
6769
@ApiResponses(value = {
6870
@ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
6971
@ApiResponse(responseCode = "404", description = "Pet not found") })
@@ -81,7 +83,7 @@ public Response deletePet(
8183
@Produces({ "application/json" })
8284
@Operation(summary = "", description = "", tags={ "pet" })
8385
@ApiResponses(value = {
84-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) })
86+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) })
8587
public Response doCategoryStuff(
8688
@Parameter(description = "" ) SubCategory body
8789
) {
@@ -94,9 +96,10 @@ public Response doCategoryStuff(
9496
@Produces({ "application/json", "application/xml" })
9597
@Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = {
9698
@SecurityRequirement(name = "petstore_auth", scopes = {
97-
"" }) }, tags={ "pet" })
99+
"write:pets",
100+
"read:pets" }) }, tags={ "pet" })
98101
@ApiResponses(value = {
99-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))),
102+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))),
100103
@ApiResponse(responseCode = "400", description = "Invalid status value") })
101104
public Response findPetsByStatus( @NotNull
102105
@Parameter(description = "Status values that need to be considered for filter",required=true, schema=@Schema(allowableValues={ "available", "pending", "sold" })
@@ -111,9 +114,10 @@ public Response findPetsByStatus( @NotNull
111114
@Produces({ "application/json", "application/xml" })
112115
@Operation(summary = "Finds Pets by tags", description = "Muliple tags can be provided with comma separated strings. Use\\ \\ tag1, tag2, tag3 for testing.", security = {
113116
@SecurityRequirement(name = "petstore_auth", scopes = {
114-
"" }) }, tags={ "pet" })
117+
"write:pets",
118+
"read:pets" }) }, tags={ "pet" })
115119
@ApiResponses(value = {
116-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))),
120+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))),
117121
@ApiResponse(responseCode = "400", description = "Invalid tag value") })
118122
public Response findPetsByTags( @NotNull
119123
@Parameter(description = "Tags to filter by",required=true) @QueryParam("tags") List<String> tags
@@ -128,7 +132,7 @@ public Response findPetsByTags( @NotNull
128132
@Operation(summary = "Find pet by ID", description = "Returns a single pet", security = {
129133
@SecurityRequirement(name = "api_key") }, tags={ "pet" })
130134
@ApiResponses(value = {
131-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))),
135+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))),
132136
@ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
133137
@ApiResponse(responseCode = "404", description = "Pet not found") })
134138
public Response getPetById(
@@ -143,7 +147,8 @@ public Response getPetById(
143147

144148
@Operation(summary = "Update an existing pet", description = "", security = {
145149
@SecurityRequirement(name = "petstore_auth", scopes = {
146-
"" }) }, tags={ "pet" })
150+
"write:pets",
151+
"read:pets" }) }, tags={ "pet" })
147152
@ApiResponses(value = {
148153
@ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
149154
@ApiResponse(responseCode = "404", description = "Pet not found"),
@@ -160,7 +165,8 @@ public Response updatePet(
160165

161166
@Operation(summary = "Updates a pet in the store with form data", description = "", security = {
162167
@SecurityRequirement(name = "petstore_auth", scopes = {
163-
"" }) }, tags={ "pet" })
168+
"write:pets",
169+
"read:pets" }) }, tags={ "pet" })
164170
@ApiResponses(value = {
165171
@ApiResponse(responseCode = "405", description = "Invalid input") })
166172
public Response updatePetWithForm(
@@ -175,9 +181,10 @@ public Response updatePetWithForm(
175181
@Produces({ "application/json" })
176182
@Operation(summary = "uploads an image", description = "", security = {
177183
@SecurityRequirement(name = "petstore_auth", scopes = {
178-
"" }) }, tags={ "pet" })
184+
"write:pets",
185+
"read:pets" }) }, tags={ "pet" })
179186
@ApiResponses(value = {
180-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) })
187+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) })
181188
public Response uploadFile(
182189
@Parameter(description = "ID of pet to update",required=true) @PathParam("petId") Long petId
183190
,

samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/RandomPetApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class RandomPetApi {
4646
@Produces({ "application/json" })
4747
@Operation(summary = "", description = "", tags={ "pet" })
4848
@ApiResponses(value = {
49-
@ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) })
49+
@ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) })
5050
public Response getRandomPet() {
5151
return delegate.getRandomPet(securityContext);
5252
}

samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/StoreApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public Response deleteOrder( @Min(1L)
6363
@Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = {
6464
@SecurityRequirement(name = "api_key") }, tags={ "store" })
6565
@ApiResponses(value = {
66-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) })
66+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) })
6767
public Response getInventory() {
6868
return delegate.getInventory(securityContext);
6969
}
@@ -74,7 +74,7 @@ public Response getInventory() {
7474
@Produces({ "application/json", "application/xml" })
7575
@Operation(summary = "Find purchase order by ID", description = "For valid response try integer IDs with value >= 1 and <= 10.\\ \\ Other values will generated exceptions", tags={ "store" })
7676
@ApiResponses(value = {
77-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))),
77+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))),
7878
@ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
7979
@ApiResponse(responseCode = "404", description = "Order not found") })
8080
public Response getOrderById( @Min(1L) @Max(10L)
@@ -90,7 +90,7 @@ public Response getOrderById( @Min(1L) @Max(10L)
9090
@Produces({ "application/json", "application/xml" })
9191
@Operation(summary = "Place an order for a pet", description = "", tags={ "store" })
9292
@ApiResponses(value = {
93-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))),
93+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))),
9494
@ApiResponse(responseCode = "400", description = "Invalid Order") })
9595
public Response placeOrder(
9696
@Parameter(description = "order placed for purchasing the pet" ,required=true) Order body

samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/TestApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class TestApi {
4646
@Operation(summary = "", description = "", security = {
4747
@SecurityRequirement(name = "bearer") }, tags={ })
4848
@ApiResponses(value = {
49-
@ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))) })
49+
@ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class)))) })
5050
public Response testMethod() {
5151
return delegate.testMethod(securityContext);
5252
}

samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/api/UserApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public Response deleteUser(
9999
@Produces({ "application/json", "application/xml" })
100100
@Operation(summary = "Get user by user name", description = "", tags={ "user" })
101101
@ApiResponses(value = {
102-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))),
102+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))),
103103
@ApiResponse(responseCode = "400", description = "Invalid username supplied"),
104104
@ApiResponse(responseCode = "404", description = "User not found") })
105105
public Response getUserByName(
@@ -114,7 +114,7 @@ public Response getUserByName(
114114
@Produces({ "application/json", "application/xml" })
115115
@Operation(summary = "Logs user into the system", description = "", tags={ "user" })
116116
@ApiResponses(value = {
117-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))),
117+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
118118
@ApiResponse(responseCode = "400", description = "Invalid username/password supplied") })
119119
public Response loginUser( @NotNull
120120
@Parameter(description = "The user name for login",required=true) @QueryParam("username") String username

0 commit comments

Comments
 (0)