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

Signature of the mutation method passed to traverse.

Type declaration

    • (schema, isCycle, path, parent): JSONSchema
    • 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

        json-path string in dot-notation as per draft-goessner-dispatch-jsonpath-00

      • 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 JSONSchema