Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceSchema ¶
ResourceSchema represents a validation schema for a specific resource type
type SchemaValidator ¶
type SchemaValidator struct {
// contains filtered or unexported fields
}
SchemaValidator validates JSON objects against OpenAPI schemas
func NewSchemaValidator ¶
func NewSchemaValidator(schemaPath string) (*SchemaValidator, error)
NewSchemaValidator creates a new schema validator by loading an OpenAPI spec from the given path. Panics if any registered entity with RequireSpecSchema has a SpecSchemaName that does not resolve. Entities without RequireSpecSchema whose schema is absent are skipped with a warning.
func (*SchemaValidator) HasSchema ¶ added in v0.3.1
func (v *SchemaValidator) HasSchema(resourcePlural string) bool
HasSchema reports whether a validation schema was loaded for the given resource plural.
Click to show internal directories.
Click to hide internal directories.