forked from loafle/openapi-generator-original
* copy from go-server and add go-gin-server generator * change the templates for the gin * fix warnings of the golint tool * fix the path of script * add samples * delete unnecessary comments (#1048) * make the help message more appropriate (#1048) * fix the link address format (#1048) * minor improvement
57 lines
1.2 KiB
Go
57 lines
1.2 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 (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// AddPet - Add a new pet to the store
|
|
func AddPet(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{})
|
|
}
|
|
|
|
// DeletePet - Deletes a pet
|
|
func DeletePet(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{})
|
|
}
|
|
|
|
// FindPetsByStatus - Finds Pets by status
|
|
func FindPetsByStatus(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{})
|
|
}
|
|
|
|
// FindPetsByTags - Finds Pets by tags
|
|
func FindPetsByTags(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{})
|
|
}
|
|
|
|
// GetPetById - Find pet by ID
|
|
func GetPetById(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{})
|
|
}
|
|
|
|
// UpdatePet - Update an existing pet
|
|
func UpdatePet(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{})
|
|
}
|
|
|
|
// UpdatePetWithForm - Updates a pet in the store with form data
|
|
func UpdatePetWithForm(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{})
|
|
}
|
|
|
|
// UploadFile - uploads an image
|
|
func UploadFile(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{})
|
|
}
|