{"modulePath":"github.com/openshift-hyperfleet/hyperfleet-api","version":"v0.4.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package validators\n\n## Types\n\n```go\ntype ResourceSchema struct {\n\tSchema   *openapi3.SchemaRef\n\tTypeName string\n}\n```\nResourceSchema represents a validation schema for a specific resource type\n\n```go\ntype SchemaValidator struct {\n\t// contains filtered or unexported fields\n}\n```\nSchemaValidator validates JSON objects against OpenAPI schemas\n\n```go\nfunc NewSchemaValidator(schemaPath string) (*SchemaValidator, error)\n```\nNewSchemaValidator 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.\n\n```go\nfunc (v *SchemaValidator) HasSchema(resourcePlural string) bool\n```\nHasSchema reports whether a validation schema was loaded for the given resource plural.\n\n```go\nfunc (v *SchemaValidator) Validate(resourcePlural string, spec map[string]interface{}) error\n```\nValidate validates a spec for the given resource plural (URL path segment). Returns nil when no schema is loaded for the plural (validation skipped).\n\n","path":"github.com/openshift-hyperfleet/hyperfleet-api/pkg/validators","name":"validators","synopsis":"","isRedistributable":true}
