You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Inside a schema, only a same-document ref resolves. This covers a property, `items`, `additionalProperties`, `allOf`, and a union member.".to_owned(),
260
260
];
261
261
}
262
+
Error::UnsupportedSchema{ reason, .. }if reason.contains("does not reach the type") => {
263
+
if reason.contains("Properties"){
264
+
returnvec![
265
+
"`minProperties` and `maxProperties` read a free-form map. A schema that names its properties fixes the count already.".to_owned(),
266
+
];
267
+
}
268
+
if reason.contains("uniqueItems"){
269
+
returnvec![
270
+
"`uniqueItems` reads a list of numbers, strings, or booleans. A list of models cannot always compare.".to_owned(),
271
+
];
272
+
}
273
+
returnvec![
274
+
"A `format` can name a type that is no longer a string, such as a date or a UUID. Drop the `format` to keep the string and the rule.".to_owned(),
275
+
"An `x-rust-type` does the same. The rules of that type are its own.".to_owned(),
276
+
];
277
+
}
278
+
Error::UnsupportedSchema{ reason, .. }if reason.contains("is not above zero") => {
279
+
returnvec!["JSON Schema asks for a `multipleOf` above zero. A step of zero divides by zero.".to_owned()];
280
+
}
281
+
Error::UnsupportedSchema{ reason, .. }if reason.contains("does not fit `i32`") => {
282
+
returnvec![
283
+
"A bound must fit the type the `format` chooses. `int32` holds -2147483648 to 2147483647. Drop the `format` to get `i64`."
0 commit comments