From fc339460e64086452e5919ca09bcb4611579398a Mon Sep 17 00:00:00 2001 From: Bradley Priest <167215+bradleypriest@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:25:54 -0700 Subject: [PATCH 1/2] Support bigint --- typescript-json-schema.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/typescript-json-schema.ts b/typescript-json-schema.ts index 3e0a042..8ae8179 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) { From 71fdebc6bf7a3ff52f5db1448e2fcbaefb832437 Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Fri, 5 Apr 2024 14:19:55 -0400 Subject: [PATCH 2/2] Update typescript-json-schema.ts --- typescript-json-schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript-json-schema.ts b/typescript-json-schema.ts index 8ae8179..68c34bf 100644 --- a/typescript-json-schema.ts +++ b/typescript-json-schema.ts @@ -708,7 +708,7 @@ export class JsonSchemaGenerator { } else if (propertyTypeString === "bigint") { definition.type = "number"; definition.properties = {}; - definition.additionalProperties = false; + definition.additionalProperties = false; } else { const value = extractLiteralValue(propertyType); if (value !== undefined) {