buf

package
v0.0.0-...-e01a53f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(input protoreflect.MessageDescriptor, opts ...GeneratorOption) 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL