Creates a new SchemaValidator instance given a logger and path to a schema file.
Performs validation of JSON data against the schema located at the schemaPath value provided
at instantiation.
Throws SfError{ name: 'ValidationSchemaFieldError' } If there are known validations errors. Throws SfError{ name: 'ValidationSchemaUnknownError' } If there are unknown validations errors.
A JSON value to validate against this instance's target schema.
The validated JSON data.
Performs validation of JSON data against the schema located at the schemaPath value provided
at instantiation.
Throws SfError{ name: 'ValidationSchemaFieldError' } If there are known validations errors. Throws SfError{ name: 'ValidationSchemaUnknownError' } If there are unknown validations errors.
A JSON value to validate against this instance's target schema.
The validated JSON data.
Loads a JSON schema and performs validations against JSON objects.
Deprecated
For sfdx-project.json and scratch org definitions, use the exported zod schemas (ProjectJsonSchema, ScratchOrgDefSchema) from '@salesforce/core'. For custom schemas, use a schema validator library like zod directly.