fix(json-schema-2020-12): infer type string when contentEncoding or contentMediaType is present (#10411)
Refs #9278
This commit is contained in:
@@ -96,7 +96,9 @@ export const makeGetType = (fnAccessor) => {
|
|||||||
Object.hasOwn(schema, "pattern") ||
|
Object.hasOwn(schema, "pattern") ||
|
||||||
Object.hasOwn(schema, "format") ||
|
Object.hasOwn(schema, "format") ||
|
||||||
Object.hasOwn(schema, "minLength") ||
|
Object.hasOwn(schema, "minLength") ||
|
||||||
Object.hasOwn(schema, "maxLength")
|
Object.hasOwn(schema, "maxLength") ||
|
||||||
|
Object.hasOwn(schema, "contentEncoding") ||
|
||||||
|
Object.hasOwn(schema, "contentMediaType")
|
||||||
) {
|
) {
|
||||||
return "string"
|
return "string"
|
||||||
} else if (typeof schema.const !== "undefined") {
|
} else if (typeof schema.const !== "undefined") {
|
||||||
|
|||||||
Reference in New Issue
Block a user