Documentation ¶
Index ¶
- func FillStructSchema(docs *Docs, element reflect.Type, elementName string) error
- func GetFunctionName(temp interface{}) string
- func GetResponse(handler handler_utils.Handler) (map[string]DocResponseValue, string)
- func GetStructDocs(corePath string) map[string]string
- func StructFieldName(structField reflect.StructField) string
- func StructSchema(docs *Docs, t reflect.Type) (interface{}, error)
- type DocMethodInfo
- type DocParam
- type DocPath
- type DocRequestBody
- type DocResponseValue
- type DocSchema
- type DocSchemaResponse
- type DocSchemas
- type Docs
- type NoParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FillStructSchema ¶
func GetFunctionName ¶
func GetFunctionName(temp interface{}) string
func GetResponse ¶
func GetResponse(handler handler_utils.Handler) (map[string]DocResponseValue, string)
func GetStructDocs ¶
func StructFieldName ¶
func StructFieldName(structField reflect.StructField) string
Types ¶
type DocMethodInfo ¶
type DocMethodInfo struct { Description string `json:"description"` Summary string `json:"summary"` Tags []string `json:"tags"` RequestBody *DocRequestBody `json:"requestBody,omitempty"` Parameters []DocParam `json:"parameters,omitempty"` Responses *map[string]DocResponseValue `json:"responses,omitempty"` }
type DocParam ¶
type DocParam struct { Name string `json:"name"` In string `json:"in"` Description string `json:"description"` Required bool `json:"required,omitempty"` Schema interface{} `json:"schema"` }
func FillParameters ¶
func FillParameters(docs *Docs, handler handler_utils.Handler) ([]DocParam, error)
type DocPath ¶
type DocPath map[string]DocMethodInfo
type DocRequestBody ¶
type DocRequestBody struct { Description string `json:"description"` Required bool `json:"required"` Content map[string]interface{} `json:"content"` }
func GetRequestBody ¶
func GetRequestBody(handler handler_utils.Handler, functionDocs map[string]string) (string, DocRequestBody)
type DocResponseValue ¶
type DocSchemaResponse ¶
type DocSchemas ¶
type DocSchemas struct {
Schemas map[string]interface{} `json:"schemas"`
}
type Docs ¶
type Docs struct { Paths map[string]DocPath `json:"paths"` Components DocSchemas `json:"components"` }
Click to show internal directories.
Click to hide internal directories.