Documentation
¶
Index ¶
- type ArrayItems
- type Contact
- type ContentType
- type Docs
- func (docs *Docs) AddModel(name string, m Model)
- func (docs *Docs) AddPath(path, method string, p Path)
- func (docs *Docs) AddTag(t Tag)
- func (docs *Docs) RemoveModel(modelName string)
- func (docs *Docs) RemovePath(path string, method ...string)
- func (docs *Docs) RemoveTag(tagName string)
- func (docs *Docs) Save()
- func (docs *Docs) String() string
- type ExternalDocs
- type Info
- type Model
- type Param
- type Path
- type Property
- type RequestBody
- type Response
- type Schema
- type Server
- type Tag
- type XmL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayItems ¶
type ContentType ¶
type ContentType struct {
Schema Schema `json:"schema,omitempty"`
}
type Docs ¶
type Docs struct { OpenApi string `json:"openapi,omitempty"` Host string `json:"host,omitempty"` Info Info `json:"info,omitempty"` ExternalDocs ExternalDocs `json:"externalDocs,omitempty"` Servers []Server `json:"servers,omitempty"` Tags []Tag `json:"tags,omitempty"` Paths map[string]map[string]Path `json:"paths,omitempty"` Components map[string]map[string]Model `json:"components,omitempty"` // contains filtered or unexported fields }
func (*Docs) RemoveModel ¶
func (*Docs) RemovePath ¶
type ExternalDocs ¶
type Path ¶
type Path struct { Tags []string `json:"tags,omitempty"` Summary string `json:"summary,omitempty"` OperationId string `json:"operationId,omitempty"` Requestbody RequestBody `json:"requestBody,omitempty"` Description string `json:"description,omitempty"` Parameters []Param `json:"parameters,omitempty"` Responses map[string]Response `json:"responses,omitempty"` Consumes []string `json:"consumes,omitempty"` Produces []string `json:"produces,omitempty"` }
type Property ¶
type Property struct { Description string `json:"description,omitempty"` Required bool `json:"required,omitempty"` Type string `json:"type"` Format string `json:"format,omitempty"` Enum []string `json:"enum,omitempty"` Default any `json:"default,omitempty"` Example any `json:"example,omitempty"` Ref string `json:"$ref,omitempty"` ArrayItem ArrayItems `json:"items,omitempty"` }
type RequestBody ¶
type RequestBody struct { Description string `json:"description,omitempty"` Content map[string]ContentType `json:"content,omitempty"` Required bool `json:"required,omitempty"` }
type Schema ¶
type Schema struct { Type string `json:"type,omitempty"` Format string `json:"format,omitempty"` Ref string `json:"$ref,omitempty"` ArrayItems ArrayItems `json:"items,omitempty"` }
Click to show internal directories.
Click to hide internal directories.