PureXML/Sources/Validation/HasWarnings.swift
Mihaela Mihaljevic 229d7df3d0 feat(validation,schema): composable validation framework and cross-document composition
Ship the OpenAPIKit-style validation layer (builtin rules, warnings channel,
Validator tiers, coverage gates) and wire XSD compile checks through it. Advance
#161 with chameleon include validation, multi-container reference resolution,
and include targetNamespace composition rules so merged schema sets compile
correctly when a schemaLoader is provided.
2026-06-16 09:57:43 +02:00

12 lines
584 B
Swift

public extension PureXML.Validation {
/// Parse-time or advisory findings attached to a validated value, collected
/// during traversal and returned separately from rule failures unless
/// ``Validator/validate(_:in:strict:)`` runs with `strict: true` (the default),
/// which promotes warnings into the thrown error collection.
protocol HasWarnings {
/// Advisory findings for this value at `path`. Each entry should use
/// ``ValidationError/severity`` `.warning`.
func validationWarnings(at path: [PathKey]) -> [ValidationError]
}
}