Documentation
¶
Index ¶
- func ExtractName(ctx context.Context, uri string, options ...Option) (string, string, error)
- func Generate(ctx context.Context, uris []string, options ...Option) error
- type Option
- func CustomInitialisms(names ...string) Option
- func CustomPlanners(planners ...gen.Planner) Option
- func CustomPrimitivesMap(primitivesMap map[gen.JSONType]string) Option
- func CustomTemplate(tmpl *template.Template) Option
- func CustomTypeFunc(typeFunc func(schema *gen.Schema) gen.TypeInfo) Option
- func Debug(opt bool) Option
- func PrefixMap(pairs ...string) Option
- func TypeFromID(pairs ...string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractName ¶
Types ¶
type Option ¶
type Option func(s *settings)
Option controls the behavior of jsonschema2go, specifying an alternative to the default configuration
func CustomInitialisms ¶
CustomInitialisms registers a custom list of initialisms used in name generation
func CustomPlanners ¶
CustomPlanners permits providing an entirely custom list of planners, which will be jointed together.
func CustomPrimitivesMap ¶
CustomPrimitivesMap registers a custom map for mapping from JSONSchema simple types to go primitives.
func CustomTemplate ¶
CustomTemplate registers a custom top level template
func CustomTypeFunc ¶
CustomTypeFunc registers a custom function for generating TypeInfo from a Schema.
func TypeFromID ¶
TypeFromID defines how to map to type information from IDs
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
composite
Code generated by internal/cmd/embedtmpl/embedtmpl.go DO NOT EDIT.
|
Code generated by internal/cmd/embedtmpl/embedtmpl.go DO NOT EDIT. |
mapobj
Code generated by internal/cmd/embedtmpl/embedtmpl.go DO NOT EDIT.
|
Code generated by internal/cmd/embedtmpl/embedtmpl.go DO NOT EDIT. |
print
Code generated by internal/cmd/embedtmpl/embedtmpl.go DO NOT EDIT.
|
Code generated by internal/cmd/embedtmpl/embedtmpl.go DO NOT EDIT. |
slice
Code generated by internal/cmd/embedtmpl/embedtmpl.go DO NOT EDIT.
|
Code generated by internal/cmd/embedtmpl/embedtmpl.go DO NOT EDIT. |
tuple
Code generated by internal/cmd/embedtmpl/embedtmpl.go DO NOT EDIT.
|
Code generated by internal/cmd/embedtmpl/embedtmpl.go DO NOT EDIT. |
pkg
|
|
Click to show internal directories.
Click to hide internal directories.