Documentation ¶
Index ¶
- Constants
- Variables
- func IsBuiltIn(name string) bool
- func LoadOpenAPIText(args OutputData, text string, logger *logrus.Logger) (out string, err error)
- func LoadSwaggerText(args OutputData, text string, logger *logrus.Logger) (out string, err error)
- func LoadXSDText(args OutputData, text string, logger *logrus.Logger) (out string, err error)
- type Alias
- type Array
- type Endpoint
- type Enum
- type ExternalAlias
- type Field
- type FieldList
- type Func
- type ImportedBuiltInAlias
- type IndentWriter
- type MethodEndpoints
- type OutputData
- type Param
- type Parameters
- type Response
- type StandardType
- type SyslBuiltIn
- type SyslInfo
- type Type
- type TypeList
- type Union
Constants ¶
View Source
const ( ModeOpenAPI = "openapi" ModeSwagger = "swagger" ModeXSD = "xsd" ModeGrammar = "grammar" ModeAuto = "auto" )
View Source
const ( StringTypeName = "string" ObjectTypeName = "object" ArrayTypeName = "array" )
View Source
const ( MinOnly maxType = iota MaxSpecified OpenEnded )
View Source
const BlankLine = "&& !!"
View Source
const CommentLineLength = 80
View Source
const PopIndent = "&& <<"
View Source
const PushIndent = "&& >>"
Variables ¶
View Source
var StringAlias = &SyslBuiltIn{name: StringTypeName}
Functions ¶
func LoadOpenAPIText ¶ added in v0.5.0
func LoadSwaggerText ¶
func LoadXSDText ¶
Types ¶
type Alias ¶
type Alias struct { Target Type // contains filtered or unexported fields }
!alias type without the EXTERNAL_ prefix
type Endpoint ¶
type Endpoint struct { Path string Description string Params Parameters Responses []Response }
type ExternalAlias ¶
type ExternalAlias struct { Target Type // contains filtered or unexported fields }
func (*ExternalAlias) Name ¶
func (s *ExternalAlias) Name() string
type ImportedBuiltInAlias ¶
type ImportedBuiltInAlias struct { Target Type // contains filtered or unexported fields }
func (*ImportedBuiltInAlias) Name ¶
func (s *ImportedBuiltInAlias) Name() string
type IndentWriter ¶
func NewIndentWriter ¶
func NewIndentWriter(text string, out io.Writer) *IndentWriter
func (*IndentWriter) CurrentIndentLen ¶
func (i *IndentWriter) CurrentIndentLen() int
func (*IndentWriter) Pop ¶
func (i *IndentWriter) Pop()
func (*IndentWriter) Push ¶
func (i *IndentWriter) Push()
func (*IndentWriter) Write ¶
func (i *IndentWriter) Write() error
type MethodEndpoints ¶
type OutputData ¶
type Parameters ¶
type Parameters struct {
// contains filtered or unexported fields
}
func (*Parameters) Add ¶
func (p *Parameters) Add(param Param)
func (Parameters) BodyParams ¶
func (p Parameters) BodyParams() []Param
func (*Parameters) Extend ¶ added in v0.5.0
func (p *Parameters) Extend(others Parameters) Parameters
func (Parameters) HeaderParams ¶
func (p Parameters) HeaderParams() []Param
func (Parameters) PathParams ¶
func (p Parameters) PathParams() []Param
func (Parameters) QueryParams ¶
func (p Parameters) QueryParams() []Param
type StandardType ¶
type StandardType struct { Properties FieldList Attributes []string // contains filtered or unexported fields }
func (*StandardType) Name ¶
func (s *StandardType) Name() string
type SyslBuiltIn ¶
type SyslBuiltIn struct {
// contains filtered or unexported fields
}
func (*SyslBuiltIn) Name ¶
func (s *SyslBuiltIn) Name() string
type SyslInfo ¶
type SyslInfo struct { OutputData Title string Description string OtherFields []string // Ordered key, val pair }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package openapi2conv converts an OpenAPI v2 specification to v3.
|
Package openapi2conv converts an OpenAPI v2 specification to v3. |
Click to show internal directories.
Click to hide internal directories.