fix(json-schema-2020-12): add rendering support for type='integer' (#9031)

Refs #9013
This commit is contained in:
Vladimír Gorej
2023-07-17 15:10:21 +02:00
committed by GitHub
parent 70d7986ad0
commit 94fac4b3a1

View File

@@ -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()