From 0a8239996aff647d1fdff85e4afda05eccb1b90e Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Thu, 29 Apr 2021 01:12:44 +0300 Subject: [PATCH] Fix tNormalizedNullOptional formatting in schema view in docs --- backend/src/api/docs.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/api/docs.ts b/backend/src/api/docs.ts index f8306bd7..22a70fa0 100644 --- a/backend/src/api/docs.ts +++ b/backend/src/api/docs.ts @@ -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(" | "); }