@json-schema-tools/traverse
    Preparing search index...

    Type Alias MutationFunction

    MutationFunction: (
        schema: JSONSchema,
        isCycle: boolean,
        path: string,
        parent: JSONSchema,
    ) => MutationResult

    Signature of the mutation method passed to traverse. Return a schema to keep or replace the node. With allowUndefinedReturn enabled, returning undefined (or nothing) keeps the schema passed to the callback.

    Type Declaration

      • (
            schema: JSONSchema,
            isCycle: boolean,
            path: string,
            parent: JSONSchema,
        ): MutationResult
      • Parameters

        • schema: JSONSchema

          The schema or subschema node being traversed

        • isCycle: boolean

          false if the schema passed is not the root of a detected cycle. Useful for special handling of cycled schemas.

        • path: string

          Location of the visited schema in the selected pathFormat. JSONPath (default) uses $ for the root; JSON Pointer uses the empty string. Pointers are relative to the input schema, not the instance being validated. URI-fragment encoding is not applied.

        • parent: JSONSchema

          A reference to JSONSchema that is the parent of the schema param. If the schema is the root schema, parent will be undefined. when schema is a cycle, parent is the parent of the referenced cycle (once again, if the cycled schema is the root, the parent will be undefined).

        Returns MutationResult

        A schema or a promise/thenable resolving to one, including boolean schemas. Undefined (sync or resolved) keeps the node only with allowUndefinedReturn enabled.