Skip to content

Commit 26fd529

Browse files
committed
feat: Added HTTP method+path to JavaDocs in kotlin volley client
1 parent 9a1584f commit 26fd529

File tree

6 files changed

+23
-0
lines changed
  • modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley
  • samples/client/petstore

6 files changed

+23
-0
lines changed

modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/api.mustache

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {{packageName}}.infrastructure.CollectionFormats.*
3737
3838
{{#operation}}
3939
/**
40+
* {{{httpMethod}}} {{{path}}}
4041
* {{summary}}
4142
* {{notes}}
4243
{{#allParams}}* @param {{{paramName}}} {{description}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}{{/required}}

samples/client/petstore/kotlin-array-simple-string-jvm-volley/src/main/java/org/openapitools/client/apis/DefaultApi.kt

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class DefaultApi (
3333
private val postProcessors :List <(Request<*>) -> Unit> = listOf()) {
3434

3535
/**
36+
* GET /{ids}
3637
*
3738
*
3839
* @param ids

samples/client/petstore/kotlin-default-values-jvm-volley/src/main/java/org/openapitools/client/apis/DefaultApi.kt

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class DefaultApi (
3333
private val postProcessors :List <(Request<*>) -> Unit> = listOf()) {
3434

3535
/**
36+
* POST /test
3637
* Tests default values
3738
* Tests default values of different parameters
3839
* @param pi0 (default to 10)

samples/client/petstore/kotlin-jvm-volley/src/main/java/org/openapitools/client/apis/PetApi.kt

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class PetApi (
3535
private val postProcessors :List <(Request<*>) -> Unit> = listOf()) {
3636

3737
/**
38+
* POST /pet
3839
* Add a new pet to the store
3940
*
4041
* @param body Pet object that needs to be added to the store
@@ -96,6 +97,7 @@ class PetApi (
9697
}
9798
}
9899
/**
100+
* DELETE /pet/{petId}
99101
* Deletes a pet
100102
*
101103
* @param petId Pet id to delete
@@ -160,6 +162,7 @@ class PetApi (
160162
}
161163
}
162164
/**
165+
* GET /pet/findByStatus
163166
* Finds Pets by status
164167
* Multiple status values can be provided with comma separated strings
165168
* @param status Status values that need to be considered for filter
@@ -223,6 +226,7 @@ class PetApi (
223226
}
224227
}
225228
/**
229+
* GET /pet/findByTags
226230
* Finds Pets by tags
227231
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
228232
* @param tags Tags to filter by
@@ -287,6 +291,7 @@ class PetApi (
287291
}
288292
}
289293
/**
294+
* GET /pet/{petId}
290295
* Find pet by ID
291296
* Returns a single pet
292297
* @param petId ID of pet to return
@@ -348,6 +353,7 @@ class PetApi (
348353
}
349354
}
350355
/**
356+
* PUT /pet
351357
* Update an existing pet
352358
*
353359
* @param body Pet object that needs to be added to the store
@@ -409,6 +415,7 @@ class PetApi (
409415
}
410416
}
411417
/**
418+
* POST /pet/{petId}
412419
* Updates a pet in the store with form data
413420
*
414421
* @param petId ID of pet that needs to be updated
@@ -475,6 +482,7 @@ class PetApi (
475482
}
476483
}
477484
/**
485+
* POST /pet/{petId}/uploadImage
478486
* uploads an image
479487
*
480488
* @param petId ID of pet to update

samples/client/petstore/kotlin-jvm-volley/src/main/java/org/openapitools/client/apis/StoreApi.kt

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class StoreApi (
3434
private val postProcessors :List <(Request<*>) -> Unit> = listOf()) {
3535

3636
/**
37+
* DELETE /store/order/{orderId}
3738
* Delete purchase order by ID
3839
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
3940
* @param orderId ID of the order that needs to be deleted
@@ -95,6 +96,7 @@ class StoreApi (
9596
}
9697
}
9798
/**
99+
* GET /store/inventory
98100
* Returns pet inventories by status
99101
* Returns a map of status codes to quantities
100102
* @return kotlin.collections.Map<kotlin.String, kotlin.Int>
@@ -155,6 +157,7 @@ class StoreApi (
155157
}
156158
}
157159
/**
160+
* GET /store/order/{orderId}
158161
* Find purchase order by ID
159162
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generate exceptions
160163
* @param orderId ID of pet that needs to be fetched
@@ -216,6 +219,7 @@ class StoreApi (
216219
}
217220
}
218221
/**
222+
* POST /store/order
219223
* Place an order for a pet
220224
*
221225
* @param body order placed for purchasing the pet

samples/client/petstore/kotlin-jvm-volley/src/main/java/org/openapitools/client/apis/UserApi.kt

+8
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class UserApi (
3434
private val postProcessors :List <(Request<*>) -> Unit> = listOf()) {
3535

3636
/**
37+
* POST /user
3738
* Create user
3839
* This can only be done by the logged in user.
3940
* @param body Created user object
@@ -95,6 +96,7 @@ class UserApi (
9596
}
9697
}
9798
/**
99+
* POST /user/createWithArray
98100
* Creates list of users with given input array
99101
*
100102
* @param body List of user object
@@ -156,6 +158,7 @@ class UserApi (
156158
}
157159
}
158160
/**
161+
* POST /user/createWithList
159162
* Creates list of users with given input array
160163
*
161164
* @param body List of user object
@@ -217,6 +220,7 @@ class UserApi (
217220
}
218221
}
219222
/**
223+
* DELETE /user/{username}
220224
* Delete user
221225
* This can only be done by the logged in user.
222226
* @param username The name that needs to be deleted
@@ -278,6 +282,7 @@ class UserApi (
278282
}
279283
}
280284
/**
285+
* GET /user/{username}
281286
* Get user by user name
282287
*
283288
* @param username The name that needs to be fetched. Use user1 for testing.
@@ -339,6 +344,7 @@ class UserApi (
339344
}
340345
}
341346
/**
347+
* GET /user/login
342348
* Logs user into the system
343349
*
344350
* @param username The user name for login
@@ -404,6 +410,7 @@ class UserApi (
404410
}
405411
}
406412
/**
413+
* GET /user/logout
407414
* Logs out current logged in user session
408415
*
409416
* @return void
@@ -464,6 +471,7 @@ class UserApi (
464471
}
465472
}
466473
/**
474+
* PUT /user/{username}
467475
* Updated user
468476
* This can only be done by the logged in user.
469477
* @param username name that need to be deleted

0 commit comments

Comments
 (0)