validateLixSchemaDefinition(
schema:unknown):boolean
Validates only the Lix schema definition format. Use this when you only need to check if a schema is valid.
const schema = {
"x-lix-key": "product",
"x-lix-version": "1.0",
type: "object",
properties: {
id: { type: "string" }
}
};
try {
validateLixSchemaDefinition(schema); // returns true
} catch (error) {
console.error("Invalid schema:", error);
}| Parameter | Type | Description |
|---|---|---|
schema | unknown | The schema to validate |
boolean
true if the schema is valid
Error with validation details if validation fails