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) AddSecurityScheme ¶ added in v0.7.0
func (doc *Document) AddSecurityScheme(scheme SecurityScheme) (err error)
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 []SecurityRequirement
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 SecurityRequirement ¶ added in v0.7.0
func (SecurityRequirement) IsZero ¶ added in v0.7.0
func (sec SecurityRequirement) IsZero() bool
func (SecurityRequirement) JsonEncode ¶ added in v0.7.0
func (ss SecurityRequirement) JsonEncode(s *jsoniter.Stream)
type SecurityScheme ¶ added in v0.7.0
type SecurityScheme struct {
SchemeName string
Type string
Description string
Name string
In string
Scheme string
BearerFormat string
Flows struct{} // TODO
OpenIdConnectUrl struct{} // TODO
}
func (*SecurityScheme) IsZero ¶ added in v0.7.0
func (sec *SecurityScheme) IsZero() bool
func (*SecurityScheme) JsonEncode ¶ added in v0.7.0
func (sec *SecurityScheme) JsonEncode(s *jsoniter.Stream)
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"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.