From 34267623b420fe2d4ac46d52860c783387bff141 Mon Sep 17 00:00:00 2001 From: Bradley Priest <167215+bradleypriest@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:34:52 -0700 Subject: [PATCH] feat: support bigint (#596) * Support bigint * Update typescript-json-schema.ts --------- Co-authored-by: Dominik Moritz --- typescript-json-schema.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/typescript-json-schema.ts b/typescript-json-schema.ts index 3e0a042..68c34bf 100644 --- a/typescript-json-schema.ts +++ b/typescript-json-schema.ts @@ -705,6 +705,10 @@ export class JsonSchemaGenerator { definition.type = "object"; definition.properties = {}; definition.additionalProperties = true; + } else if (propertyTypeString === "bigint") { + definition.type = "number"; + definition.properties = {}; + definition.additionalProperties = false; } else { const value = extractLiteralValue(propertyType); if (value !== undefined) {