Skip to content
mattpolzin edited this page Dec 25, 2020 · 21 revisions

Types

Protocols

  • VendorExtendable: A VendorExtendable type is a type that supports arbitrary additions as long as those additions are keyed by strings starting with "x-" (e.g. "x-customThing").
  • ComponentDictionaryLocatable: Anything conforming to ComponentDictionaryLocatable knows where to find resources of its type in the Components Dictionary.
  • LocallyDereferenceable: A dereferenceable type can be recursively looked up in the OpenAPI.Components until there are no JSONReferences left in it or any of its properties.
  • OpenAPIError
  • _OpenAPIReference: Used as a quick check internally in this library to determine if a type is a reference (which only JSONReference should be).
  • OpenAPISchemaType: Anything conforming to OpenAPISchemaType can provide an OpenAPI schema representing itself.
  • JSONSchemaContext: A schema context stores information about a schema. All schemas can have the contextual information in this protocol.
  • SwiftTyped: An OpenAPI type with an associated value representing its Swift type.
  • OpenAPIFormat: OpenAPI formats represent the valid formats a raw type can take on to better specify its allowed values and intended semantics.
  • Validatable: A Marker protocol that indicates a type can be used as the subject of a Validation.

Operators

Global Functions

  • take(_:​check:​): Create a validation or predicate function from a KeyPath and a function operating on that value.
  • take(_:​check:​): Create a validation or predicate function from a KeyPath and a function operating on that value.
  • lift(_:​into:​): Lift the value the KeyPath points to into any number of validations on that value producing a new validation function that operates on the type of the root of the KeyPath and results in all the given validations being run.
  • lift(_:​into:​): Lift the value the KeyPath points to into any number of validations on that value producing a new validation function that operates on the type of the root of the KeyPath and results in all the given validations being run.
  • unwrap(_:​into:​description:​): Unwrap the value pointed to by the KeyPath. Fail with a ValidationError if the value is nil or pass onto each validation provided otherwise.
  • unwrap(_:​into:​description:​): Unwrap the value pointed to by the KeyPath. Fail with a ValidationError if the value is nil or pass onto each validation provided otherwise.
  • all(_:​): Apply all of the given validations to the current context.
Types
Protocols
Global Functions
Extensions
Clone this wiki locally