From 94fac4b3a185f8769693e53185828aa9196cd294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Gorej?= Date: Mon, 17 Jul 2023 15:10:21 +0200 Subject: [PATCH] fix(json-schema-2020-12): add rendering support for type='integer' (#9031) Refs #9013 --- src/core/plugins/json-schema-2020-12/fn.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/plugins/json-schema-2020-12/fn.js b/src/core/plugins/json-schema-2020-12/fn.js index 8337cec44e3..398e2d7ae21 100644 --- a/src/core/plugins/json-schema-2020-12/fn.js +++ b/src/core/plugins/json-schema-2020-12/fn.js @@ -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()