Skip to content

Commit d5bf43b

Browse files
authored
Merge pull request #3511 from wing328/bug/3355
[Java][Spring] fix models with enum properties
2 parents 3dc31ce + 3238fd2 commit d5bf43b

Some content is hidden

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

66 files changed

+2173
-1100
lines changed

bin/spring-all-pestore.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
./bin/spring-cloud-feign-petstore.sh
4+
./bin/spring-stubs.sh
5+
./bin/spring-mvc-petstore-j8-async-server.sh
6+
./bin/springboot-petstore-server.sh
7+
./bin/spring-mvc-petstore-server.sh
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @RequestBody {{{dataType}}} {{paramName}}{{/isBodyParam}}
1+
{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{^isContainer}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{/isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @RequestBody {{{dataType}}} {{paramName}}{{/isBodyParam}}
Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
1+
/**
2+
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
3+
*/
4+
public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {
5+
{{#gson}}
6+
{{#allowableValues}}
7+
{{#enumVars}}
8+
@SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}})
9+
{{{name}}}({{{value}}}){{^-last}},
10+
{{/-last}}{{#-last}};{{/-last}}
11+
{{/enumVars}}
12+
{{/allowableValues}}
13+
{{/gson}}
14+
{{^gson}}
15+
{{#allowableValues}}
16+
{{#enumVars}}
17+
{{{name}}}({{{value}}}){{^-last}},
18+
{{/-last}}{{#-last}};{{/-last}}
19+
{{/enumVars}}
20+
{{/allowableValues}}
21+
{{/gson}}
122

2-
public enum {{{datatypeWithEnum}}} {
3-
{{#allowableValues}}{{#enumVars}}{{{name}}}({{{value}}}){{^-last}},
4-
{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
23+
private {{{datatype}}} value;
524

6-
private String value;
7-
8-
{{{datatypeWithEnum}}}(String value) {
25+
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{datatype}}} value) {
926
this.value = value;
1027
}
1128

1229
@Override
13-
@JsonValue
1430
public String toString() {
15-
return value;
31+
return String.valueOf(value);
1632
}
1733
}
Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1-
public enum {{classname}} {
2-
{{#allowableValues}}{{.}}{{^-last}}, {{/-last}}{{/allowableValues}}
3-
}
1+
/**
2+
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
3+
*/
4+
public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} {
5+
{{#gson}}
6+
{{#allowableValues}}{{#enumVars}}
7+
@SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}})
8+
{{{name}}}({{{value}}}){{^-last}},
9+
{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
10+
{{/gson}}
11+
{{^gson}}
12+
{{#allowableValues}}{{#enumVars}}
13+
{{{name}}}({{{value}}}){{^-last}},
14+
{{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
15+
{{/gson}}
16+
17+
private {{{dataType}}} value;
18+
19+
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) {
20+
this.value = value;
21+
}
22+
23+
@Override
24+
public String toString() {
25+
return String.valueOf(value);
26+
}
27+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#isFormParam}}{{#notFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}} {{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @RequestPart(value="{{paramName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/notFile}}{{#isFile}}@ApiParam(value = "file detail") @RequestPart("file") MultipartFile {{baseName}}{{/isFile}}{{/isFormParam}}
1+
{{#isFormParam}}{{#notFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}} {{^isContainer}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{/isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @RequestPart(value="{{paramName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/notFile}}{{#isFile}}@ApiParam(value = "file detail") @RequestPart("file") MultipartFile {{baseName}}{{/isFile}}{{/isFormParam}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @RequestHeader(value="{{baseName}}", required={{#required}}true{{/required}}{{^required}}false{{/required}}) {{{dataType}}} {{paramName}}{{/isHeaderParam}}
1+
{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{^isContainer}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{/isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @RequestHeader(value="{{baseName}}", required={{#required}}true{{/required}}{{^required}}false{{/required}}) {{{dataType}}} {{paramName}}{{/isHeaderParam}}

modules/swagger-codegen/src/main/resources/JavaSpring/pojo.mustache

Lines changed: 70 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,102 @@
1-
{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}
1+
/**
2+
* {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}
3+
*/{{#description}}
4+
@ApiModel(description = "{{{description}}}"){{/description}}
25
{{>generatedAnnotation}}
36
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
4-
{{#vars}}{{#isEnum}}
5-
6-
{{>enumClass}}{{/isEnum}}{{#items.isEnum}}{{#items}}
7-
8-
{{>enumClass}}{{/items}}{{/items.isEnum}}
9-
private {{{datatypeWithEnum}}} {{name}} = {{{defaultValue}}};{{/vars}}
7+
{{#vars}}
8+
{{#isEnum}}
9+
{{^isContainer}}
10+
{{>enumClass}}
11+
{{/isContainer}}
12+
{{/isEnum}}
13+
{{#items.isEnum}}
14+
{{#items}}
15+
{{^isContainer}}
16+
{{>enumClass}}
17+
{{/isContainer}}
18+
{{/items}}
19+
{{/items.isEnum}}
20+
{{#jackson}}
21+
@JsonProperty("{{baseName}}")
22+
{{/jackson}}
23+
{{#gson}}
24+
@SerializedName("{{baseName}}")
25+
{{/gson}}
26+
private {{{datatypeWithEnum}}} {{name}} = {{{defaultValue}}};
1027

28+
{{/vars}}
1129
{{#vars}}
12-
/**{{#description}}
13-
* {{{description}}}{{/description}}{{#minimum}}
14-
* minimum: {{minimum}}{{/minimum}}{{#maximum}}
15-
* maximum: {{maximum}}{{/maximum}}
16-
**/
30+
{{^isReadOnly}}
1731
public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) {
1832
this.{{name}} = {{name}};
1933
return this;
2034
}
35+
{{#isListContainer}}
36+
37+
public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
38+
this.{{name}}.add({{name}}Item);
39+
return this;
40+
}
41+
{{/isListContainer}}
42+
{{#isMapContainer}}
43+
44+
public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
45+
this.{{name}}.put(key, {{name}}Item);
46+
return this;
47+
}
48+
{{/isMapContainer}}
2149

22-
{{#vendorExtensions.extraAnnotation}}{{vendorExtensions.extraAnnotation}}{{/vendorExtensions.extraAnnotation}}
50+
{{/isReadOnly}}
51+
/**
52+
{{#description}}
53+
* {{{description}}}
54+
{{/description}}
55+
{{^description}}
56+
* Get {{name}}
57+
{{/description}}
58+
{{#minimum}}
59+
* minimum: {{minimum}}
60+
{{/minimum}}
61+
{{#maximum}}
62+
* maximum: {{maximum}}
63+
{{/maximum}}
64+
* @return {{name}}
65+
**/
66+
{{#vendorExtensions.extraAnnotation}}
67+
{{vendorExtensions.extraAnnotation}}
68+
{{/vendorExtensions.extraAnnotation}}
2369
@ApiModelProperty({{#example}}example = "{{example}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
24-
@JsonProperty("{{baseName}}")
2570
public {{{datatypeWithEnum}}} {{getter}}() {
2671
return {{name}};
2772
}
73+
{{^isReadOnly}}
74+
2875
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {
2976
this.{{name}} = {{name}};
3077
}
78+
{{/isReadOnly}}
3179

3280
{{/vars}}
3381

3482
@Override
35-
public boolean equals(Object o) {
83+
public boolean equals(java.lang.Object o) {
3684
if (this == o) {
3785
return true;
3886
}
3987
if (o == null || getClass() != o.getClass()) {
4088
return false;
41-
}
42-
{{classname}} {{classVarName}} = ({{classname}}) o;{{#hasVars}}
43-
return {{#vars}}Objects.equals({{name}}, {{classVarName}}.{{name}}){{#hasMore}} &&
44-
{{/hasMore}}{{^hasMore}};{{/hasMore}}{{/vars}}{{/hasVars}}{{^hasVars}}
89+
}{{#hasVars}}
90+
{{classname}} {{classVarName}} = ({{classname}}) o;
91+
return {{#vars}}Objects.equals(this.{{name}}, {{classVarName}}.{{name}}){{#hasMore}} &&
92+
{{/hasMore}}{{/vars}}{{#parent}} &&
93+
super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
4594
return true;{{/hasVars}}
4695
}
4796

4897
@Override
4998
public int hashCode() {
50-
return Objects.hash({{#vars}}{{name}}{{#hasMore}}, {{/hasMore}}{{/vars}});
99+
return Objects.hash({{#vars}}{{name}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}});
51100
}
52101

53102
@Override
@@ -64,7 +113,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
64113
* Convert the given object to string with each line indented by 4 spaces
65114
* (except the first line).
66115
*/
67-
private String toIndentedString(Object o) {
116+
private String toIndentedString(java.lang.Object o) {
68117
if (o == null) {
69118
return "null";
70119
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#isQueryParam}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{{allowableValues}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}) @RequestParam(value = "{{paramName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/isQueryParam}}
1+
{{#isQueryParam}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{^isContainer}}{{#allowableValues}}, allowableValues = "{{{allowableValues}}}"{{/allowableValues}}{{/isContainer}}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}) @RequestParam(value = "{{paramName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/isQueryParam}}

samples/client/petstore/spring-cloud/README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
# swagger-petstore-spring-cloud
22

3-
Spring cloud (Feign) client can be generated using the below command :
4-
```shell
5-
swagger-codegen-cli generate \
6-
-l spring \
7-
-i http://petstore.swagger.io/v2/swagger.json \
8-
-DhideGenerationTimestamp=true
9-
```
10-
example is [here](https://github.com/swagger-api/swagger-codegen/blob/master/bin/spring-cloud-feign-petstore.sh)
11-
123
## Requirements
134

145
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.

samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package io.swagger.api;
22

33
import io.swagger.model.Pet;
4-
import io.swagger.model.ModelApiResponse;
54
import java.io.File;
5+
import io.swagger.model.ModelApiResponse;
66

77
import io.swagger.annotations.*;
88
import org.springframework.http.ResponseEntity;
@@ -33,7 +33,10 @@ public interface PetApi {
3333
produces = "application/json",
3434
consumes = "application/json",
3535
method = RequestMethod.POST)
36-
ResponseEntity<Void> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body);
36+
ResponseEntity<Void> addPet(
37+
38+
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body
39+
);
3740

3841

3942
@ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
@@ -48,7 +51,13 @@ public interface PetApi {
4851
produces = "application/json",
4952
consumes = "application/json",
5053
method = RequestMethod.DELETE)
51-
ResponseEntity<Void> deletePet(@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey);
54+
ResponseEntity<Void> deletePet(
55+
@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId
56+
57+
,
58+
@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey
59+
60+
);
5261

5362

5463
@ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
@@ -64,7 +73,10 @@ public interface PetApi {
6473
produces = "application/json",
6574
consumes = "application/json",
6675
method = RequestMethod.GET)
67-
ResponseEntity<List<Pet>> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true) @RequestParam(value = "status", required = true) List<String> status);
76+
ResponseEntity<List<Pet>> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true) @RequestParam(value = "status", required = true) List<String> status
77+
78+
79+
);
6880

6981

7082
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
@@ -80,7 +92,10 @@ public interface PetApi {
8092
produces = "application/json",
8193
consumes = "application/json",
8294
method = RequestMethod.GET)
83-
ResponseEntity<List<Pet>> findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags);
95+
ResponseEntity<List<Pet>> findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags
96+
97+
98+
);
8499

85100

86101
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
@@ -94,7 +109,10 @@ public interface PetApi {
94109
produces = "application/json",
95110
consumes = "application/json",
96111
method = RequestMethod.GET)
97-
ResponseEntity<Pet> getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId);
112+
ResponseEntity<Pet> getPetById(
113+
@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId
114+
115+
);
98116

99117

100118
@ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
@@ -111,7 +129,10 @@ public interface PetApi {
111129
produces = "application/json",
112130
consumes = "application/json",
113131
method = RequestMethod.PUT)
114-
ResponseEntity<Void> updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body);
132+
ResponseEntity<Void> updatePet(
133+
134+
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body
135+
);
115136

116137

117138
@ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = {
@@ -126,7 +147,16 @@ public interface PetApi {
126147
produces = "application/json",
127148
consumes = "application/x-www-form-urlencoded",
128149
method = RequestMethod.POST)
129-
ResponseEntity<Void> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status);
150+
ResponseEntity<Void> updatePetWithForm(
151+
@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId
152+
153+
,
154+
155+
156+
@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name,
157+
158+
159+
@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status);
130160

131161

132162
@ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
@@ -141,6 +171,15 @@ public interface PetApi {
141171
produces = "application/json",
142172
consumes = "multipart/form-data",
143173
method = RequestMethod.POST)
144-
ResponseEntity<ModelApiResponse> uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestParam("file") MultipartFile file);
174+
ResponseEntity<ModelApiResponse> uploadFile(
175+
@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId
176+
177+
,
178+
179+
180+
@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,
181+
182+
183+
@ApiParam(value = "file detail") @RequestParam("file") MultipartFile file);
145184

146185
}

samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ public interface StoreApi {
2828
produces = "application/json",
2929
consumes = "application/json",
3030
method = RequestMethod.DELETE)
31-
ResponseEntity<Void> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId);
31+
ResponseEntity<Void> deleteOrder(
32+
@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId
33+
34+
);
3235

3336

3437
@ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
@@ -52,7 +55,10 @@ public interface StoreApi {
5255
produces = "application/json",
5356
consumes = "application/json",
5457
method = RequestMethod.GET)
55-
ResponseEntity<Order> getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId);
58+
ResponseEntity<Order> getOrderById(
59+
@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId
60+
61+
);
5662

5763

5864
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
@@ -63,6 +69,9 @@ public interface StoreApi {
6369
produces = "application/json",
6470
consumes = "application/json",
6571
method = RequestMethod.POST)
66-
ResponseEntity<Order> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @RequestBody Order body);
72+
ResponseEntity<Order> placeOrder(
73+
74+
@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @RequestBody Order body
75+
);
6776

6877
}

0 commit comments

Comments
 (0)