@@ -13,11 +13,13 @@ package io.swagger.server
1313
1414import io.ktor.application.ApplicationCall
1515import io.ktor.http.HttpMethod
16- import io.ktor.locations.*
17- import io.ktor.pipeline.PipelineContext
16+ import io.ktor.locations.handle
17+ import io.ktor.locations.location
18+ import io.ktor.locations.Location
19+ import io.ktor.util.pipeline.PipelineContext
1820import io.ktor.routing.Route
1921import io.ktor.routing.method
20- import io.swagger.server.models.*
22+
2123
2224
2325// NOTE: ktor-location@0.9.0 is missing extension for Route.delete. This includes it.
@@ -30,81 +32,104 @@ inline fun <reified T : Any> Route.delete(noinline body: suspend PipelineContext
3032}
3133
3234object Paths {
35+ /* *
36+ * Add a new pet to the store
37+ *
38+ */
39+ @Location(" /pet" ) class addPet ()
3340 /* *
3441 * Deletes a pet
3542 *
36- * @param petId Pet id to delete
37- * @param apiKey (optional)
3843 */
39- @Location(" /pet/{petId}" ) class deletePet (val petId : kotlin.Long , val apiKey : kotlin.String )
40-
44+ @Location(" /pet/{petId}" ) class deletePet ()
4145 /* *
4246 * Finds Pets by status
4347 * Multiple status values can be provided with comma separated strings
44- * @param status Status values that need to be considered for filter
4548 */
46- @Location(" /pet/findByStatus" ) class findPetsByStatus (val status : kotlin.Array <kotlin.String >)
47-
49+ @Location(" /pet/findByStatus" ) class findPetsByStatus ()
4850 /* *
4951 * Finds Pets by tags
5052 * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
51- * @param tags Tags to filter by
5253 */
53- @Location(" /pet/findByTags" ) class findPetsByTags (val tags : kotlin.Array <kotlin.String >)
54-
54+ @Location(" /pet/findByTags" ) class findPetsByTags ()
5555 /* *
5656 * Find pet by ID
5757 * Returns a single pet
58- * @param petId ID of pet to return
5958 */
60- @Location(" /pet/{petId}" ) class getPetById (val petId : kotlin.Long )
61-
59+ @Location(" /pet/{petId}" ) class getPetById ()
60+ /* *
61+ * Update an existing pet
62+ *
63+ */
64+ @Location(" /pet" ) class updatePet ()
65+ /* *
66+ * Updates a pet in the store with form data
67+ *
68+ */
69+ @Location(" /pet/{petId}" ) class updatePetWithForm ()
70+ /* *
71+ * uploads an image
72+ *
73+ */
74+ @Location(" /pet/{petId}/uploadImage" ) class uploadFile ()
6275 /* *
6376 * Delete purchase order by ID
6477 * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
65- * @param orderId ID of the order that needs to be deleted
6678 */
67- @Location(" /store/order/{orderId}" ) class deleteOrder (val orderId : kotlin.String )
68-
79+ @Location(" /store/order/{orderId}" ) class deleteOrder ()
6980 /* *
7081 * Returns pet inventories by status
7182 * Returns a map of status codes to quantities
7283 */
7384 @Location(" /store/inventory" ) class getInventory ()
74-
7585 /* *
7686 * Find purchase order by ID
7787 * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
78- * @param orderId ID of pet that needs to be fetched
7988 */
80- @Location(" /store/order/{orderId}" ) class getOrderById (val orderId : kotlin.Long )
81-
89+ @Location(" /store/order/{orderId}" ) class getOrderById ()
90+ /* *
91+ * Place an order for a pet
92+ *
93+ */
94+ @Location(" /store/order" ) class placeOrder ()
95+ /* *
96+ * Create user
97+ * This can only be done by the logged in user.
98+ */
99+ @Location(" /user" ) class createUser ()
100+ /* *
101+ * Creates list of users with given input array
102+ *
103+ */
104+ @Location(" /user/createWithArray" ) class createUsersWithArrayInput ()
105+ /* *
106+ * Creates list of users with given input array
107+ *
108+ */
109+ @Location(" /user/createWithList" ) class createUsersWithListInput ()
82110 /* *
83111 * Delete user
84112 * This can only be done by the logged in user.
85- * @param username The name that needs to be deleted
86113 */
87- @Location(" /user/{username}" ) class deleteUser (val username : kotlin.String )
88-
114+ @Location(" /user/{username}" ) class deleteUser ()
89115 /* *
90116 * Get user by user name
91117 *
92- * @param username The name that needs to be fetched. Use user1 for testing.
93118 */
94- @Location(" /user/{username}" ) class getUserByName (val username : kotlin.String )
95-
119+ @Location(" /user/{username}" ) class getUserByName ()
96120 /* *
97121 * Logs user into the system
98122 *
99- * @param username The user name for login
100- * @param password The password for login in clear text
101123 */
102- @Location(" /user/login" ) class loginUser (val username : kotlin.String , val password : kotlin.String )
103-
124+ @Location(" /user/login" ) class loginUser ()
104125 /* *
105126 * Logs out current logged in user session
106127 *
107128 */
108129 @Location(" /user/logout" ) class logoutUser ()
109-
130+ /* *
131+ * Updated user
132+ * This can only be done by the logged in user.
133+ */
134+ @Location(" /user/{username}" ) class updateUser ()
110135}
0 commit comments