fix(json-schema-2020-12): infer type string when contentEncoding or contentMediaType is present (#10411)

Refs #9278
This commit is contained in:
Oliwia Rogala
2025-04-10 23:52:15 +02:00
committed by GitHub
parent 255142acd0
commit 22adad3a2e

View File

@@ -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") {