Skip to content
View as Markdown
View as Markdown

@salesforce/b2c-tooling-sdk / operations/content / validateMetaDefinitionFile

Function: validateMetaDefinitionFile()

validateMetaDefinitionFile(filePath, options?): MetaDefinitionValidationResult

Defined in: packages/b2c-tooling-sdk/src/operations/content/validate.ts:235

Validate a JSON metadefinition file against a content schema.

Uses file path conventions for type detection before falling back to property heuristics.

Parameters

filePath

string

Absolute or relative path to the JSON metadefinition file

options?

ValidateMetaDefinitionOptions

Optional validation options including explicit schema type override

Returns

MetaDefinitionValidationResult

Validation result with valid flag, detected schema type, errors array, and source file path

Throws

When the schema type cannot be detected and no explicit type is provided.

Released under the Apache-2.0 License.