Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromOpenAPISpec ¶
func FromOpenAPISpec(schema *extv1.JSONSchemaProps) (map[string]interface{}, error)
FromOpenAPISpec converts an OpenAPI schema to a SimpleSchema object.
func ToOpenAPISpec ¶
func ToOpenAPISpec(obj map[string]interface{}) (*extv1.JSONSchemaProps, error)
ToOpenAPISpec converts a SimpleSchema object to an OpenAPI schema.
The input object is a map[string]interface{} where the key is the field name and the value is the field type.
Types ¶
type AtomicType ¶
type AtomicType string
AtomicType represents the type of an atomic value that can be used to define CRD fields.
These atomic types can be used to define more complex types like maps, arrays, and structs.
const ( // AtomicTypeBool represents a boolean value. AtomicTypeBool AtomicType = "boolean" // AtomicTypeInteger represents an integer value (64-bit signed integer) AtomicTypeInteger AtomicType = "integer" // AtomicTypeFloat represents a floating point value (64-bit float) AtomicTypeFloat AtomicType = "float" // AtomicTypeString represents a string value. AtomicTypeString AtomicType = "string" )
type CollectionType ¶
type CollectionType string
CollectionType represents the type of a collection value that can be used to define CRD fields.
const ( // CollectionTypeArray represents an array of values. CollectionTypeArray CollectionType = "array" // CollectionTypeMap represents a map of values. CollectionTypeMap CollectionType = "map" )
type Marker ¶
type Marker struct { MarkerType MarkerType Key string Value string }
Marker represents a marker found in the NeoCRD schema.
type MarkerType ¶
type MarkerType string
MarkerType represents the type of marker that is found in the NeoCRD schema.
const ( // MarkerTypeRequired represents the `required` marker. MarkerTypeRequired MarkerType = "required" // MarkerTypeDefault represents the `default` marker. MarkerTypeDefault MarkerType = "default" // MarkerTypeDescription represents the `description` marker. MarkerTypeDescription MarkerType = "description" )