Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Property ¶
type Property struct {
// The depth of the item in the JSONPath hierarchy
Depth int8
// Path is the full JSONpath path of the attribute, e. g. ".spec.version".
Path string
// Name is the attribute name.
Name string
// Type is the textual representaiton of the type ("object", "array", "number", "string", "boolean").
Type string
// Description is a user-friendly description of the attribute.
Description string
// Required specifies whether the property is required.
Required bool
}
Property is a simplistic, flattened representation of a property in a JSON Schema, without the recursion and containing only the elements we intend to expose in our output.
func Flatten ¶
func Flatten(schema apiextensionsv1.JSONSchemaProps, properties []Property, depth int8, pathPrefix string) []Property
Flatten recurses over all properties of a JSON Schema and returns a flat slice of the elements we need for our output.
Click to show internal directories.
Click to hide internal directories.