Skip to main content

Module validate

Module validate 

Source
Expand description

Structural validation of a Document.

Everything checked here is a rule the OpenAPI specification states but that the type system cannot enforce on its own — uniqueness across a whole document, correspondence between a path template and its parameters, names that must resolve against what the document declares elsewhere.

Mutual exclusions between fields are deliberately not among them. The model spells those as types, so a document that violates one can be neither built nor parsed and never reaches a rule here.

Kynos runs this when a router is built, so a description that would mislead a client generator fails at startup rather than being published.

Validator::validate is the orchestrator; the rules themselves are internal, one module per family of specification rule.

Modules§

violation
What a validator reports: how bad it is, where it is, and what is wrong.

Structs§

Validator
Checks a document against the rules of a specification version.