diff --git a/docs/1.1-attributes.md b/docs/1.1-attributes.md index 94a163f..9911ed7 100644 --- a/docs/1.1-attributes.md +++ b/docs/1.1-attributes.md @@ -117,6 +117,8 @@ Serde docs: [field](https://serde.rs/field-attrs.html#flatten) Set on a field to generate this field's schema as the given type instead of the field's actual type. Serde allows the `with` attribute to refer to any module path, but Schemars requires this to be an actual type which implements `JsonSchema`. +If the given type has any required generic type parameters, then they must all be explicitly specified in this attribute. Serde frequently allows you to omit them as it can make use of type inference, but unfortunately this is not possible with Schemars. For example, `with = "Vec::"` will work, but `with = "Vec"` and `with = "Vec::<_>"` will not. + Serde docs: [field](https://serde.rs/field-attrs.html#with)