jsonschema

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: Apache-2.0 Imports: 9 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[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.

Jump to

Keyboard shortcuts

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