Member Junction
    Preparing search index...

    Schema Validator Oracle.

    Validates that actual output conforms to an expected JSON schema. Uses JSON Schema draft-07 specification for validation.

    Configuration:

    • schema: JSON Schema object defining expected structure
    • strict: Whether to fail on additional properties (default: false)
    const oracle = new SchemaValidatorOracle();
    const result = await oracle.evaluate({
    actualOutput: { name: 'John', age: 30 },
    expectedOutput: {
    responseSchema: {
    type: 'object',
    required: ['name', 'age'],
    properties: {
    name: { type: 'string' },
    age: { type: 'number' }
    }
    }
    }
    }, {});

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    type: "schema-validate" = 'schema-validate'

    Unique type identifier for this oracle. Used in test configuration to specify which oracles to run.

    Methods