Documentation
¶
Index ¶
- type ExternalDocumentation
- type OpenAPIV3Schema
- type OpenAPIV3SchemaOrArray
- type OpenAPIV3SchemaOrBool
- type OpenAPIV3SchemaOrStringArray
- func (in *OpenAPIV3SchemaOrStringArray) DeepCopy() *OpenAPIV3SchemaOrStringArray
- func (in *OpenAPIV3SchemaOrStringArray) DeepCopyInto(out *OpenAPIV3SchemaOrStringArray)
- func (s OpenAPIV3SchemaOrStringArray) MarshalJSON() ([]byte, error)
- func (s *OpenAPIV3SchemaOrStringArray) UnmarshalJSON(data []byte) error
- type SchemaDefinitions
- type SchemaDependencies
- type SchemaURL
- type ValidationRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalDocumentation ¶
type ExternalDocumentation struct {
Description string `json:"description,omitempty"`
URL string `json:"url,omitempty"`
}
ExternalDocumentation allows referencing an external resource for extended documentation.
func (*ExternalDocumentation) DeepCopy ¶
func (in *ExternalDocumentation) DeepCopy() *ExternalDocumentation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalDocumentation.
func (*ExternalDocumentation) DeepCopyInto ¶
func (in *ExternalDocumentation) DeepCopyInto(out *ExternalDocumentation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenAPIV3Schema ¶
type OpenAPIV3Schema struct {
ID string `json:"id,omitempty"`
Schema SchemaURL `json:"$schema,omitempty"`
Ref *string `json:"$ref,omitempty"`
Description string `json:"description,omitempty"`
Type string `json:"type,omitempty"`
Format string `json:"format,omitempty"`
Title string `json:"title,omitempty"`
// default is a default value for undefined object fields.
Default *apiextensionsv1.JSON `json:"default,omitempty"`
Maximum *float64 `json:"maximum,omitempty"`
ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty"`
Minimum *float64 `json:"minimum,omitempty"`
ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty"`
MaxLength *int64 `json:"maxLength,omitempty"`
MinLength *int64 `json:"minLength,omitempty"`
Pattern string `json:"pattern,omitempty"`
MaxItems *int64 `json:"maxItems,omitempty"`
MinItems *int64 `json:"minItems,omitempty"`
UniqueItems bool `json:"uniqueItems,omitempty"`
MultipleOf *float64 `json:"multipleOf,omitempty"`
// +listType=atomic
Enum []apiextensionsv1.JSON `json:"enum,omitempty"`
MaxProperties *int64 `json:"maxProperties,omitempty"`
MinProperties *int64 `json:"minProperties,omitempty"`
// +listType=atomic
Required []string `json:"required,omitempty"`
Items *OpenAPIV3SchemaOrArray `json:"items,omitempty"`
// +listType=atomic
AllOf []OpenAPIV3Schema `json:"allOf,omitempty"`
// +listType=atomic
OneOf []OpenAPIV3Schema `json:"oneOf,omitempty"`
// +listType=atomic
AnyOf []OpenAPIV3Schema `json:"anyOf,omitempty"`
Not *OpenAPIV3Schema `json:"not,omitempty"`
Properties map[string]OpenAPIV3Schema `json:"properties,omitempty"`
AdditionalProperties *OpenAPIV3SchemaOrBool `json:"additionalProperties,omitempty"`
PatternProperties map[string]OpenAPIV3Schema `json:"patternProperties,omitempty"`
Dependencies SchemaDependencies `json:"dependencies,omitempty"`
AdditionalItems *OpenAPIV3SchemaOrBool `json:"additionalItems,omitempty"`
Definitions SchemaDefinitions `json:"definitions,omitempty"`
ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"`
Example *apiextensionsv1.JSON `json:"example,omitempty"`
Nullable bool `json:"nullable,omitempty"`
// x-deckhouse-grantable-resource binds a string settings field to a grantable
// cluster resource (multitenancy-manager AvailableClusterResource).
// +optional
XGrant string `json:"x-deckhouse-grantable-resource,omitempty"`
// x-deckhouse-validations describes a list of validation rules written in the CEL expression language.
// +optional
// +patchMergeKey=rule
// +patchStrategy=merge
// +listType=map
// +listMapKey=rule
XValidations []ValidationRule `json:"x-deckhouse-validations,omitempty"`
// x-deckhouse-ui-advanced marks a settings field as "advanced", hiding it behind
// a toggle in the web console UI.
// +optional
XUIAdvanced bool `json:"x-deckhouse-ui-advanced,omitempty"`
// x-deckhouse-ui-order sets the display order of a settings field in the
// web console UI: fields with lower values are shown first.
// +optional
XUIOrder *int64 `json:"x-deckhouse-ui-order,omitempty"`
// x-deckhouse-ui-validation-message overrides the validation error.
// +optional
XUIValidationMessage string `json:"x-deckhouse-ui-validation-message,omitempty"`
}
OpenAPIV3Schema is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). It is a forked subset of apiextensionsv1.JSONSchemaProps that drops all x-kubernetes-* extensions and adds Deckhouse-specific x-deckhouse-* extensions as typed fields.
func (*OpenAPIV3Schema) DeepCopy ¶
func (in *OpenAPIV3Schema) DeepCopy() *OpenAPIV3Schema
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenAPIV3Schema.
func (*OpenAPIV3Schema) DeepCopyInto ¶
func (in *OpenAPIV3Schema) DeepCopyInto(out *OpenAPIV3Schema)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenAPIV3SchemaOrArray ¶
type OpenAPIV3SchemaOrArray struct {
Schema *OpenAPIV3Schema `json:"-"`
JSONSchemas []OpenAPIV3Schema `json:"-"`
}
OpenAPIV3SchemaOrArray represents a value that can either be an OpenAPIV3Schema or an array of OpenAPIV3Schema.
func (*OpenAPIV3SchemaOrArray) DeepCopy ¶
func (in *OpenAPIV3SchemaOrArray) DeepCopy() *OpenAPIV3SchemaOrArray
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenAPIV3SchemaOrArray.
func (*OpenAPIV3SchemaOrArray) DeepCopyInto ¶
func (in *OpenAPIV3SchemaOrArray) DeepCopyInto(out *OpenAPIV3SchemaOrArray)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (OpenAPIV3SchemaOrArray) MarshalJSON ¶
func (s OpenAPIV3SchemaOrArray) MarshalJSON() ([]byte, error)
func (*OpenAPIV3SchemaOrArray) UnmarshalJSON ¶
func (s *OpenAPIV3SchemaOrArray) UnmarshalJSON(data []byte) error
type OpenAPIV3SchemaOrBool ¶
type OpenAPIV3SchemaOrBool struct {
Allows bool `json:"-"`
Schema *OpenAPIV3Schema `json:"-"`
}
OpenAPIV3SchemaOrBool represents an OpenAPIV3Schema or a boolean value. Defaults to true for the boolean property.
func (*OpenAPIV3SchemaOrBool) DeepCopy ¶
func (in *OpenAPIV3SchemaOrBool) DeepCopy() *OpenAPIV3SchemaOrBool
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenAPIV3SchemaOrBool.
func (*OpenAPIV3SchemaOrBool) DeepCopyInto ¶
func (in *OpenAPIV3SchemaOrBool) DeepCopyInto(out *OpenAPIV3SchemaOrBool)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (OpenAPIV3SchemaOrBool) MarshalJSON ¶
func (s OpenAPIV3SchemaOrBool) MarshalJSON() ([]byte, error)
func (*OpenAPIV3SchemaOrBool) UnmarshalJSON ¶
func (s *OpenAPIV3SchemaOrBool) UnmarshalJSON(data []byte) error
type OpenAPIV3SchemaOrStringArray ¶
type OpenAPIV3SchemaOrStringArray struct {
Schema *OpenAPIV3Schema `json:"-"`
Property []string `json:"-"`
}
OpenAPIV3SchemaOrStringArray represents an OpenAPIV3Schema or a string array.
func (*OpenAPIV3SchemaOrStringArray) DeepCopy ¶
func (in *OpenAPIV3SchemaOrStringArray) DeepCopy() *OpenAPIV3SchemaOrStringArray
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenAPIV3SchemaOrStringArray.
func (*OpenAPIV3SchemaOrStringArray) DeepCopyInto ¶
func (in *OpenAPIV3SchemaOrStringArray) DeepCopyInto(out *OpenAPIV3SchemaOrStringArray)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (OpenAPIV3SchemaOrStringArray) MarshalJSON ¶
func (s OpenAPIV3SchemaOrStringArray) MarshalJSON() ([]byte, error)
func (*OpenAPIV3SchemaOrStringArray) UnmarshalJSON ¶
func (s *OpenAPIV3SchemaOrStringArray) UnmarshalJSON(data []byte) error
type SchemaDefinitions ¶
type SchemaDefinitions map[string]OpenAPIV3Schema
SchemaDefinitions contains the models explicitly defined in this spec.
func (SchemaDefinitions) DeepCopy ¶
func (in SchemaDefinitions) DeepCopy() SchemaDefinitions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaDefinitions.
func (SchemaDefinitions) DeepCopyInto ¶
func (in SchemaDefinitions) DeepCopyInto(out *SchemaDefinitions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SchemaDependencies ¶
type SchemaDependencies map[string]OpenAPIV3SchemaOrStringArray
SchemaDependencies represent a dependencies property.
func (SchemaDependencies) DeepCopy ¶
func (in SchemaDependencies) DeepCopy() SchemaDependencies
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaDependencies.
func (SchemaDependencies) DeepCopyInto ¶
func (in SchemaDependencies) DeepCopyInto(out *SchemaDependencies)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValidationRule ¶
type ValidationRule struct {
// Rule represents the expression which will be evaluated by CEL.
// The `self` variable in the CEL expression is bound to the scoped value.
Rule string `json:"rule"`
// Message represents the message displayed when validation fails.
Message string `json:"message,omitempty"`
// MessageExpression declares a CEL expression that evaluates to the
// validation failure message that is returned when this rule fails.
// +optional
MessageExpression string `json:"messageExpression,omitempty"`
// Reason provides a machine-readable validation failure reason.
// +optional
Reason *string `json:"reason,omitempty"`
// FieldPath represents the field path returned when the validation fails.
// +optional
FieldPath string `json:"fieldPath,omitempty"`
}
ValidationRule describes a validation rule written in the CEL expression language.
func (*ValidationRule) DeepCopy ¶
func (in *ValidationRule) DeepCopy() *ValidationRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRule.
func (*ValidationRule) DeepCopyInto ¶
func (in *ValidationRule) DeepCopyInto(out *ValidationRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.