func configureAPI(api *operations.TodoListAPI) http.Handler { // configure the api here api.ServeError = errors.ServeError api.JSONConsumer = httpkit.JSONConsumer() api.JSONProducer = httpkit.JSONProducer() api.KeyAuth = func(token string) (interface{}, error) { return nil, errors.NotImplemented("api key auth (key) x-petstore-token from header has not yet been implemented") } api.TodosAddOneHandler = todos.AddOneHandlerFunc(func(params todos.AddOneParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation todos.AddOne has not yet been implemented") }) api.TodosDestroyOneHandler = todos.DestroyOneHandlerFunc(func(params todos.DestroyOneParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation todos.DestroyOne has not yet been implemented") }) api.TodosFindHandler = todos.FindHandlerFunc(func(params todos.FindParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation todos.Find has not yet been implemented") }) api.TodosUpdateOneHandler = todos.UpdateOneHandlerFunc(func(params todos.UpdateOneParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation todos.UpdateOne has not yet been implemented") }) api.ServerShutdown = func() {} // api.CommandLineOptionsGroups = []swag.CommandLineOptionsGroup{ ... } return setupGlobalMiddleware(api.Serve(setupMiddlewares)) }
func configureAPI(api *operations.ToDoListAPI) { // configure the api here api.ServeError = errors.ServeError api.JSONConsumer = httpkit.JSONConsumer() api.JSONProducer = httpkit.JSONProducer() api.XPetstoreTokenAuth = func(token string) (interface{}, error) { return nil, errors.NotImplemented("api key auth x-petstore-token from header has not yet been implemented") } api.AddOneHandler = todos.AddOneHandlerFunc(func(principal interface{}) middleware.Responder { return middleware.NotImplemented("operation addOne has not yet been implemented") }) api.DestroyOneHandler = todos.DestroyOneHandlerFunc(func(params todos.DestroyOneParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation destroyOne has not yet been implemented") }) api.FindHandler = todos.FindHandlerFunc(func(principal interface{}) middleware.Responder { return middleware.NotImplemented("operation find has not yet been implemented") }) api.UpdateOneHandler = todos.UpdateOneHandlerFunc(func(params todos.UpdateOneParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation updateOne has not yet been implemented") }) }
func configureAPI(api *operations.TaskTrackerAPI) http.Handler { // configure the api here api.ServeError = errors.ServeError api.JSONConsumer = httpkit.JSONConsumer() api.JSONProducer = httpkit.JSONProducer() api.APIKeyAuth = func(token string) (interface{}, error) { return nil, errors.NotImplemented("api key auth (api_key) token from query has not yet been implemented") } api.TokenHeaderAuth = func(token string) (interface{}, error) { return nil, errors.NotImplemented("api key auth (token_header) X-Token from header has not yet been implemented") } api.TasksAddCommentToTaskHandler = tasks.AddCommentToTaskHandlerFunc(func(params tasks.AddCommentToTaskParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation tasks.AddCommentToTask has not yet been implemented") }) api.TasksCreateTaskHandler = tasks.CreateTaskHandlerFunc(func(params tasks.CreateTaskParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation tasks.CreateTask has not yet been implemented") }) api.TasksDeleteTaskHandler = tasks.DeleteTaskHandlerFunc(func(params tasks.DeleteTaskParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation tasks.DeleteTask has not yet been implemented") }) api.TasksGetTaskCommentsHandler = tasks.GetTaskCommentsHandlerFunc(func(params tasks.GetTaskCommentsParams) middleware.Responder { return middleware.NotImplemented("operation tasks.GetTaskComments has not yet been implemented") }) api.TasksGetTaskDetailsHandler = tasks.GetTaskDetailsHandlerFunc(func(params tasks.GetTaskDetailsParams) middleware.Responder { return middleware.NotImplemented("operation tasks.GetTaskDetails has not yet been implemented") }) api.TasksListTasksHandler = tasks.ListTasksHandlerFunc(func(params tasks.ListTasksParams) middleware.Responder { return middleware.NotImplemented("operation tasks.ListTasks has not yet been implemented") }) api.TasksUpdateTaskHandler = tasks.UpdateTaskHandlerFunc(func(params tasks.UpdateTaskParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation tasks.UpdateTask has not yet been implemented") }) api.TasksUploadTaskFileHandler = tasks.UploadTaskFileHandlerFunc(func(params tasks.UploadTaskFileParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation tasks.UploadTaskFile has not yet been implemented") }) api.ServerShutdown = func() {} // api.CommandLineOptionsGroups = []swag.CommandLineOptionsGroup{ ... } return setupGlobalMiddleware(api.Serve(setupMiddlewares)) }
func configureAPI(api *operations.TestSpecAPI) { // configure the api here api.ServeError = errors.ServeError api.Handler = HandlerFunc(func() (*models.Model, error) { return nil, errors.NotImplemented("operation has not yet been implemented") }) }
func configureAPI(api *operations.SwaggerAPI) { // configure the api here api.ServeError = errors.ServeError api.JSONConsumer = swagger.JSONConsumer() api.JSONProducer = swagger.JSONProducer() api.Handler = HandlerFunc(func() (*models.Model, error) { return nil, errors.NotImplemented("operation has not yet been implemented") }) }
func configureAPI(api *operations.PetStoreAPI) { // configure the api here api.ServeError = errors.ServeError api.XMLConsumer = httpkit.ConsumerFunc(func(r io.Reader, target interface{}) error { return errors.NotImplemented("xml consumer has not yet been implemented") }) api.JSONConsumer = httpkit.JSONConsumer() api.JSONProducer = httpkit.JSONProducer() api.XMLProducer = httpkit.ProducerFunc(func(w io.Writer, data interface{}) error { return errors.NotImplemented("xml producer has not yet been implemented") }) api.APIKeyAuth = func(token string) (*models.User, error) { return nil, errors.NotImplemented("api key auth api_key from header has not yet been implemented") } api.GetPetByIDHandler = pet.GetPetByIDHandlerFunc(func(params pet.GetPetByIDParams, principal *models.User) (*models.Pet, error) { return nil, errors.NotImplemented("operation getPetById has not yet been implemented") }) api.LogoutUserHandler = user.LogoutUserHandlerFunc(func() error { return errors.NotImplemented("operation logoutUser has not yet been implemented") }) api.DeleteUserHandler = user.DeleteUserHandlerFunc(func(params user.DeleteUserParams) error { return errors.NotImplemented("operation deleteUser has not yet been implemented") }) api.DeleteOrderHandler = store.DeleteOrderHandlerFunc(func(params store.DeleteOrderParams) error { return errors.NotImplemented("operation deleteOrder has not yet been implemented") }) api.UpdateUserHandler = user.UpdateUserHandlerFunc(func(params user.UpdateUserParams) error { return errors.NotImplemented("operation updateUser has not yet been implemented") }) api.LoginUserHandler = user.LoginUserHandlerFunc(func(params user.LoginUserParams) (string, error) { return "", errors.NotImplemented("operation loginUser has not yet been implemented") }) api.DeletePetHandler = pet.DeletePetHandlerFunc(func(params pet.DeletePetParams, principal *models.User) error { return errors.NotImplemented("operation deletePet has not yet been implemented") }) api.UpdatePetHandler = pet.UpdatePetHandlerFunc(func(params pet.UpdatePetParams, principal *models.User) error { return errors.NotImplemented("operation updatePet has not yet been implemented") }) api.CreateUsersWithListInputHandler = user.CreateUsersWithListInputHandlerFunc(func(params user.CreateUsersWithListInputParams) error { return errors.NotImplemented("operation createUsersWithListInput has not yet been implemented") }) api.AddPetHandler = pet.AddPetHandlerFunc(func(params pet.AddPetParams, principal *models.User) error { return errors.NotImplemented("operation addPet has not yet been implemented") }) api.CreateUserHandler = user.CreateUserHandlerFunc(func(params user.CreateUserParams) error { return errors.NotImplemented("operation createUser has not yet been implemented") }) api.FindPetsByStatusHandler = pet.FindPetsByStatusHandlerFunc(func(params pet.FindPetsByStatusParams, principal *models.User) ([]models.Pet, error) { return nil, errors.NotImplemented("operation findPetsByStatus has not yet been implemented") }) api.GetUserByNameHandler = user.GetUserByNameHandlerFunc(func(params user.GetUserByNameParams) (*models.User, error) { return nil, errors.NotImplemented("operation getUserByName has not yet been implemented") }) api.PlaceOrderHandler = store.PlaceOrderHandlerFunc(func(params store.PlaceOrderParams) (*models.Order, error) { return nil, errors.NotImplemented("operation placeOrder has not yet been implemented") }) api.UpdatePetWithFormHandler = pet.UpdatePetWithFormHandlerFunc(func(params pet.UpdatePetWithFormParams, principal *models.User) error { return errors.NotImplemented("operation updatePetWithForm has not yet been implemented") }) api.GetOrderByIDHandler = store.GetOrderByIDHandlerFunc(func(params store.GetOrderByIDParams) (*models.Order, error) { return nil, errors.NotImplemented("operation getOrderById has not yet been implemented") }) api.FindPetsByTagsHandler = pet.FindPetsByTagsHandlerFunc(func(params pet.FindPetsByTagsParams, principal *models.User) ([]models.Pet, error) { return nil, errors.NotImplemented("operation findPetsByTags has not yet been implemented") }) api.CreateUsersWithArrayInputHandler = user.CreateUsersWithArrayInputHandlerFunc(func(params user.CreateUsersWithArrayInputParams) error { return errors.NotImplemented("operation createUsersWithArrayInput has not yet been implemented") }) }
func configureAPI(api *operations.PetstoreAPI) http.Handler { // configure the api here api.ServeError = errors.ServeError api.JSONConsumer = httpkit.JSONConsumer() api.XMLConsumer = httpkit.ConsumerFunc(func(r io.Reader, target interface{}) error { return errors.NotImplemented("xml consumer has not yet been implemented") }) api.JSONProducer = httpkit.JSONProducer() api.XMLProducer = httpkit.ProducerFunc(func(w io.Writer, data interface{}) error { return errors.NotImplemented("xml producer has not yet been implemented") }) api.APIKeyAuth = func(token string) (interface{}, error) { return nil, errors.NotImplemented("api key auth (api_key) api_key from header has not yet been implemented") } api.PetAddPetHandler = pet.AddPetHandlerFunc(func(params pet.AddPetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation pet.AddPet has not yet been implemented") }) api.UserCreateUserHandler = user.CreateUserHandlerFunc(func(params user.CreateUserParams) middleware.Responder { return middleware.NotImplemented("operation user.CreateUser has not yet been implemented") }) api.UserCreateUsersWithArrayInputHandler = user.CreateUsersWithArrayInputHandlerFunc(func(params user.CreateUsersWithArrayInputParams) middleware.Responder { return middleware.NotImplemented("operation user.CreateUsersWithArrayInput has not yet been implemented") }) api.UserCreateUsersWithListInputHandler = user.CreateUsersWithListInputHandlerFunc(func(params user.CreateUsersWithListInputParams) middleware.Responder { return middleware.NotImplemented("operation user.CreateUsersWithListInput has not yet been implemented") }) api.StoreDeleteOrderHandler = store.DeleteOrderHandlerFunc(func(params store.DeleteOrderParams) middleware.Responder { return middleware.NotImplemented("operation store.DeleteOrder has not yet been implemented") }) api.PetDeletePetHandler = pet.DeletePetHandlerFunc(func(params pet.DeletePetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation pet.DeletePet has not yet been implemented") }) api.UserDeleteUserHandler = user.DeleteUserHandlerFunc(func(params user.DeleteUserParams) middleware.Responder { return middleware.NotImplemented("operation user.DeleteUser has not yet been implemented") }) api.PetFindPetsByStatusHandler = pet.FindPetsByStatusHandlerFunc(func(params pet.FindPetsByStatusParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation pet.FindPetsByStatus has not yet been implemented") }) api.PetFindPetsByTagsHandler = pet.FindPetsByTagsHandlerFunc(func(params pet.FindPetsByTagsParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation pet.FindPetsByTags has not yet been implemented") }) api.StoreGetInventoryHandler = store.GetInventoryHandlerFunc(func(principal interface{}) middleware.Responder { return middleware.NotImplemented("operation store.GetInventory has not yet been implemented") }) api.StoreGetOrderByIDHandler = store.GetOrderByIDHandlerFunc(func(params store.GetOrderByIDParams) middleware.Responder { return middleware.NotImplemented("operation store.GetOrderByID has not yet been implemented") }) api.PetGetPetByIDHandler = pet.GetPetByIDHandlerFunc(func(params pet.GetPetByIDParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation pet.GetPetByID has not yet been implemented") }) api.UserGetUserByNameHandler = user.GetUserByNameHandlerFunc(func(params user.GetUserByNameParams) middleware.Responder { return middleware.NotImplemented("operation user.GetUserByName has not yet been implemented") }) api.UserLoginUserHandler = user.LoginUserHandlerFunc(func(params user.LoginUserParams) middleware.Responder { return middleware.NotImplemented("operation user.LoginUser has not yet been implemented") }) api.UserLogoutUserHandler = user.LogoutUserHandlerFunc(func() middleware.Responder { return middleware.NotImplemented("operation user.LogoutUser has not yet been implemented") }) api.StorePlaceOrderHandler = store.PlaceOrderHandlerFunc(func(params store.PlaceOrderParams) middleware.Responder { return middleware.NotImplemented("operation store.PlaceOrder has not yet been implemented") }) api.PetUpdatePetHandler = pet.UpdatePetHandlerFunc(func(params pet.UpdatePetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation pet.UpdatePet has not yet been implemented") }) api.PetUpdatePetWithFormHandler = pet.UpdatePetWithFormHandlerFunc(func(params pet.UpdatePetWithFormParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation pet.UpdatePetWithForm has not yet been implemented") }) api.UserUpdateUserHandler = user.UpdateUserHandlerFunc(func(params user.UpdateUserParams) middleware.Responder { return middleware.NotImplemented("operation user.UpdateUser has not yet been implemented") }) api.PetUploadFileHandler = pet.UploadFileHandlerFunc(func(params pet.UploadFileParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation pet.UploadFile has not yet been implemented") }) api.ServerShutdown = func() {} // api.CommandLineOptionsGroups = []swag.CommandLineOptionsGroup{ ... } return setupGlobalMiddleware(api.Serve(setupMiddlewares)) }