schema

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToJSON

func ToJSON(v interface{}) ([]byte, error)

ToJSON serializes and makes sure HTML description are not escaped

Types

type Schema

type Schema struct {
	*definition.Definition
	Version     string                            `json:"$schema,omitempty"`
	Definitions map[string]*definition.Definition `json:"definitions,omitempty"`
}

Schema represents a JSON Schema

func GenerateSchema

func GenerateSchema(
	pkgPath string,
	rootRef string,
	tagNamespace string,
	formatRefName definition.RefNameFormatFunc,
	strict bool,
) (Schema, error)

GenerateSchema is the entrypoint for schema generation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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