Skip to content

Commit bb49b77

Browse files
committed
updated jaxrs samples
1 parent 84b866a commit bb49b77

File tree

165 files changed

+1017
-961
lines changed

Some content is hidden

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

165 files changed

+1017
-961
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.25-SNAPSHOT
1+
3.0.28-SNAPSHOT

samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/api/DefaultApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ public interface DefaultApi {
3131
@Produces({ "application/json" })
3232
@Operation(summary = "", tags={ })
3333
@ApiResponses(value = {
34-
@ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))) })
34+
@ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class)))) })
3535
public List<String> testMethod();
3636
}

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public interface PetApi {
6161
@Produces({ "application/json" })
6262
@Operation(summary = "", tags={ })
6363
@ApiResponses(value = {
64-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) })
64+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) })
6565
public ModelApiResponse doCategoryStuff(SubCategory body);
6666

6767
/**
@@ -75,7 +75,7 @@ public interface PetApi {
7575
@Produces({ "application/json", "application/xml" })
7676
@Operation(summary = "Finds Pets by status", tags={ })
7777
@ApiResponses(value = {
78-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))),
78+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))),
7979
@ApiResponse(responseCode = "400", description = "Invalid status value") })
8080
public List<Pet> findPetsByStatus(@QueryParam("status")List<String> status);
8181

@@ -90,7 +90,7 @@ public interface PetApi {
9090
@Produces({ "application/json", "application/xml" })
9191
@Operation(summary = "Finds Pets by tags", tags={ })
9292
@ApiResponses(value = {
93-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))),
93+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))),
9494
@ApiResponse(responseCode = "400", description = "Invalid tag value") })
9595
public List<Pet> findPetsByTags(@QueryParam("tags")List<String> tags);
9696

@@ -99,7 +99,7 @@ public interface PetApi {
9999
@Produces({ "application/json" })
100100
@Operation(summary = "", tags={ })
101101
@ApiResponses(value = {
102-
@ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) })
102+
@ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) })
103103
public AllPetsResponse getAllPets();
104104

105105
/**
@@ -113,7 +113,7 @@ public interface PetApi {
113113
@Produces({ "application/json", "application/xml" })
114114
@Operation(summary = "Find pet by ID", tags={ })
115115
@ApiResponses(value = {
116-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))),
116+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))),
117117
@ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
118118
@ApiResponse(responseCode = "404", description = "Pet not found") })
119119
public Pet getPetById(@PathParam("petId") Long petId);
@@ -123,7 +123,7 @@ public interface PetApi {
123123
@Produces({ "application/json" })
124124
@Operation(summary = "", tags={ })
125125
@ApiResponses(value = {
126-
@ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) })
126+
@ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) })
127127
public SinglePetResponse getRandomPet();
128128

129129
/**
@@ -162,6 +162,6 @@ public interface PetApi {
162162
@Produces({ "application/json" })
163163
@Operation(summary = "uploads an image", tags={ })
164164
@ApiResponses(value = {
165-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) })
165+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) })
166166
public ModelApiResponse uploadFile(@PathParam("petId") Long petId, Object body);
167167
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public interface StoreApi {
5252
@Produces({ "application/json" })
5353
@Operation(summary = "Returns pet inventories by status", tags={ })
5454
@ApiResponses(value = {
55-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) })
55+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) })
5656
public Map<String, Integer> getInventory();
5757

5858
/**
@@ -66,7 +66,7 @@ public interface StoreApi {
6666
@Produces({ "application/json", "application/xml" })
6767
@Operation(summary = "Find purchase order by ID", tags={ })
6868
@ApiResponses(value = {
69-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))),
69+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))),
7070
@ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
7171
@ApiResponse(responseCode = "404", description = "Order not found") })
7272
public Order getOrderById(@PathParam("orderId") Long orderId);
@@ -81,7 +81,7 @@ public interface StoreApi {
8181
@Produces({ "application/json", "application/xml" })
8282
@Operation(summary = "Place an order for a pet", tags={ })
8383
@ApiResponses(value = {
84-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))),
84+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))),
8585
@ApiResponse(responseCode = "400", description = "Invalid Order") })
8686
public Order placeOrder(Order body);
8787
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public interface UserApi {
8888
@Produces({ "application/json", "application/xml" })
8989
@Operation(summary = "Get user by user name", tags={ })
9090
@ApiResponses(value = {
91-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))),
91+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))),
9292
@ApiResponse(responseCode = "400", description = "Invalid username supplied"),
9393
@ApiResponse(responseCode = "404", description = "User not found") })
9494
public User getUserByName(@PathParam("username") String username);
@@ -102,7 +102,7 @@ public interface UserApi {
102102
@Produces({ "application/json", "application/xml" })
103103
@Operation(summary = "Logs user into the system", tags={ })
104104
@ApiResponses(value = {
105-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))),
105+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
106106
@ApiResponse(responseCode = "400", description = "Invalid username/password supplied") })
107107
public String loginUser(@QueryParam("username")String username, @QueryParam("password")String password);
108108

samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/Body.java renamed to samples/client/petstore/jaxrs-cxf-client/src/gen/java/io/swagger/model/PetPetIdBody.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import com.fasterxml.jackson.annotation.JsonValue;
1414
import com.fasterxml.jackson.annotation.JsonCreator;
1515

16-
public class Body {
16+
public class PetPetIdBody {
1717

1818
@Schema(description = "Updated name of the pet")
1919
/**
@@ -39,7 +39,7 @@ public void setName(String name) {
3939
this.name = name;
4040
}
4141

42-
public Body name(String name) {
42+
public PetPetIdBody name(String name) {
4343
this.name = name;
4444
return this;
4545
}
@@ -57,7 +57,7 @@ public void setStatus(String status) {
5757
this.status = status;
5858
}
5959

60-
public Body status(String status) {
60+
public PetPetIdBody status(String status) {
6161
this.status = status;
6262
return this;
6363
}
@@ -66,7 +66,7 @@ public Body status(String status) {
6666
@Override
6767
public String toString() {
6868
StringBuilder sb = new StringBuilder();
69-
sb.append("class Body {\n");
69+
sb.append("class PetPetIdBody {\n");
7070

7171
sb.append(" name: ").append(toIndentedString(name)).append("\n");
7272
sb.append(" status: ").append(toIndentedString(status)).append("\n");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.25-SNAPSHOT
1+
3.0.28-SNAPSHOT

samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/DefaultApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ public interface DefaultApi {
3333
@Produces({ "application/json" })
3434
@Operation(summary = "", tags={ })
3535
@ApiResponses(value = {
36-
@ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))) })
36+
@ApiResponse(responseCode = "200", description = "peticion realizada con exito", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class)))) })
3737
public List<String> testMethod();
3838
}

samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/PetApi.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public interface PetApi {
6363
@Produces({ "application/json" })
6464
@Operation(summary = "", tags={ "pet" })
6565
@ApiResponses(value = {
66-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) })
66+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) })
6767
public ModelApiResponse doCategoryStuff(@Valid SubCategory body);
6868

6969
/**
@@ -77,7 +77,7 @@ public interface PetApi {
7777
@Produces({ "application/json", "application/xml" })
7878
@Operation(summary = "Finds Pets by status", tags={ "pet" })
7979
@ApiResponses(value = {
80-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))),
80+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))),
8181
@ApiResponse(responseCode = "400", description = "Invalid status value") })
8282
public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status);
8383

@@ -92,7 +92,7 @@ public interface PetApi {
9292
@Produces({ "application/json", "application/xml" })
9393
@Operation(summary = "Finds Pets by tags", tags={ "pet" })
9494
@ApiResponses(value = {
95-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))),
95+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)))),
9696
@ApiResponse(responseCode = "400", description = "Invalid tag value") })
9797
public List<Pet> findPetsByTags(@QueryParam("tags") @NotNull List<String> tags);
9898

@@ -101,7 +101,7 @@ public interface PetApi {
101101
@Produces({ "application/json" })
102102
@Operation(summary = "", tags={ "pet" })
103103
@ApiResponses(value = {
104-
@ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = AllPetsResponse.class))) })
104+
@ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = AllPetsResponse.class))) })
105105
public AllPetsResponse getAllPets();
106106

107107
/**
@@ -115,7 +115,7 @@ public interface PetApi {
115115
@Produces({ "application/json", "application/xml" })
116116
@Operation(summary = "Find pet by ID", tags={ "pet" })
117117
@ApiResponses(value = {
118-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))),
118+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))),
119119
@ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
120120
@ApiResponse(responseCode = "404", description = "Pet not found") })
121121
public Pet getPetById(@PathParam("petId") Long petId);
@@ -125,7 +125,7 @@ public interface PetApi {
125125
@Produces({ "application/json" })
126126
@Operation(summary = "", tags={ "pet" })
127127
@ApiResponses(value = {
128-
@ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(schema = @Schema(implementation = SinglePetResponse.class))) })
128+
@ApiResponse(responseCode = "200", description = "a single random pet", content = @Content(mediaType = "application/json", schema = @Schema(implementation = SinglePetResponse.class))) })
129129
public SinglePetResponse getRandomPet();
130130

131131
/**
@@ -164,6 +164,6 @@ public interface PetApi {
164164
@Produces({ "application/json" })
165165
@Operation(summary = "uploads an image", tags={ "pet" })
166166
@ApiResponses(value = {
167-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) })
167+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))) })
168168
public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Valid Object body);
169169
}

samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/api/StoreApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public interface StoreApi {
5555
@Produces({ "application/json" })
5656
@Operation(summary = "Returns pet inventories by status", tags={ "store" })
5757
@ApiResponses(value = {
58-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) })
58+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Map.class)))) })
5959
public Map<String, Integer> getInventory();
6060

6161
/**
@@ -69,7 +69,7 @@ public interface StoreApi {
6969
@Produces({ "application/json", "application/xml" })
7070
@Operation(summary = "Find purchase order by ID", tags={ "store" })
7171
@ApiResponses(value = {
72-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))),
72+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))),
7373
@ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
7474
@ApiResponse(responseCode = "404", description = "Order not found") })
7575
public Order getOrderById(@PathParam("orderId") @Min(1L) @Max(10L) Long orderId);
@@ -84,7 +84,7 @@ public interface StoreApi {
8484
@Produces({ "application/json", "application/xml" })
8585
@Operation(summary = "Place an order for a pet", tags={ "store" })
8686
@ApiResponses(value = {
87-
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))),
87+
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))),
8888
@ApiResponse(responseCode = "400", description = "Invalid Order") })
8989
public Order placeOrder(@Valid Order body);
9090
}

0 commit comments

Comments
 (0)