Skip to content

Commit dbb3241

Browse files
authored
Merge pull request #9226 from swagger-api/sample_updates
Sample updates
2 parents b01b6ad + 6a582ea commit dbb3241

File tree

54 files changed

+93
-112
lines changed

Some content is hidden

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

54 files changed

+93
-112
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.5-SNAPSHOT
1+
3.0.6-SNAPSHOT

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ public interface AnotherFakeApi extends ApiClient.Api {
2121
*/
2222
@RequestLine("PATCH /another-fake/dummy")
2323
@Headers({
24-
"Content-Type: application/json",
25-
"Accept: application/json",
24+
"Accept: */*",
2625
})
2726
Client testSpecialTags(Client body);
2827
}

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ public interface FakeApi extends ApiClient.Api {
2727
*/
2828
@RequestLine("POST /fake/outer/boolean")
2929
@Headers({
30-
"Content-Type: */*",
3130
"Accept: */*",
3231
})
3332
Boolean fakeOuterBooleanSerialize(Boolean body);
@@ -39,7 +38,6 @@ public interface FakeApi extends ApiClient.Api {
3938
*/
4039
@RequestLine("POST /fake/outer/composite")
4140
@Headers({
42-
"Content-Type: */*",
4341
"Accept: */*",
4442
})
4543
OuterComposite fakeOuterCompositeSerialize(OuterComposite body);
@@ -51,7 +49,6 @@ public interface FakeApi extends ApiClient.Api {
5149
*/
5250
@RequestLine("POST /fake/outer/number")
5351
@Headers({
54-
"Content-Type: */*",
5552
"Accept: */*",
5653
})
5754
BigDecimal fakeOuterNumberSerialize(BigDecimal body);
@@ -63,7 +60,6 @@ public interface FakeApi extends ApiClient.Api {
6360
*/
6461
@RequestLine("POST /fake/outer/string")
6562
@Headers({
66-
"Content-Type: */*",
6763
"Accept: */*",
6864
})
6965
String fakeOuterStringSerialize(String body);
@@ -75,8 +71,7 @@ public interface FakeApi extends ApiClient.Api {
7571
*/
7672
@RequestLine("PATCH /fake")
7773
@Headers({
78-
"Content-Type: application/json",
79-
"Accept: application/json",
74+
"Accept: */*",
8075
})
8176
Client testClientModel(Client body);
8277
/**
@@ -139,7 +134,7 @@ public interface FakeApi extends ApiClient.Api {
139134
*/
140135
public static class TestEnumParametersQueryParams extends HashMap<String, Object> {
141136
public TestEnumParametersQueryParams enumQueryStringArray(final List<String> value) {
142-
put("enum_query_string_array", EncodingUtils.encodeCollection(value, "multi"));
137+
put("enum_query_string_array", EncodingUtils.encodeCollection(value, "csv"));
143138
return this;
144139
}
145140
public TestEnumParametersQueryParams enumQueryString(final String value) {
@@ -168,7 +163,6 @@ public TestEnumParametersQueryParams enumQueryInteger(final Integer value) {
168163
*/
169164
@RequestLine("POST /fake/inline-additionalProperties")
170165
@Headers({
171-
"Content-Type: application/json",
172166
"Accept: */*",
173167
})
174168
void testInlineAdditionalProperties(Map<String, String> body);

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ public interface FakeClassnameTags123Api extends ApiClient.Api {
2121
*/
2222
@RequestLine("PATCH /fake_classname_test")
2323
@Headers({
24-
"Content-Type: application/json",
25-
"Accept: application/json",
24+
"Accept: */*",
2625
})
2726
Client testClassname(Client body);
2827
}

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public interface PetApi extends ApiClient.Api {
2222
*/
2323
@RequestLine("POST /pet")
2424
@Headers({
25-
"Content-Type: application/json",
2625
"Accept: */*",
2726
})
2827
void addPet(Pet body);
@@ -46,7 +45,7 @@ public interface PetApi extends ApiClient.Api {
4645
*/
4746
@RequestLine("GET /pet/findByStatus?status={status}")
4847
@Headers({
49-
"Accept: application/json",
48+
"Accept: */*",
5049
})
5150
List<Pet> findPetsByStatus(@Param("status") List<String> status);
5251

@@ -69,7 +68,6 @@ public interface PetApi extends ApiClient.Api {
6968
@RequestLine("GET /pet/findByStatus?status={status}")
7069
@Headers({
7170
"Content-Type: */*",
72-
"Accept: application/json",
7371
})
7472
List<Pet> findPetsByStatus(@QueryMap(encoded=true) Map<String, Object> queryParams);
7573

@@ -79,7 +77,7 @@ public interface PetApi extends ApiClient.Api {
7977
*/
8078
public static class FindPetsByStatusQueryParams extends HashMap<String, Object> {
8179
public FindPetsByStatusQueryParams status(final List<String> value) {
82-
put("status", EncodingUtils.encodeCollection(value, "multi"));
80+
put("status", EncodingUtils.encodeCollection(value, "csv"));
8381
return this;
8482
}
8583
}
@@ -114,7 +112,6 @@ public FindPetsByStatusQueryParams status(final List<String> value) {
114112
@RequestLine("GET /pet/findByTags?tags={tags}")
115113
@Headers({
116114
"Content-Type: */*",
117-
"Accept: application/json",
118115
})
119116
List<Pet> findPetsByTags(@QueryMap(encoded=true) Map<String, Object> queryParams);
120117

@@ -124,7 +121,7 @@ public FindPetsByStatusQueryParams status(final List<String> value) {
124121
*/
125122
public static class FindPetsByTagsQueryParams extends HashMap<String, Object> {
126123
public FindPetsByTagsQueryParams tags(final List<String> value) {
127-
put("tags", EncodingUtils.encodeCollection(value, "multi"));
124+
put("tags", EncodingUtils.encodeCollection(value, "csv"));
128125
return this;
129126
}
130127
}
@@ -146,7 +143,6 @@ public FindPetsByTagsQueryParams tags(final List<String> value) {
146143
*/
147144
@RequestLine("PUT /pet")
148145
@Headers({
149-
"Content-Type: application/json",
150146
"Accept: */*",
151147
})
152148
void updatePet(Pet body);

samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public interface StoreApi extends ApiClient.Api {
2020
*/
2121
@RequestLine("DELETE /store/order/{orderId}")
2222
@Headers({
23-
"Content-Type: application/json",
2423
"Accept: */*",
2524
})
2625
void deleteOrder(@Param("orderId") String orderId);
@@ -31,7 +30,7 @@ public interface StoreApi extends ApiClient.Api {
3130
*/
3231
@RequestLine("GET /store/inventory")
3332
@Headers({
34-
"Accept: application/json",
33+
"Accept: */*",
3534
})
3635
Map<String, Integer> getInventory();
3736
/**
@@ -53,8 +52,7 @@ public interface StoreApi extends ApiClient.Api {
5352
*/
5453
@RequestLine("POST /store/order")
5554
@Headers({
56-
"Content-Type: */*",
57-
"Accept: application/json",
55+
"Accept: */*",
5856
})
5957
Order placeOrder(Order body);
6058
}

samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public interface UserApi extends ApiClient.Api {
2020
*/
2121
@RequestLine("POST /user")
2222
@Headers({
23-
"Content-Type: */*",
2423
"Accept: */*",
2524
})
2625
void createUser(User body);
@@ -31,7 +30,6 @@ public interface UserApi extends ApiClient.Api {
3130
*/
3231
@RequestLine("POST /user/createWithArray")
3332
@Headers({
34-
"Content-Type: */*",
3533
"Accept: */*",
3634
})
3735
void createUsersWithArrayInput(List<User> body);
@@ -42,7 +40,6 @@ public interface UserApi extends ApiClient.Api {
4240
*/
4341
@RequestLine("POST /user/createWithList")
4442
@Headers({
45-
"Content-Type: */*",
4643
"Accept: */*",
4744
})
4845
void createUsersWithListInput(List<User> body);
@@ -53,7 +50,6 @@ public interface UserApi extends ApiClient.Api {
5350
*/
5451
@RequestLine("DELETE /user/{username}")
5552
@Headers({
56-
"Content-Type: application/json",
5753
"Accept: */*",
5854
})
5955
void deleteUser(@Param("username") String username);
@@ -65,7 +61,7 @@ public interface UserApi extends ApiClient.Api {
6561
*/
6662
@RequestLine("GET /user/{username}")
6763
@Headers({
68-
"Accept: application/json",
64+
"Accept: */*",
6965
})
7066
User getUserByName(@Param("username") String username);
7167
/**
@@ -77,7 +73,7 @@ public interface UserApi extends ApiClient.Api {
7773
*/
7874
@RequestLine("GET /user/login?username={username}&password={password}")
7975
@Headers({
80-
"Accept: application/json",
76+
"Accept: */*",
8177
})
8278
String loginUser(@Param("username") String username, @Param("password") String password);
8379

@@ -101,7 +97,6 @@ public interface UserApi extends ApiClient.Api {
10197
@RequestLine("GET /user/login?username={username}&password={password}")
10298
@Headers({
10399
"Content-Type: */*",
104-
"Accept: application/json",
105100
})
106101
String loginUser(@QueryMap(encoded=true) Map<String, Object> queryParams);
107102

@@ -136,7 +131,6 @@ public LoginUserQueryParams password(final String value) {
136131
*/
137132
@RequestLine("PUT /user/{username}")
138133
@Headers({
139-
"Content-Type: */*",
140134
"Accept: */*",
141135
})
142136
void updateUser(User body, @Param("username") String username);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.5-SNAPSHOT
1+
3.0.6-SNAPSHOT

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import java.util.HashMap;
2525
import java.util.List;
2626
import java.util.Map;
27-
public class AnotherFakeApi {//soy sho...
27+
public class AnotherFakeApi {
2828
private ApiClient apiClient;
2929

3030
public AnotherFakeApi() {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import java.util.HashMap;
3131
import java.util.List;
3232
import java.util.Map;
33-
public class FakeApi {//soy sho...
33+
public class FakeApi {
3434
private ApiClient apiClient;
3535

3636
public FakeApi() {
@@ -292,7 +292,7 @@ public void testEnumParameters(List<String> enumHeaderStringArray, String enumHe
292292
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
293293
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
294294

295-
localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("multi", "enum_query_string_array", enumQueryStringArray));
295+
localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray));
296296
localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_string", enumQueryString));
297297
localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_integer", enumQueryInteger));
298298

0 commit comments

Comments
 (0)