Documentation
¶
Overview ¶
Package schema provides JSON Schema validation backed by santhosh-tekuri/jsonschema.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds compiled validators keyed by version/action/payload-kind. payloadKind is "request" or "response".
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator validates raw JSON against a compiled OCPP schema.
func (*Validator) ValidateLenient ¶ added in v0.1.4
ValidateLenient validates raw and applies the lenient policy:
- err != nil means a hard-class violation is present; the caller rejects.
- err == nil means out is the payload (enum case normalized to canonical values when an enum drifted only by case), and soft lists the soft violation keywords seen. out == raw when no enum rewrite was needed, preserving byte order and numeric formatting.
Click to show internal directories.
Click to hide internal directories.