Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(input protoreflect.MessageDescriptor, opts ...GeneratorOption) map[protoreflect.FullName]map[string]interface{}
Generate generates a JSON schema for the given message descriptor, with protobuf field names.
Types ¶
type FieldVisibility ¶
type FieldVisibility int
const ( FieldVisible FieldVisibility = iota FieldHide FieldIgnore )
type GeneratorOption ¶
type GeneratorOption func(*jsonSchemaGenerator)
func WithJSONNames ¶
func WithJSONNames() GeneratorOption
WithJSONNames sets the generator to use JSON field names as the primary name.
Click to show internal directories.
Click to hide internal directories.