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 ¶ added in v0.1.5
type FieldVisibility int
const ( FieldVisible FieldVisibility = iota FieldHide FieldIgnore )
type GeneratorOption ¶ added in v0.1.5
type GeneratorOption func(*jsonSchemaGenerator)
func WithJSONNames ¶ added in v0.1.5
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.