Skip to content

Commit a207251

Browse files
committed
minor changes
removed gson version in pom and added a space between the parameters
1 parent 265de96 commit a207251

File tree

6 files changed

+14
-18
lines changed

6 files changed

+14
-18
lines changed

modules/swagger-codegen/src/main/resources/retrofit/api.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public interface {{classname}} {
2424
{{#isMultipart}}@Multipart{{/isMultipart}}{{^isMultipart}}@FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
2525
@{{httpMethod}}("{{path}}")
2626
{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}} {{nickname}}({{^allParams}});{{/allParams}}
27-
{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{^hasMore}}
27+
{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}}, {{/hasMore}}{{^hasMore}}
2828
);{{/hasMore}}{{/allParams}}
2929

3030
/**
@@ -38,7 +38,7 @@ public interface {{classname}} {
3838
{{#isMultipart}}@Multipart{{/isMultipart}}{{^isMultipart}}@FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
3939
@{{httpMethod}}("{{path}}")
4040
void {{nickname}}(
41-
{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},{{/allParams}} Callback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> cb
41+
{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}, {{/allParams}}Callback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> cb
4242
);
4343
{{/operation}}
4444
}

modules/swagger-codegen/src/main/resources/retrofit/pom.mustache

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
<groupId>org.apache.oltu.oauth2</groupId>
122122
<artifactId>org.apache.oltu.oauth2.client</artifactId>
123123
<version>${oltu-version}</version>
124-
<scope>compile</scope>
125124
</dependency>
126125
<dependency>
127126
<groupId>com.squareup.okhttp</groupId>
@@ -139,7 +138,6 @@
139138
</dependencies>
140139
<properties>
141140
<swagger-annotations-version>1.5.0</swagger-annotations-version>
142-
<gson-version>2.3.1</gson-version>
143141
<retrofit-version>1.9.0</retrofit-version>
144142
<okhttp-version>2.4.0</okhttp-version>
145143
<oltu-version>1.0.0</oltu-version>

samples/client/petstore/retrofit/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
<groupId>org.apache.oltu.oauth2</groupId>
122122
<artifactId>org.apache.oltu.oauth2.client</artifactId>
123123
<version>${oltu-version}</version>
124-
<scope>compile</scope>
125124
</dependency>
126125
<dependency>
127126
<groupId>com.squareup.okhttp</groupId>
@@ -139,7 +138,6 @@
139138
</dependencies>
140139
<properties>
141140
<swagger-annotations-version>1.5.0</swagger-annotations-version>
142-
<gson-version>2.3.1</gson-version>
143141
<retrofit-version>1.9.0</retrofit-version>
144142
<okhttp-version>2.4.0</okhttp-version>
145143
<oltu-version>1.0.0</oltu-version>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void getPetById(
156156
@FormUrlEncoded
157157
@POST("/pet/{petId}")
158158
Void updatePetWithForm(
159-
@Path("petId") Long petId,@Field("name") String name,@Field("status") String status
159+
@Path("petId") Long petId, @Field("name") String name, @Field("status") String status
160160
);
161161

162162
/**
@@ -172,7 +172,7 @@ Void updatePetWithForm(
172172
@FormUrlEncoded
173173
@POST("/pet/{petId}")
174174
void updatePetWithForm(
175-
@Path("petId") Long petId,@Field("name") String name,@Field("status") String status, Callback<Void> cb
175+
@Path("petId") Long petId, @Field("name") String name, @Field("status") String status, Callback<Void> cb
176176
);
177177

178178
/**
@@ -186,7 +186,7 @@ void updatePetWithForm(
186186

187187
@DELETE("/pet/{petId}")
188188
Void deletePet(
189-
@Path("petId") Long petId,@Header("api_key") String apiKey
189+
@Path("petId") Long petId, @Header("api_key") String apiKey
190190
);
191191

192192
/**
@@ -200,7 +200,7 @@ Void deletePet(
200200

201201
@DELETE("/pet/{petId}")
202202
void deletePet(
203-
@Path("petId") Long petId,@Header("api_key") String apiKey, Callback<Void> cb
203+
@Path("petId") Long petId, @Header("api_key") String apiKey, Callback<Void> cb
204204
);
205205

206206
/**
@@ -216,7 +216,7 @@ void deletePet(
216216
@Multipart
217217
@POST("/pet/{petId}/uploadImage")
218218
ApiResponse uploadFile(
219-
@Path("petId") Long petId,@Part("additionalMetadata") String additionalMetadata,@Part("file") TypedFile file
219+
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file") TypedFile file
220220
);
221221

222222
/**
@@ -232,7 +232,7 @@ ApiResponse uploadFile(
232232
@Multipart
233233
@POST("/pet/{petId}/uploadImage")
234234
void uploadFile(
235-
@Path("petId") Long petId,@Part("additionalMetadata") String additionalMetadata,@Part("file") TypedFile file, Callback<ApiResponse> cb
235+
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file") TypedFile file, Callback<ApiResponse> cb
236236
);
237237

238238
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public interface StoreApi {
3232

3333
@GET("/store/inventory")
3434
void getInventory(
35-
Callback<Map<String, Integer>> cb
35+
Callback<Map<String, Integer>> cb
3636
);
3737

3838
/**

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void createUsersWithListInput(
101101

102102
@GET("/user/login")
103103
String loginUser(
104-
@Query("username") String username,@Query("password") String password
104+
@Query("username") String username, @Query("password") String password
105105
);
106106

107107
/**
@@ -115,7 +115,7 @@ String loginUser(
115115

116116
@GET("/user/login")
117117
void loginUser(
118-
@Query("username") String username,@Query("password") String password, Callback<String> cb
118+
@Query("username") String username, @Query("password") String password, Callback<String> cb
119119
);
120120

121121
/**
@@ -138,7 +138,7 @@ void loginUser(
138138

139139
@GET("/user/logout")
140140
void logoutUser(
141-
Callback<Void> cb
141+
Callback<Void> cb
142142
);
143143

144144
/**
@@ -178,7 +178,7 @@ void getUserByName(
178178

179179
@PUT("/user/{username}")
180180
Void updateUser(
181-
@Path("username") String username,@Body User body
181+
@Path("username") String username, @Body User body
182182
);
183183

184184
/**
@@ -192,7 +192,7 @@ Void updateUser(
192192

193193
@PUT("/user/{username}")
194194
void updateUser(
195-
@Path("username") String username,@Body User body, Callback<Void> cb
195+
@Path("username") String username, @Body User body, Callback<Void> cb
196196
);
197197

198198
/**

0 commit comments

Comments
 (0)