1 Star 0 Fork 0

KathentGitee / go-swagger

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
api.go 1.62 KB
一键复制 编辑 原始数据 按行查看 历史
// Package booking API.
//
// the purpose of this application is to provide an application
// that is using plain go code to define an API
//
//
// Schemes: https
// Host: localhost
// Version: 0.0.1
//
// Consumes:
// - application/json
//
// Produces:
// - application/json
//
//
// swagger:meta
package spec
import (
"net/http"
"github.com/go-swagger/scan-repo-boundary/makeplans"
)
// Customer of the site.
//
// swagger:model Customer
type Customer struct {
Name string `json:"name"`
}
// IgnoreMe should not be added to definitions since it is not annotated.
type IgnoreMe struct {
Name string `json:"name"`
}
// DateRange represents a scheduled appointments time
// DateRange should be in definitions since it's being used in a response
type DateRange struct {
Start string `json:"start"`
End string `json:"end"`
}
// BookingResponse represents a scheduled appointment
//
// swagger:response BookingResponse
type BookingResponse struct {
// Booking struct
//
// in: body
// required: true
Body struct {
Booking makeplans.Booking `json:"booking"`
Customer Customer `json:"customer"`
Dates DateRange `json:"dates"`
// example: {"key": "value"}
Map map[string]string `json:"map"`
// example: [1, 2]
Slice []int `json:"slice"`
}
}
// Bookings swagger:route GET /admin/bookings/ booking Bookings
//
// Bookings lists all the appointments that have been made on the site.
//
//
// Consumes:
// application/json
//
// Schemes: http, https
//
// Produces:
// application/json
//
// Responses:
// 200: BookingResponse
func bookings(w http.ResponseWriter, r *http.Request) {
}
Go
1
https://gitee.com/kathent/go-swagger.git
git@gitee.com:kathent/go-swagger.git
kathent
go-swagger
go-swagger
v0.19.0

搜索帮助