Documentation
¶
Index ¶
- Constants
- type Docs
- func (d *Docs) AddParamToOperation(paramName string, paramType reflect.Type, operation *openapi3.Operation)
- func (d *Docs) AddParametersToOperation(params openapi3.Parameters, operation *openapi3.Operation)
- func (d *Docs) AddServer(addr string)
- func (d *Docs) Build() error
- func (d *Docs) CORSConfig() *cors.Config
- func (d *Docs) ConvertModelToRequestBody(model interface{}, contentType string) *openapi3.RequestBodyRef
- func (d *Docs) ConvertTypeToInterface(t reflect.Type) interface{}
- func (d *Docs) CreateResponses(model interface{}, errorModel interface{}) openapi3.Responses
- func (d *Docs) FixPath(path string) string
- func (d *Docs) NewOpenAPI()
- func (d *Docs) OpenAPIContent() *openapi3.T
- func (d *Docs) ParseQueryParams(queryModel interface{}) openapi3.Parameters
- func (d *Docs) PathItem(path string) *openapi3.PathItem
- func (d *Docs) PathTags(path string) []string
- func (d *Docs) PathsIsEmpty() bool
- func (d *Docs) ResponseDefaultStatus(model interface{}) int
- func (d *Docs) SetOperationOnPath(path string, method string, operation openapi3.Operation)
- func (d *Docs) SetPathItem(path string, pathItem *openapi3.PathItem)
- func (d *Docs) Valid() error
- type Handler
- type PathDoc
Constants ¶
View Source
const ( Default = "default" Binding = "binding" Json = "json" DefaultStatus = "default_status" Errors = "errors" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) AddParamToOperation ¶
func (*Docs) AddParametersToOperation ¶
func (d *Docs) AddParametersToOperation(params openapi3.Parameters, operation *openapi3.Operation)
func (*Docs) CORSConfig ¶
func (*Docs) ConvertModelToRequestBody ¶
func (d *Docs) ConvertModelToRequestBody(model interface{}, contentType string) *openapi3.RequestBodyRef
func (*Docs) ConvertTypeToInterface ¶
func (*Docs) CreateResponses ¶
func (*Docs) NewOpenAPI ¶
func (d *Docs) NewOpenAPI()
func (*Docs) OpenAPIContent ¶
func (*Docs) ParseQueryParams ¶
func (d *Docs) ParseQueryParams(queryModel interface{}) openapi3.Parameters
func (*Docs) PathsIsEmpty ¶
func (*Docs) ResponseDefaultStatus ¶
func (*Docs) SetOperationOnPath ¶
Click to show internal directories.
Click to hide internal directories.