Documentation ¶
Index ¶
- Constants
- func GenerateOpenApi(p *Parser, s IType) spec.Schema
- func PrintSwagger(p *Parser) spec.Swagger
- func PrintTsTypes(parser *Parser, w io.Writer)
- type BaseType
- type EnumDef
- type EnumValue
- type Fn
- type IType
- type Package
- type ParseResult
- type Parser
- type PkgParseResult
- type PropertyState
- type RawType
- type RecordDef
- type RecordField
- type TypeDef
- type TypeToString
Constants ¶
View Source
const GlobalTemplate = `` /* 241-byte string literal not displayed */
View Source
const RecordTemplate = `` /* 169-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func PrintSwagger ¶
func PrintTsTypes ¶
Types ¶
type BaseType ¶
func (*BaseType) GetPackage ¶
type ParseResult ¶
type ParseResult struct { FieldName string FieldType string Ignore bool State PropertyState }
func ParseStructTag ¶
func ParseStructTag(structTag reflect.StructTag) (*ParseResult, error)
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func NewFromRawTypes ¶
func NewFromTypes ¶
func NewFromTypes(types ...interface{}) *Parser
type PkgParseResult ¶
func GetPackages ¶
func GetPackages(pkgName string) (*PkgParseResult, error)
type PropertyState ¶
type PropertyState int
const ( Auto PropertyState = iota Ignored Optional Null NotNull )
type RecordField ¶
func (*RecordField) IsType ¶
func (*RecordField) IsType()
type TypeToString ¶
Click to show internal directories.
Click to hide internal directories.