Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Strict ¶
func Strict(schema *apiextv1.JSONSchemaProps) *apiextv1.JSONSchemaProps
Strict returns a deep copy of the schema but modified so that all objects are closed for extension unless otherwise specified.
func Validate ¶
func Validate(props *apiextv1.JSONSchemaProps, value any) error
Validate verifies that the value matches the schema. If the schema was generated using the yoke openapi package, unknown fields are not errors. To validate no unknown fields are present use ValidateStrict.
func ValidateStrict ¶
func ValidateStrict(props *apiextv1.JSONSchemaProps, value any) error
ValidateStrict deep copies the schema and modifies the copy such that additionalProperties are not allowed for objects that don't define any. By default objects are open. This closes them for extension. This is the same as validating against the validation.Strict(schema).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.