Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SwaggerParameter ¶
type SwaggerParameter struct { SwaggerTypedObject `yaml:",inline"` Ref string `yaml:"$ref"` Name string `yaml:"name"` In string `yaml:"in"` Description string `yaml:"description"` Required bool `yaml:"required"` Type string `yaml:"type"` Format string `yaml:"format"` Default string `yaml:"default"` }
func (SwaggerParameter) GoName ¶
func (p SwaggerParameter) GoName() string
func (SwaggerParameter) InBody ¶
func (p SwaggerParameter) InBody() bool
func (SwaggerParameter) InHeader ¶
func (p SwaggerParameter) InHeader() bool
func (SwaggerParameter) InPath ¶
func (p SwaggerParameter) InPath() bool
func (SwaggerParameter) InQuery ¶
func (p SwaggerParameter) InQuery() bool
type SwaggerPathOperation ¶
type SwaggerPathOperation struct { GoInfo struct { InterfaceMethodName string } `yaml:"-"` OperationId string `yaml:"operationId"` Description string `yaml:"description"` Parameters []*SwaggerParameter `yaml:"parameters"` Responses map[string]*SwaggerPathOperationResponse `yaml:"responses"` }
func (SwaggerPathOperation) HasQueryArguments ¶
func (op SwaggerPathOperation) HasQueryArguments() bool
func (SwaggerPathOperation) MethodCallSignature ¶
func (op SwaggerPathOperation) MethodCallSignature() string
func (SwaggerPathOperation) SuccessHttpCode ¶
func (op SwaggerPathOperation) SuccessHttpCode() string
type SwaggerPathOperationResponse ¶
type SwaggerPathOperationResponse struct { SwaggerTypedObject `yaml:",inline"` Description string `yaml:"description"` }
type SwaggerSchema ¶
type SwaggerSchema struct { GoTypeName string Ref string `yaml:"$ref"` Type string `yaml:"type"` Format string `yaml:"format"` ReadOnly bool `yaml:"readOnly"` Properties *map[string]*SwaggerSchema `yaml:"properties"` Description string `yaml:"description"` Items *SwaggerSchema `yaml:"items"` Required []string `yaml:"required"` }
func (SwaggerSchema) IsRequired ¶
func (s SwaggerSchema) IsRequired(field string) bool
type SwaggerSpec ¶
type SwaggerSpec struct { Info struct { Description string `yaml:"description"` Title string `yaml:"title"` Version string `yaml:"version"` } `yaml:"info"` BasePath string `yaml:"basePath"` Paths map[string]map[string]*SwaggerPathOperation `yaml:"paths"` Parameters map[string]*SwaggerParameter `yaml:"parameters"` Definitions map[string]*SwaggerSchema `yaml:"definitions"` }
func Parse ¶
func Parse(inputfile string) *SwaggerSpec
func (SwaggerSpec) FindRefSchema ¶
func (f SwaggerSpec) FindRefSchema(ref string) (*SwaggerSchema, error)
type SwaggerTypedObject ¶
type SwaggerTypedObject struct {
Schema *SwaggerSchema `yaml:"schema"`
}
Click to show internal directories.
Click to hide internal directories.