3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Fix tNormalizedNullOptional formatting in schema view in docs

This commit is contained in:
Dragory 2021-04-29 01:12:44 +03:00
parent b62a6685e0
commit 0a8239996a
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -19,6 +19,8 @@ function formatConfigSchema(schema) {
} else if (schema._tag === "UnionType") {
if (schema.name.startsWith("Nullable<")) {
return `Nullable<${formatConfigSchema(schema.types[0])}>`;
} else if (schema.name.startsWith("Optional<")) {
return `Optional<${formatConfigSchema(schema.types[0])}>`;
} else {
return schema.types.map(t => formatConfigSchema(t)).join(" | ");
}