json-schema: Don't error on unsupported string formats.

The string format can be anything and there's no need to fail if
the format isn't recognized / interpreted.
This commit is contained in:
Bruce Mitchener 2018-02-16 09:02:31 +07:00
Родитель 750dfb95db
Коммит f33c013aae
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -287,7 +287,9 @@ export function addTypesInSchema(
case "date-time":
return typeBuilder.getPrimitiveType("date-time");
default:
return panic(`String format ${schema.format} not supported`);
// FIXME: Output a warning here instead to indicate that
// the format is uninterpreted.
return typeBuilder.getStringType(typeAttributes, undefined);
}
}
return typeBuilder.getStringType(typeAttributes, undefined);