forked from loafle/openapi-generator-original
* Output swagger models. Fix route verbs and formatting * Remove backup files * Make postProcessOperations consistent with go client
This commit is contained in:
@@ -1,8 +1,19 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* API version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
|
||||
package petstoreserver
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
@@ -47,140 +58,140 @@ var routes = Routes{
|
||||
|
||||
Route{
|
||||
"AddPet",
|
||||
"POST",
|
||||
strings.ToUpper("Post"),
|
||||
"/v2/pet",
|
||||
AddPet,
|
||||
},
|
||||
|
||||
Route{
|
||||
"DeletePet",
|
||||
"DELETE",
|
||||
strings.ToUpper("Delete"),
|
||||
"/v2/pet/{petId}",
|
||||
DeletePet,
|
||||
},
|
||||
|
||||
Route{
|
||||
"FindPetsByStatus",
|
||||
"GET",
|
||||
strings.ToUpper("Get"),
|
||||
"/v2/pet/findByStatus",
|
||||
FindPetsByStatus,
|
||||
},
|
||||
|
||||
Route{
|
||||
"FindPetsByTags",
|
||||
"GET",
|
||||
strings.ToUpper("Get"),
|
||||
"/v2/pet/findByTags",
|
||||
FindPetsByTags,
|
||||
},
|
||||
|
||||
Route{
|
||||
"GetPetById",
|
||||
"GET",
|
||||
strings.ToUpper("Get"),
|
||||
"/v2/pet/{petId}",
|
||||
GetPetById,
|
||||
},
|
||||
|
||||
Route{
|
||||
"UpdatePet",
|
||||
"PUT",
|
||||
strings.ToUpper("Put"),
|
||||
"/v2/pet",
|
||||
UpdatePet,
|
||||
},
|
||||
|
||||
Route{
|
||||
"UpdatePetWithForm",
|
||||
"POST",
|
||||
strings.ToUpper("Post"),
|
||||
"/v2/pet/{petId}",
|
||||
UpdatePetWithForm,
|
||||
},
|
||||
|
||||
Route{
|
||||
"UploadFile",
|
||||
"POST",
|
||||
strings.ToUpper("Post"),
|
||||
"/v2/pet/{petId}/uploadImage",
|
||||
UploadFile,
|
||||
},
|
||||
|
||||
Route{
|
||||
"DeleteOrder",
|
||||
"DELETE",
|
||||
strings.ToUpper("Delete"),
|
||||
"/v2/store/order/{orderId}",
|
||||
DeleteOrder,
|
||||
},
|
||||
|
||||
Route{
|
||||
"GetInventory",
|
||||
"GET",
|
||||
strings.ToUpper("Get"),
|
||||
"/v2/store/inventory",
|
||||
GetInventory,
|
||||
},
|
||||
|
||||
Route{
|
||||
"GetOrderById",
|
||||
"GET",
|
||||
strings.ToUpper("Get"),
|
||||
"/v2/store/order/{orderId}",
|
||||
GetOrderById,
|
||||
},
|
||||
|
||||
Route{
|
||||
"PlaceOrder",
|
||||
"POST",
|
||||
strings.ToUpper("Post"),
|
||||
"/v2/store/order",
|
||||
PlaceOrder,
|
||||
},
|
||||
|
||||
Route{
|
||||
"CreateUser",
|
||||
"POST",
|
||||
strings.ToUpper("Post"),
|
||||
"/v2/user",
|
||||
CreateUser,
|
||||
},
|
||||
|
||||
Route{
|
||||
"CreateUsersWithArrayInput",
|
||||
"POST",
|
||||
strings.ToUpper("Post"),
|
||||
"/v2/user/createWithArray",
|
||||
CreateUsersWithArrayInput,
|
||||
},
|
||||
|
||||
Route{
|
||||
"CreateUsersWithListInput",
|
||||
"POST",
|
||||
strings.ToUpper("Post"),
|
||||
"/v2/user/createWithList",
|
||||
CreateUsersWithListInput,
|
||||
},
|
||||
|
||||
Route{
|
||||
"DeleteUser",
|
||||
"DELETE",
|
||||
strings.ToUpper("Delete"),
|
||||
"/v2/user/{username}",
|
||||
DeleteUser,
|
||||
},
|
||||
|
||||
Route{
|
||||
"GetUserByName",
|
||||
"GET",
|
||||
strings.ToUpper("Get"),
|
||||
"/v2/user/{username}",
|
||||
GetUserByName,
|
||||
},
|
||||
|
||||
Route{
|
||||
"LoginUser",
|
||||
"GET",
|
||||
strings.ToUpper("Get"),
|
||||
"/v2/user/login",
|
||||
LoginUser,
|
||||
},
|
||||
|
||||
Route{
|
||||
"LogoutUser",
|
||||
"GET",
|
||||
strings.ToUpper("Get"),
|
||||
"/v2/user/logout",
|
||||
LogoutUser,
|
||||
},
|
||||
|
||||
Route{
|
||||
"UpdateUser",
|
||||
"PUT",
|
||||
strings.ToUpper("Put"),
|
||||
"/v2/user/{username}",
|
||||
UpdateUser,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user