Documentation
¶
Index ¶
- Constants
- func DefaultStatus(type_ reflect.Type) int
- type Docs
- func (d *Docs) AddServer(addr string)
- func (d *Docs) Build() error
- func (d *Docs) FixPath(path string) string
- func (d *Docs) NewOpenAPI()
- func (d *Docs) OpenAPIContent() *openapi3.T
- func (d *Docs) PathItem(path string) *openapi3.PathItem
- func (d *Docs) PathsIsEmpty() bool
- func (d *Docs) SetPath(path string, method string, doc *Endpoint)
- func (d *Docs) SetPathItem(path string, pathItem *openapi3.PathItem)
- func (d *Docs) Valid() error
- type Endpoint
- func (e *Endpoint) AddHeadersType(headerType reflect.Type)
- func (e *Endpoint) AddPathParam(name string, type_ reflect.Type)
- func (e *Endpoint) SetBodyType(bodyType reflect.Type)
- func (e *Endpoint) SetQueryType(queryType reflect.Type)
- func (e *Endpoint) SetResponses(responseType reflect.Type, errorType reflect.Type)
- func (e *Endpoint) SetTagsFromPath(path string)
- type Handler
Constants ¶
View Source
const ( DefaultTag = "default" BindingTag = "binding" HeaderTag = "header" JsonTag = "json" DefaultStatusTag = "default_status" StatusCodesTag = "status_codes" )
Variables ¶
This section is empty.
Functions ¶
func DefaultStatus ¶
Types ¶
type Docs ¶
type Docs struct {
OpenAPIPath string
OpenAPI *openapi3.T
OpenAPIUrl string
Title string
TermsOfService string
Description string
License *openapi3.License
Contact *openapi3.Contact
Version string
OpenAPIFilePath string
InMemory bool
CORS *cors.Config
}
func (*Docs) NewOpenAPI ¶
func (d *Docs) NewOpenAPI()
func (*Docs) OpenAPIContent ¶
func (*Docs) PathsIsEmpty ¶
type Endpoint ¶ added in v0.4.0
func (*Endpoint) AddHeadersType ¶ added in v0.4.0
func (*Endpoint) AddPathParam ¶ added in v0.4.0
func (*Endpoint) SetBodyType ¶ added in v0.4.0
func (*Endpoint) SetQueryType ¶ added in v0.4.0
func (*Endpoint) SetResponses ¶ added in v0.4.0
func (*Endpoint) SetTagsFromPath ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.