swag: github.com/swaggo/swag/example/basic/api Index | Files

package api

import "github.com/swaggo/swag/example/basic/api"

Index

Package Files

api.go

func AnonymousField Uses

func AnonymousField()

AnonymousField example @Summary use Anonymous field @Success 200 {object} web.RevValue "ok"

func GetStringByInt Uses

func GetStringByInt(c *gin.Context)

GetStringByInt example @Summary Add a new pet to the store @Description get string by ID @ID get-string-by-int @Accept json @Produce json @Param some_id path int true "Some ID" @Param some_id body web.Pet true "Some ID" @Success 200 {string} string "ok" @Failure 400 {object} web.APIError "We need ID!!" @Failure 404 {object} web.APIError "Can not find ID" @Router /testapi/get-string-by-int/{some_id} [get]

func GetStructArrayByString Uses

func GetStructArrayByString(c *gin.Context)

GetStructArrayByString example @Description get struct array by ID @ID get-struct-array-by-string @Accept json @Produce json @Param some_id path string true "Some ID" @Param offset query int true "Offset" @Param limit query int true "Offset" @Success 200 {string} string "ok" @Failure 400 {object} web.APIError "We need ID!!" @Failure 404 {object} web.APIError "Can not find ID" @Router /testapi/get-struct-array-by-string/{some_id} [get]

func Upload Uses

func Upload(ctx *gin.Context)

Upload example @Summary Upload file @Description Upload file @ID file.upload @Accept multipart/form-data @Produce json @Param file formData file true "this is a test file" @Success 200 {string} string "ok" @Failure 400 {object} web.APIError "We need ID!!" @Failure 404 {object} web.APIError "Can not find ID" @Router /file/upload [post]

type Pet3 Uses

type Pet3 struct {
    ID int `json:"id"`
}

Pet3 example

Package api imports 2 packages (graph) and is imported by 1 packages. Updated 2019-07-17. Refresh now. Tools for package owners.