Documentation ¶
Index ¶
Constants ¶
View Source
const (
// DefPrefix is the JSON Schema prefix required in the definition map
DefPrefix = "#/definitions/"
)
Variables ¶
This section is empty.
Functions ¶
func GetFieldTag ¶
GetFieldTag gets the StructTag for a field
func JSONPropName ¶
JSONPropName returns the name for marshaling to/from json
Types ¶
type CommentInformation ¶
CommentInformation holds information interpreted from a comment string
type Definition ¶
type Definition struct { Ref string `json:"$ref,omitempty"` Items *Definition `json:"items,omitempty"` Required []string `json:"required,omitempty"` Properties map[string]*Definition `json:"properties,omitempty"` PreferredOrder []string `json:"preferredOrder,omitempty"` AdditionalProperties interface{} `json:"additionalProperties,omitempty"` Type string `json:"type,omitempty"` ContentEncoding string `json:"contentEncoding,omitempty"` OneOf []*Definition `json:"oneOf,omitempty"` Description string `json:"description,omitempty"` HTMLDescription string `json:"x-intellij-html-description,omitempty"` KubernetesGvk []*GroupVersionKind `json:"x-kubernetes-group-version-kind,omitempty"` Default interface{} `json:"default,omitempty"` Examples []string `json:"examples,omitempty"` Enum []string `json:"enum,omitempty"` }
Definition represents a JSON Schema definition
type Generator ¶
type Generator struct { Strict bool Definitions map[string]*Definition Importer importer.Importer }
Generator can create definitions from Exprs
func (*Generator) CollectDefinitionsFromStruct ¶
CollectDefinitionsFromStruct gets a complete definition for the root object
type GroupVersionKind ¶ added in v0.39.0
Click to show internal directories.
Click to hide internal directories.