private boolean areDefinitionKeysDistinct(DefinitionKey mainSchemaKey, List<DefinitionKey> definitionKeys) {
        return definitionKeys.size() == 1
               || (definitionKeys.size() == 2
                   && !this.config.shouldCreateDefinitionForMainSchema()
                   && definitionKeys.contains(mainSchemaKey));
    }
Check whether the given key can be included with its standard name. Otherwise, dedicated names need to be assigned for each definition key.

@param mainSchemaKey the main schema's key to ignore in the list if it's being in-lined (unless otherwise configured)
@param definitionKeys list of keys that have the same standard name in the "definitions"/"$defs"
@return whether the given key can be included with its standard name
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaBuilder.java