Skip to content

Commit

Permalink
feat: support bigint (#596)
Browse files Browse the repository at this point in the history
* Support bigint

* Update typescript-json-schema.ts

---------

Co-authored-by: Dominik Moritz <[email protected]>
  • Loading branch information
bradleypriest and domoritz authored Apr 5, 2024
1 parent 264ab45 commit 3426762
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions typescript-json-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3426762

Please sign in to comment.