@hyperjump/json-schema-errors
    Preparing search index...

    Type Alias NormalizationHandler<KeywordValue, Context>

    Used to convert a specific keyword to the normalized format used by the error handlers.

    type NormalizationHandler<
        KeywordValue = unknown,
        Context extends EvaluationContext = EvaluationContext,
    > = {
        simpleApplicator?: true;
        evaluate(
            value: KeywordValue,
            instance: JsonNode,
            context: Context,
        ): void | NormalizedOutput[];
    }

    Type Parameters

    Index

    Properties

    Methods

    Properties

    simpleApplicator?: true

    Simple applicators just apply subschemas and don't have any validation behavior of their own. For example, allOf and properties are simple applicators. They never fail. Only their subschema can fail. anyOf and oneOf are not simple applicators because they can fail independently of the validation result of their subschemas.

    Methods

    • For non-applicator keywords, this doesn't need to do anything. Just return void.

      For applicator keywords, it should call evaluateSchema on each subschema and return an array with each result.

      Parameters

      Returns void | NormalizedOutput[]