Creates a new SchemaValidator instance given a logger and path to a schema file.
Loads a JSON schema from the schemaPath parameter provided at instantiation.
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.
Loads a JSON schema from the schemaPath parameter provided at instantiation.
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.
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.
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.
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.
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.
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.