Skip to content

Commit

Permalink
fix(json-schema-2020-12): add rendering support for type='integer' (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
char0n committed Jul 17, 2023
1 parent 70d7986 commit 94fac4b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/core/plugins/json-schema-2020-12/fn.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,15 @@ export const getType = (schema, processedSchemas = new WeakSet()) => {
? type.map((t) => (t === "array" ? getArrayType() : t)).join(" | ")
: type === "array"
? getArrayType()
: ["null", "boolean", "object", "array", "number", "string"].includes(type)
: [
"null",
"boolean",
"object",
"array",
"number",
"integer",
"string",
].includes(type)
? type
: inferType()

Expand Down

0 comments on commit 94fac4b

Please sign in to comment.