-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use serde_with::serde_as
in conjunction with schemars(schema_with)
#712
Comments
I just found out that |
The macro should handle such conflicts. There is a test, but it might only work for serde_with/serde_with/tests/schemars_0_8.rs Lines 96 to 118 in f30519a
You should be able to work around this for now, by using a type and The |
This treats a `#[schemars(schema_with = "...")]` attribute the same as a `#[schemars(with = "...")]` attribute when deciding whether to emit our own. There is also a new test case that validates that everything works as expected. Fixes jonasbb#712
This treats a `#[schemars(schema_with = "...")]` attribute the same as a `#[schemars(with = "...")]` attribute when deciding whether to emit our own. There is also a new test case that validates that everything works as expected. Fixes jonasbb#712
A fix for this is released in v3.7.0 |
I am trying to properly encode
Base64
encoded data using schemars, but I am failing while theschemars_0_8
feature is enabled.Base64
does not implementJsonSchemaAs
, so I went ahead and tried to implement it myself using theschema_with
annotation.This fails with the error: schemars attribute cannot contain both
with
andschema_with
any help would be immensely appreciated. Thank you so much for the great library and overall integration of
schemars
into it!The text was updated successfully, but these errors were encountered: