Function getDefaultTitleForSchema

  • Returns the schema where if the schema.title is not set, a title will be generated based on the contents of the schema. The properties of the schema are sorted such that the names are deterministic based on the content of the schema. That being said, expect that any subtle change to the schema will result in a unique title. If you've included titles on your schema, ensure that the titles are unique for their contents. If they are not, ask yourself this: "why do two different schemas have the same name?".

    Returns

    A new schema object that has all the fields of the one passed in, and a title if it didn't already have one.

    Parameters

    • schema: JSONSchema

      The JSON Schema to ensure has a title. If the schema is a composite schema (contains subschema(s)), the subschemas must already have titles.

    • isRootCycle: boolean = false

    Returns JSONSchema

Generated using TypeDoc