Documentation
¶
Index ¶
- func ApplicationJsonContent(v *Schema) (c map[string]*MediaType)
- func ComponentsSchemaURI(key string) (v string)
- func ElementKey(key string) string
- type API
- type Components
- type Header
- type Info
- type MediaType
- type Operation
- type Parameter
- type Path
- type RequestBody
- type Response
- type Schema
- type Server
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplicationJsonContent ¶
func ComponentsSchemaURI ¶
func ElementKey ¶
Types ¶
type API ¶
type API struct { Openapi string `json:"openapi,omitempty"` Info Info `json:"info,omitempty"` Servers []Server `json:"servers,omitempty"` Paths map[string]Path `json:"paths,omitempty"` Components Components `json:"components,omitempty"` Tags []Tag `json:"tags,omitempty"` }
type Components ¶
type Info ¶
type Info struct { Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` TermsOfService string `json:"termsOfService,omitempty"` Contact interface{} `json:"contact,omitempty"` License interface{} `json:"license,omitempty"` Version string `json:"version,omitempty"` }
func (*Info) SetLicense ¶
type Operation ¶
type Operation struct { OperationId string `json:"operationId,omitempty"` Tags []string `json:"tags,omitempty"` Summary string `json:"summary,omitempty"` Description string `json:"description,omitempty"` Deprecated bool `json:"deprecated,omitempty"` Parameters []Parameter `json:"parameters,omitempty"` RequestBody *RequestBody `json:"requestBody,omitempty"` Responses map[string]Response `json:"responses,omitempty"` }
type RequestBody ¶
type Schema ¶
type Schema struct { Key string `json:"-"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Type string `json:"type,omitempty"` Required []string `json:"required,omitempty"` Format string `json:"format,omitempty"` Enum []interface{} `json:"enum,omitempty"` Properties map[string]*Schema `json:"properties,omitempty"` Items *Schema `json:"items,omitempty"` AdditionalProperties *Schema `json:"additionalProperties,omitempty"` Deprecated bool `json:"deprecated,omitempty"` Example interface{} `json:"example,omitempty"` Ref string `json:"$ref,omitempty"` }
func ElementSchema ¶
Click to show internal directories.
Click to hide internal directories.