Skip to content

Commit 49219e1

Browse files
committed
remove unnecessary blank line
1 parent 809180a commit 49219e1

193 files changed

Lines changed: 328 additions & 1512 deletions

File tree

Some content is hidden

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

modules/openapi-generator/src/main/resources/JavaSpring/api.mustache

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ public interface {{classname}} {
265265
{{#vendorExtensions.x-operation-extra-annotation}}
266266
{{{.}}}
267267
{{/vendorExtensions.x-operation-extra-annotation}}
268-
{{#vendorExtensions.x-sse}}@ResponseBody{{/vendorExtensions.x-sse}}
268+
{{#vendorExtensions.x-sse}}
269+
@ResponseBody
270+
{{/vendorExtensions.x-sse}}
269271
{{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{>responseType}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}(
270272
{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}},
271273
{{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}},
@@ -285,7 +287,7 @@ public interface {{classname}} {
285287
{{>methodBody}}{{! prevent indent}}
286288
{{/isDelegate}}
287289
{{#isDelegate}}
288-
{{^isVoid}}return {{/isVoid}}{{#isVoid}}{{#useResponseEntity}}return {{/useResponseEntity}}{{^useResponseEntity}}{{#reactive}}return {{/reactive}}{{/useResponseEntity}}{{/isVoid}}getDelegate().{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, {{/hasParams}}{{^hasParams}}{{#reactive}}, {{/reactive}}{{/hasParams}}pageable{{/vendorExtensions.x-spring-paginated}});
290+
{{^isVoid}}return {{/isVoid}}{{#isVoid}}{{#useResponseEntity}}return {{/useResponseEntity}}{{^useResponseEntity}}{{#reactive}}return {{/reactive}}{{/useResponseEntity}}{{/isVoid}}getDelegate().{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, {{/hasParams}}{{^hasParams}}{{#reactive}}, {{/reactive}}{{/hasParams}}pageable{{/vendorExtensions.x-spring-paginated}});
289291
{{/isDelegate}}
290292
}{{/jdk8-default-interface}}
291293

samples/client/petstore/spring-cloud-auth/src/main/java/org/openapitools/api/SomeApi.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public interface SomeApi {
3131
method = RequestMethod.GET,
3232
value = SomeApi.PATH_SOME_ENDPOINT_GET
3333
)
34-
3534
ResponseEntity<Void> someEndpointGet(
3635

3736
);

samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public interface DefaultApi {
4949
method = RequestMethod.GET,
5050
value = DefaultApi.PATH_GET
5151
)
52-
5352
ResponseEntity<Void> get(
5453
@NotNull @ApiParam(value = "A date path parameter", required = true, defaultValue = "1972-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
5554
@NotNull @ApiParam(value = "A date-time query parameter", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @Valid @RequestParam(value = "dateTime", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime,
@@ -80,7 +79,6 @@ ResponseEntity<Void> get(
8079
value = DefaultApi.PATH_UPDATE_PET_WITH_FORM,
8180
consumes = "application/x-www-form-urlencoded"
8281
)
83-
8482
ResponseEntity<Void> updatePetWithForm(
8583
@NotNull @ApiParam(value = "A date path parameter", required = true, defaultValue = "1970-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
8684
@ApiParam(value = "Updated last visit timestamp", defaultValue = "1971-12-19T03:39:57-08:00") @Valid @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate

samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public interface PetApi {
6262
value = PetApi.PATH_ADD_PET,
6363
consumes = "application/json"
6464
)
65-
6665
ResponseEntity<Void> addPet(
6766
@Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet
6867
);
@@ -93,7 +92,6 @@ ResponseEntity<Void> addPet(
9392
method = RequestMethod.DELETE,
9493
value = PetApi.PATH_DELETE_PET
9594
)
96-
9795
ResponseEntity<Void> deletePet(
9896
@NotNull @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
9997
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) @Nullable String apiKey
@@ -130,7 +128,6 @@ ResponseEntity<Void> deletePet(
130128
value = PetApi.PATH_FIND_PETS_BY_STATUS,
131129
produces = { "application/json", "application/xml" }
132130
)
133-
134131
ResponseEntity<List<Pet>> findPetsByStatus(
135132
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
136133
);
@@ -169,7 +166,6 @@ ResponseEntity<List<Pet>> findPetsByStatus(
169166
value = PetApi.PATH_FIND_PETS_BY_TAGS,
170167
produces = { "application/json", "application/xml" }
171168
)
172-
173169
ResponseEntity<List<Pet>> findPetsByTags(
174170
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List<String> tags
175171
);
@@ -207,7 +203,6 @@ ResponseEntity<List<Pet>> findPetsByTags(
207203
value = PetApi.PATH_GET_PET_BY_ID,
208204
produces = { "application/json", "application/xml" }
209205
)
210-
211206
ResponseEntity<Pet> getPetById(
212207
@NotNull @Parameter(name = "petId", deprecated = true, description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @Deprecated Long petId
213208
);
@@ -242,7 +237,6 @@ ResponseEntity<Pet> getPetById(
242237
value = PetApi.PATH_UPDATE_PET,
243238
consumes = "application/json"
244239
)
245-
246240
ResponseEntity<Void> updatePet(
247241
@Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet
248242
);
@@ -275,7 +269,6 @@ ResponseEntity<Void> updatePet(
275269
value = PetApi.PATH_UPDATE_PET_WITH_FORM,
276270
consumes = "application/x-www-form-urlencoded"
277271
)
278-
279272
ResponseEntity<Void> updatePetWithForm(
280273
@NotNull @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
281274
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
@@ -313,7 +306,6 @@ ResponseEntity<Void> updatePetWithForm(
313306
produces = { "application/json" },
314307
consumes = "multipart/form-data"
315308
)
316-
317309
ResponseEntity<ModelApiResponse> uploadFile(
318310
@NotNull @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
319311
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,

samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public interface StoreApi {
5959
method = RequestMethod.DELETE,
6060
value = StoreApi.PATH_DELETE_ORDER
6161
)
62-
6362
ResponseEntity<Void> deleteOrder(
6463
@NotNull @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId
6564
);
@@ -91,7 +90,6 @@ ResponseEntity<Void> deleteOrder(
9190
value = StoreApi.PATH_GET_INVENTORY,
9291
produces = { "application/json" }
9392
)
94-
9593
ResponseEntity<Map<String, Integer>> getInventory(
9694

9795
);
@@ -126,7 +124,6 @@ ResponseEntity<Map<String, Integer>> getInventory(
126124
value = StoreApi.PATH_GET_ORDER_BY_ID,
127125
produces = { "application/json", "application/xml" }
128126
)
129-
130127
ResponseEntity<Order> getOrderById(
131128
@NotNull @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId
132129
);
@@ -160,7 +157,6 @@ ResponseEntity<Order> getOrderById(
160157
produces = { "application/json", "application/xml" },
161158
consumes = "application/json"
162159
)
163-
164160
ResponseEntity<Order> placeOrder(
165161
@Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order
166162
);

samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public interface UserApi {
6161
value = UserApi.PATH_CREATE_USER,
6262
consumes = "application/json"
6363
)
64-
6564
ResponseEntity<Void> createUser(
6665
@Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user
6766
);
@@ -92,7 +91,6 @@ ResponseEntity<Void> createUser(
9291
value = UserApi.PATH_CREATE_USERS_WITH_ARRAY_INPUT,
9392
consumes = "application/json"
9493
)
95-
9694
ResponseEntity<Void> createUsersWithArrayInput(
9795
@Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user
9896
);
@@ -123,7 +121,6 @@ ResponseEntity<Void> createUsersWithArrayInput(
123121
value = UserApi.PATH_CREATE_USERS_WITH_LIST_INPUT,
124122
consumes = "application/json"
125123
)
126-
127124
ResponseEntity<Void> createUsersWithListInput(
128125
@Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user
129126
);
@@ -155,7 +152,6 @@ ResponseEntity<Void> createUsersWithListInput(
155152
method = RequestMethod.DELETE,
156153
value = UserApi.PATH_DELETE_USER
157154
)
158-
159155
ResponseEntity<Void> deleteUser(
160156
@NotNull @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
161157
);
@@ -190,7 +186,6 @@ ResponseEntity<Void> deleteUser(
190186
value = UserApi.PATH_GET_USER_BY_NAME,
191187
produces = { "application/json", "application/xml" }
192188
)
193-
194189
ResponseEntity<User> getUserByName(
195190
@NotNull @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
196191
);
@@ -224,7 +219,6 @@ ResponseEntity<User> getUserByName(
224219
value = UserApi.PATH_LOGIN_USER,
225220
produces = { "application/json", "application/xml" }
226221
)
227-
228222
ResponseEntity<String> loginUser(
229223
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
230224
@NotNull @Parameter(name = "password", deprecated = true, description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) @Deprecated String password
@@ -254,7 +248,6 @@ ResponseEntity<String> loginUser(
254248
method = RequestMethod.GET,
255249
value = UserApi.PATH_LOGOUT_USER
256250
)
257-
258251
ResponseEntity<Void> logoutUser(
259252

260253
);
@@ -288,7 +281,6 @@ ResponseEntity<Void> logoutUser(
288281
value = UserApi.PATH_UPDATE_USER,
289282
consumes = "application/json"
290283
)
291-
292284
ResponseEntity<Void> updateUser(
293285
@NotNull @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
294286
@Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user

samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public interface PetApi {
5858
produces = { "application/json", "application/xml" },
5959
consumes = "application/json"
6060
)
61-
6261
ResponseEntity<Pet> addPet(
6362
@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet
6463
);
@@ -92,7 +91,6 @@ ResponseEntity<Pet> addPet(
9291
method = RequestMethod.DELETE,
9392
value = PetApi.PATH_DELETE_PET
9493
)
95-
9694
ResponseEntity<Void> deletePet(
9795
@NotNull @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,
9896
@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) @Nullable String apiKey
@@ -130,7 +128,6 @@ ResponseEntity<Void> deletePet(
130128
value = PetApi.PATH_FIND_PETS_BY_STATUS,
131129
produces = { "application/json", "application/xml" }
132130
)
133-
134131
ResponseEntity<List<Pet>> findPetsByStatus(
135132
@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) @Deprecated List<String> status
136133
);
@@ -169,7 +166,6 @@ ResponseEntity<List<Pet>> findPetsByStatus(
169166
value = PetApi.PATH_FIND_PETS_BY_TAGS,
170167
produces = { "application/json", "application/xml" }
171168
)
172-
173169
ResponseEntity<List<Pet>> findPetsByTags(
174170
@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags
175171
);
@@ -205,7 +201,6 @@ ResponseEntity<List<Pet>> findPetsByTags(
205201
value = PetApi.PATH_GET_PET_BY_ID,
206202
produces = { "application/json", "application/xml" }
207203
)
208-
209204
ResponseEntity<Pet> getPetById(
210205
@NotNull @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId
211206
);
@@ -249,7 +244,6 @@ ResponseEntity<Pet> getPetById(
249244
produces = { "application/json", "application/xml" },
250245
consumes = "application/json"
251246
)
252-
253247
ResponseEntity<Pet> updatePet(
254248
@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet
255249
);
@@ -285,7 +279,6 @@ ResponseEntity<Pet> updatePet(
285279
value = PetApi.PATH_UPDATE_PET_WITH_FORM,
286280
consumes = "application/x-www-form-urlencoded"
287281
)
288-
289282
ResponseEntity<Void> updatePetWithForm(
290283
@NotNull @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
291284
@ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
@@ -325,7 +318,6 @@ ResponseEntity<Void> updatePetWithForm(
325318
produces = { "application/json" },
326319
consumes = "multipart/form-data"
327320
)
328-
329321
ResponseEntity<ModelApiResponse> uploadFile(
330322
@NotNull @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
331323
@ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,

samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public interface StoreApi {
4848
method = RequestMethod.DELETE,
4949
value = StoreApi.PATH_DELETE_ORDER
5050
)
51-
5251
ResponseEntity<Void> deleteOrder(
5352
@NotNull @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId
5453
);
@@ -80,7 +79,6 @@ ResponseEntity<Void> deleteOrder(
8079
value = StoreApi.PATH_GET_INVENTORY,
8180
produces = { "application/json" }
8281
)
83-
8482
ResponseEntity<Map<String, Integer>> getInventory(
8583

8684
);
@@ -113,7 +111,6 @@ ResponseEntity<Map<String, Integer>> getInventory(
113111
value = StoreApi.PATH_GET_ORDER_BY_ID,
114112
produces = { "application/json", "application/xml" }
115113
)
116-
117114
ResponseEntity<Order> getOrderById(
118115
@NotNull @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId
119116
);
@@ -145,7 +142,6 @@ ResponseEntity<Order> getOrderById(
145142
produces = { "application/json", "application/xml" },
146143
consumes = "application/json"
147144
)
148-
149145
ResponseEntity<Order> placeOrder(
150146
@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order
151147
);

samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public interface UserApi {
5050
value = UserApi.PATH_CREATE_USER,
5151
consumes = "application/json"
5252
)
53-
5453
ResponseEntity<Void> createUser(
5554
@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user
5655
);
@@ -81,7 +80,6 @@ ResponseEntity<Void> createUser(
8180
value = UserApi.PATH_CREATE_USERS_WITH_ARRAY_INPUT,
8281
consumes = "application/json"
8382
)
84-
8583
ResponseEntity<Void> createUsersWithArrayInput(
8684
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user
8785
);
@@ -112,7 +110,6 @@ ResponseEntity<Void> createUsersWithArrayInput(
112110
value = UserApi.PATH_CREATE_USERS_WITH_LIST_INPUT,
113111
consumes = "application/json"
114112
)
115-
116113
ResponseEntity<Void> createUsersWithListInput(
117114
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user
118115
);
@@ -144,7 +141,6 @@ ResponseEntity<Void> createUsersWithListInput(
144141
method = RequestMethod.DELETE,
145142
value = UserApi.PATH_DELETE_USER
146143
)
147-
148144
ResponseEntity<Void> deleteUser(
149145
@NotNull @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username
150146
);
@@ -177,7 +173,6 @@ ResponseEntity<Void> deleteUser(
177173
value = UserApi.PATH_GET_USER_BY_NAME,
178174
produces = { "application/json", "application/xml" }
179175
)
180-
181176
ResponseEntity<User> getUserByName(
182177
@NotNull @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
183178
);
@@ -209,7 +204,6 @@ ResponseEntity<User> getUserByName(
209204
value = UserApi.PATH_LOGIN_USER,
210205
produces = { "application/json", "application/xml" }
211206
)
212-
213207
ResponseEntity<String> loginUser(
214208
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,
215209
@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password
@@ -239,7 +233,6 @@ ResponseEntity<String> loginUser(
239233
method = RequestMethod.GET,
240234
value = UserApi.PATH_LOGOUT_USER
241235
)
242-
243236
ResponseEntity<Void> logoutUser(
244237

245238
);
@@ -273,7 +266,6 @@ ResponseEntity<Void> logoutUser(
273266
value = UserApi.PATH_UPDATE_USER,
274267
consumes = "application/json"
275268
)
276-
277269
ResponseEntity<Void> updateUser(
278270
@NotNull @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,
279271
@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user

0 commit comments

Comments
 (0)