From 22adad3a2e6bf79a2a5aa9096ffc64c1996d4eec Mon Sep 17 00:00:00 2001 From: Oliwia Rogala Date: Thu, 10 Apr 2025 23:52:15 +0200 Subject: [PATCH] fix(json-schema-2020-12): infer type string when contentEncoding or contentMediaType is present (#10411) Refs #9278 --- src/core/plugins/json-schema-2020-12/fn.js | 4 +++- 1 file changed, 3 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 bdf158b0..1e6626e4 100644 --- a/src/core/plugins/json-schema-2020-12/fn.js +++ b/src/core/plugins/json-schema-2020-12/fn.js @@ -96,7 +96,9 @@ export const makeGetType = (fnAccessor) => { Object.hasOwn(schema, "pattern") || Object.hasOwn(schema, "format") || Object.hasOwn(schema, "minLength") || - Object.hasOwn(schema, "maxLength") + Object.hasOwn(schema, "maxLength") || + Object.hasOwn(schema, "contentEncoding") || + Object.hasOwn(schema, "contentMediaType") ) { return "string" } else if (typeof schema.const !== "undefined") {