forked from loafle/openapi-generator-original
* Implement postProcessWebhooksWithModels * Implement postProcessWebhooksWithModels * Add missing webhook handlers * Test webhook handler * Generate samples
75 lines
1.8 KiB
Go
75 lines
1.8 KiB
Go
/*
|
|
* OpenAPI Petstore
|
|
*
|
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
|
*
|
|
* API version: 1.0.0
|
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
*/
|
|
|
|
package petstoreserver
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type UserAPI struct {
|
|
}
|
|
|
|
// Post /v2/user
|
|
// Create user
|
|
func (api *UserAPI) CreateUser(c *gin.Context) {
|
|
// Your handler implementation
|
|
c.JSON(200, gin.H{"status": "OK"})
|
|
}
|
|
|
|
// Post /v2/user/createWithArray
|
|
// Creates list of users with given input array
|
|
func (api *UserAPI) CreateUsersWithArrayInput(c *gin.Context) {
|
|
// Your handler implementation
|
|
c.JSON(200, gin.H{"status": "OK"})
|
|
}
|
|
|
|
// Post /v2/user/createWithList
|
|
// Creates list of users with given input array
|
|
func (api *UserAPI) CreateUsersWithListInput(c *gin.Context) {
|
|
// Your handler implementation
|
|
c.JSON(200, gin.H{"status": "OK"})
|
|
}
|
|
|
|
// Delete /v2/user/:username
|
|
// Delete user
|
|
func (api *UserAPI) DeleteUser(c *gin.Context) {
|
|
// Your handler implementation
|
|
c.JSON(200, gin.H{"status": "OK"})
|
|
}
|
|
|
|
// Get /v2/user/:username
|
|
// Get user by user name
|
|
func (api *UserAPI) GetUserByName(c *gin.Context) {
|
|
// Your handler implementation
|
|
c.JSON(200, gin.H{"status": "OK"})
|
|
}
|
|
|
|
// Get /v2/user/login
|
|
// Logs user into the system
|
|
func (api *UserAPI) LoginUser(c *gin.Context) {
|
|
// Your handler implementation
|
|
c.JSON(200, gin.H{"status": "OK"})
|
|
}
|
|
|
|
// Get /v2/user/logout
|
|
// Logs out current logged in user session
|
|
func (api *UserAPI) LogoutUser(c *gin.Context) {
|
|
// Your handler implementation
|
|
c.JSON(200, gin.H{"status": "OK"})
|
|
}
|
|
|
|
// Put /v2/user/:username
|
|
// Updated user
|
|
func (api *UserAPI) UpdateUser(c *gin.Context) {
|
|
// Your handler implementation
|
|
c.JSON(200, gin.H{"status": "OK"})
|
|
}
|
|
|