Documentation
¶
Index ¶
Constants ¶
View Source
const Version = "3.0.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
Title string `tag:"title"`
Description string `tag:"description"`
Min int `tag:"min"`
Max int `tag:"max"`
Items Schema
Default []string `tag:"default"`
Nullable bool `tag:"flags:nullable"`
ReadOnly bool `tag:"flags:readonly"`
WriteOnly bool `tag:"flags:writeonly"`
UniqueItems bool `tag:"flags:unique"`
}
type Boolean ¶
type Contact ¶
func (*Contact) JsonEncode ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
func NewDocument ¶
Create a new OpenAPI root document that is ready to be used in the API service.
func (*Document) NumOperations ¶
type Info ¶
type Info struct {
Title string
Description string
TermsOfService string
Contact Contact
License License
Version string
}
func (*Info) JsonEncode ¶
type Integer ¶
type License ¶
func (*License) JsonEncode ¶
type Number ¶
type Object ¶
type ObjectProperty ¶
type Operation ¶
type Operation struct {
Id string
Method string
Summary string
Description string
Security Security
Parameters []Parameter
RequestBody Schema
Response Schema
Tags []Tag
}
func (*Operation) JsonEncode ¶
type Parameter ¶
type Parameter struct {
Name string
In ParameterIn
Description string
Schema Schema
Required bool
}
func (*Parameter) JsonEncode ¶
type ParameterIn ¶
type ParameterIn string
const ( InQuery ParameterIn = "query" InHeader ParameterIn = "header" InPath ParameterIn = "path" InCookie ParameterIn = "cookie" )
func (ParameterIn) JsonEncode ¶
func (p ParameterIn) JsonEncode(_ *encoderContext, s *jsoniter.Stream)
func (ParameterIn) String ¶
func (p ParameterIn) String() string
type Paths ¶
func (Paths) JsonEncode ¶
type Security ¶ added in v0.6.0
type Security struct {
Scope string
}
func (Security) JsonEncode ¶ added in v0.6.0
type Server ¶
func (*Server) JsonEncode ¶
type String ¶
type String struct {
Title string `tag:"title"`
Description string `tag:"description"`
Enum []string `tag:"enum"`
Format string `tag:"format"`
Pattern string `tag:"pattern"`
Min int `tag:"min"`
Max int `tag:"max"`
Default string `tag:"default"`
Nullable bool `tag:"flags:nullable"`
ReadOnly bool `tag:"flags:readonly"`
WriteOnly bool `tag:"flags:writeonly"`
}
Click to show internal directories.
Click to hide internal directories.