• Returns the schema where all subschemas have been replaced with $refs and added to definitions.

    All of the subschemas must have a title. If you are unsure if you have titles for all schemas, use the json-schema-tools/titleizer first. If a subschema is already a $ref, it must exists in the input schema's definitions object.

    Parameters

    • s: JSONSchema

      The schema to create references for (ie 'flatten' it)

    • options: ReferencerOptions = defaultReferencerOptions

    Returns JSONSchema

    input schema where subschemas are turned into refs (recursively)