Given a subject object and a JSON schema contract, validate the subject against the contract.
Errors are returned in a zod-like format, and processed to better handle unions.
The object to validate.
The JSON schema to validate against.
The result of the validation. If the state is 'error', the errors will be in a zod-like format.
Given a subject object and a JSON schema contract, validate the subject against the contract.
Errors are returned in a zod-like format, and processed to better handle unions.