Skip to content

Commit 22adad3

Browse files
authored
fix(json-schema-2020-12): infer type string when contentEncoding or contentMediaType is present (#10411)
Refs #9278
1 parent 255142a commit 22adad3

File tree

1 file changed

+3
-1
lines changed
  • src/core/plugins/json-schema-2020-12

1 file changed

+3
-1
lines changed

src/core/plugins/json-schema-2020-12/fn.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ export const makeGetType = (fnAccessor) => {
9696
Object.hasOwn(schema, "pattern") ||
9797
Object.hasOwn(schema, "format") ||
9898
Object.hasOwn(schema, "minLength") ||
99-
Object.hasOwn(schema, "maxLength")
99+
Object.hasOwn(schema, "maxLength") ||
100+
Object.hasOwn(schema, "contentEncoding") ||
101+
Object.hasOwn(schema, "contentMediaType")
100102
) {
101103
return "string"
102104
} else if (typeof schema.const !== "undefined") {

0 commit comments

Comments
 (0)