Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRoot ¶
func GenerateRoot(opts *GeneratorOptions, f *jen.File, schemas ...*jsonschema.Schema) error
GenerateRoot generates the root struct and all its children
schema: the inputed root schema f: the result root go AST, which may render to a file, is a return value
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func NewGenerator(opts *GeneratorOptions, schemas ...*jsonschema.Schema) (*Generator, error)
func (*Generator) GenerateDef ¶
func (*Generator) SchemaTypeName ¶
type GeneratorOptions ¶
type RefResolver ¶
type RefResolver struct {
// contains filtered or unexported fields
}
func NewRefResolver ¶
func NewRefResolver(schemas []*jsonschema.Schema) (*RefResolver, error)
func (*RefResolver) GetSchemaByReference ¶
func (r *RefResolver) GetSchemaByReference(schema *jsonschema.Schema) (*jsonschema.Schema, error)
GetSchemaByReference returns the schema.
Click to show internal directories.
Click to hide internal directories.