Skip to content

Commit 9fa6633

Browse files
authored
Merge pull request #10993 from swagger-api/java-spring-samples-update
updated java and spring samples
2 parents 4f4a7af + f5c74f1 commit 9fa6633

File tree

255 files changed

+962
-790
lines changed

Some content is hidden

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

255 files changed

+962
-790
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.26-SNAPSHOT

samples/client/petstore/java/feign/src/main/java/io/swagger/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public ApiClient(String[] authNames) {
5050
} else if ("http_basic_test".equals(authName)) {
5151
auth = new HttpBasicAuth();
5252
} else if ("petstore_auth".equals(authName)) {
53-
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "");
53+
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
5454
} else {
5555
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
5656
}

samples/client/petstore/java/feign/src/main/java/io/swagger/client/auth/OAuth.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.swagger.client.auth;
22

33
import java.io.IOException;
4+
45
import java.util.ArrayList;
56
import java.util.Collection;
67
import java.util.Map;
@@ -183,7 +184,6 @@ public <T extends OAuthClientResponse> T execute(OAuthClientRequest request, Map
183184
if(contentTypeHeader != null) {
184185
contentType = StringUtil.join(contentTypeHeader.toArray(new String[0]), ";");
185186
}
186-
187187
return OAuthClientResponseFactory.createCustomResponse(
188188
body,
189189
contentType,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.25-SNAPSHOT
1+
3.0.26-SNAPSHOT

samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnimalApi.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public void addAnimal(Animal body) throws ApiException {
6767

6868

6969

70-
7170
final String[] localVarAccepts = {
7271

7372
};
@@ -109,7 +108,6 @@ public void deleteAnimal(Long animalId, String apiKey) throws ApiException {
109108
if (apiKey != null)
110109
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
111110

112-
113111
final String[] localVarAccepts = {
114112

115113
};
@@ -149,7 +147,6 @@ public Animal getAnimalById(Long animalId) throws ApiException {
149147

150148

151149

152-
153150
final String[] localVarAccepts = {
154151
"application/xml", "application/json"
155152
};
@@ -188,7 +185,6 @@ public void updateAnimal(Animal body) throws ApiException {
188185

189186

190187

191-
192188
final String[] localVarAccepts = {
193189

194190
};
@@ -228,8 +224,7 @@ public void updateAnimalWithForm(Long animalId, String name, String status) thro
228224
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
229225

230226

231-
232-
if (name != null)
227+
if (name != null)
233228
localVarFormParams.put("name", name);
234229
if (status != null)
235230
localVarFormParams.put("status", status);

samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/AnotherFakeApi.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ public Client testSpecialTags(Client body) throws ApiException {
6868

6969

7070

71-
7271
final String[] localVarAccepts = {
7372
"application/json"
7473
};

samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/DogApi.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public void addDog(Dog body) throws ApiException {
6767

6868

6969

70-
7170
final String[] localVarAccepts = {
7271

7372
};
@@ -109,7 +108,6 @@ public void deleteDog(Long dogId, String apiKey) throws ApiException {
109108
if (apiKey != null)
110109
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
111110

112-
113111
final String[] localVarAccepts = {
114112

115113
};
@@ -149,7 +147,6 @@ public Dog getDogById(Long dogId) throws ApiException {
149147

150148

151149

152-
153150
final String[] localVarAccepts = {
154151
"application/xml", "application/json"
155152
};
@@ -188,7 +185,6 @@ public void updateDog(Dog body) throws ApiException {
188185

189186

190187

191-
192188
final String[] localVarAccepts = {
193189

194190
};
@@ -228,8 +224,7 @@ public void updateDogWithForm(Long dogId, String name, String status) throws Api
228224
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
229225

230226

231-
232-
if (name != null)
227+
if (name != null)
233228
localVarFormParams.put("name", name);
234229
if (status != null)
235230
localVarFormParams.put("status", status);

samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException {
7070

7171

7272

73-
7473
final String[] localVarAccepts = {
7574
"*/*"
7675
};
@@ -106,7 +105,6 @@ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws Ap
106105

107106

108107

109-
110108
final String[] localVarAccepts = {
111109
"*/*"
112110
};
@@ -142,7 +140,6 @@ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException
142140

143141

144142

145-
146143
final String[] localVarAccepts = {
147144
"*/*"
148145
};
@@ -178,7 +175,6 @@ public String fakeOuterStringSerialize(String body) throws ApiException {
178175

179176

180177

181-
182178
final String[] localVarAccepts = {
183179
"*/*"
184180
};
@@ -218,7 +214,6 @@ public Client testClientModel(Client body) throws ApiException {
218214

219215

220216

221-
222217
final String[] localVarAccepts = {
223218
"application/json"
224219
};
@@ -257,7 +252,6 @@ public void testEndpointParameters(Body2 body) throws ApiException {
257252

258253

259254

260-
261255
final String[] localVarAccepts = {
262256

263257
};
@@ -302,7 +296,6 @@ public void testEnumParameters(List<String> enumHeaderStringArray, String enumHe
302296
if (enumHeaderString != null)
303297
localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString));
304298

305-
306299
final String[] localVarAccepts = {
307300

308301
};
@@ -336,7 +329,6 @@ public void testEnumRequestBody(Body4 body) throws ApiException {
336329

337330

338331

339-
340332
final String[] localVarAccepts = {
341333

342334
};
@@ -374,7 +366,6 @@ public void testInlineAdditionalProperties(Map<String, String> body) throws ApiE
374366

375367

376368

377-
378369
final String[] localVarAccepts = {
379370

380371
};
@@ -412,7 +403,6 @@ public void testJsonFormData(Body5 body) throws ApiException {
412403

413404

414405

415-
416406
final String[] localVarAccepts = {
417407

418408
};

samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ public Client testClassname(Client body) throws ApiException {
6868

6969

7070

71-
7271
final String[] localVarAccepts = {
7372
"application/json"
7473
};

samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public void addPet(Pet body) throws ApiException {
7272

7373

7474

75-
7675
final String[] localVarAccepts = {
7776

7877
};
@@ -114,7 +113,6 @@ public void deletePet(Long petId, String apiKey) throws ApiException {
114113
if (apiKey != null)
115114
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
116115

117-
118116
final String[] localVarAccepts = {
119117

120118
};
@@ -149,7 +147,6 @@ public ModelApiResponse doCategoryStuff(SubCategory body) throws ApiException {
149147

150148

151149

152-
153150
final String[] localVarAccepts = {
154151
"application/json"
155152
};
@@ -190,7 +187,6 @@ public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
190187
localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
191188

192189

193-
194190
final String[] localVarAccepts = {
195191
"application/xml", "application/json"
196192
};
@@ -233,7 +229,6 @@ public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
233229
localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
234230

235231

236-
237232
final String[] localVarAccepts = {
238233
"application/xml", "application/json"
239234
};
@@ -268,7 +263,6 @@ public AllPetsResponse getAllPets() throws ApiException {
268263

269264

270265

271-
272266
final String[] localVarAccepts = {
273267
"application/json"
274268
};
@@ -309,7 +303,6 @@ public Pet getPetById(Long petId) throws ApiException {
309303

310304

311305

312-
313306
final String[] localVarAccepts = {
314307
"application/xml", "application/json"
315308
};
@@ -344,7 +337,6 @@ public SinglePetResponse getRandomPet() throws ApiException {
344337

345338

346339

347-
348340
final String[] localVarAccepts = {
349341
"application/json"
350342
};
@@ -383,7 +375,6 @@ public void updatePet(Pet body) throws ApiException {
383375

384376

385377

386-
387378
final String[] localVarAccepts = {
388379

389380
};
@@ -423,8 +414,7 @@ public void updatePetWithForm(Long petId, String name, String status) throws Api
423414
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
424415

425416

426-
427-
if (name != null)
417+
if (name != null)
428418
localVarFormParams.put("name", name);
429419
if (status != null)
430420
localVarFormParams.put("status", status);
@@ -469,8 +459,7 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File f
469459
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
470460

471461

472-
473-
if (additionalMetadata != null)
462+
if (additionalMetadata != null)
474463
localVarFormParams.put("additionalMetadata", additionalMetadata);
475464
if (file != null)
476465
localVarFormParams.put("file", file);

0 commit comments

Comments
 (0)