Skip to content

ValidationContext

mattpolzin edited this page Jun 11, 2021 · 4 revisions

ValidationContext

The context in which a validation can be applied.

public struct ValidationContext<Subject: Validatable> 

It may or may not be important for a particular validation to know what the whole OpenAPI.Document looks like or the coding path where the validation is being applied, but it always has access to these two pieces of information in addition to the subject (a value of the type on which the validation is specialized).

Properties

document

public let document: OpenAPI.Document

subject

public let subject: Subject

codingPath

public let codingPath: [CodingKey]
Types
Protocols
Global Functions
Extensions
Clone this wiki locally