Function: validateLixSchemaDefinition()

validateLixSchemaDefinition(schema): boolean

Validates only the Lix schema definition format. Use this when you only need to check if a schema is valid.

Parameters

schema

unknown

The schema to validate

Returns

boolean

true if the schema is valid

Throws

Error with validation details if validation fails

Example

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);
}