Documentation ¶
Index ¶
- func GenerateYamlFile(p ISwaggerSchema, path, filename string) error
- func GetSecurity(sec []string) []map[string][]interface{}
- type Content
- type ContentSchema
- type IContentSchema
- type IParameters
- type ISwaggerSchema
- type Parameter
- type ParameterSchema
- type Parameters
- type RefParameter
- type RefSchema
- type RequestBody
- type Response
- type Responses
- type Schema
- func (s *Schema) GetString() string
- func (s *Schema) ReadFormat(cmd *cobra.Command, t string)
- func (s *Schema) ReadItems(cmd *cobra.Command, scanner *bufio.Scanner, isModel bool)
- func (s *Schema) ReadProperties(cmd *cobra.Command, scanner *bufio.Scanner, isModel bool)
- func (s *Schema) ReadType(cmd *cobra.Command)
- type Security
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateYamlFile ¶
func GenerateYamlFile(p ISwaggerSchema, path, filename string) error
func GetSecurity ¶
Types ¶
type Content ¶
type Content struct {
Schema ContentSchema `yaml:"schema"`
}
type ContentSchema ¶
type ContentSchema []IContentSchema
type IContentSchema ¶
type IContentSchema interface {
GetString() string
}
type IParameters ¶
type IParameters interface {
GetString() string
}
type ISwaggerSchema ¶
type Parameter ¶
type Parameter struct { Name string `yaml:"name"` In string `yaml:"in"` Description string `yaml:"description,omitempty"` Required bool `yaml:"required"` Schema ParameterSchema `yaml:"schema"` }
type ParameterSchema ¶
type Parameters ¶
type Parameters []IParameters
Parameters is an alias for type Parameter or RefParameter
type RefParameter ¶
type RefParameter struct {
Ref string `yaml:"$ref"`
}
func (*RefParameter) GetString ¶
func (r *RefParameter) GetString() string
type RequestBody ¶
type RequestBody struct { Description string `yaml:"description"` Content map[string]Content `yaml:"content"` }
func (*RequestBody) GetString ¶
func (r *RequestBody) GetString() string
func (*RequestBody) ReadDescription ¶
func (r *RequestBody) ReadDescription(cmd *cobra.Command, scanner *bufio.Scanner)
type Schema ¶
type Schema struct { Type string `yaml:"type"` Format string `yaml:"format,omitempty"` Properties map[string]Schema `yaml:"properties,omitempty"` Required []string `yaml:"required,omitempty"` Nullable bool `yaml:"nullable,omitempty"` Items *Schema `yaml:"items,omitempty"` }
func (*Schema) ReadProperties ¶
Click to show internal directories.
Click to hide internal directories.