Documentation
¶
Index ¶
Constants ¶
View Source
const ( ParameterInQuery = "query" ParameterInFormData = "formData" ParameterInHeader = "header" )
ParameterIn 参数来源
View Source
const ( SchemaTypeString = "string" SchemaTypeInteger = "integer" SchemaTypeNumber = "number" SchemaTypeBoolean = "boolean" SchemaTypeFile = "file" SchemaTypeObject = "object" SchemaTypeArray = "array" )
SchemaType 概要类型
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Definition ¶
type Definition struct {
Type string `json:"type"`
Required []string `json:"required"`
Properties map[string]*Schema `json:"properties"`
AdditionalProperties *Schema `json:"additionalProperties"`
}
Definition 定义详情
type Info ¶
type Info struct {
Description string `json:"description"`
Title string `json:"title"`
Version string `json:"version"`
}
Info 项目详情
type Operation ¶
type Operation struct {
Consumes []string `json:"consumes"`
Produces []string `json:"produces"`
Tags []string `json:"tags"`
Summary string `json:"summary"`
Security []map[string][]string `json:"security"`
Parameters []*Parameter `json:"parameters"`
Responses map[int]*Response `json:"responses"`
}
Operation 操作详情
type Parameter ¶
type Parameter struct {
Description string `json:"description"`
Type string `json:"type"`
Name string `json:"name"`
In string `json:"in"`
Required bool `json:"required"`
Schema *Schema `json:"schema"`
}
Parameter 参数详情
type PathInfo ¶
type PathInfo struct {
Tag string
Method string
Path string
Summary string
NeedAuth bool
Consume string
Produce string
Parameters []*Parameter
Responses map[int]*Response
}
PathInfo 路径详情
type PropertySorter ¶
type PropertySorter []*Property
PropertySorter 属性字段排序器
func NewPropertySorter ¶
func NewPropertySorter(m map[string]*Schema) PropertySorter
NewPropertySorter 新建属性字段排序器
type Schema ¶
type Schema struct {
Ref string `json:"$ref"`
Description string `json:"description"`
Type string `json:"type"`
XOrder string `json:"x-order"`
Properties map[string]*Schema `json:"properties"`
AllOf []*Schema `json:"allOf"`
Items *Schema `json:"items"`
Example interface{} `json:"example"`
AdditionalProperties *Schema `json:"additionalProperties"`
}
Schema 概要详情
Click to show internal directories.
Click to hide internal directories.