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
As you see, my enum (which I sadly cannot change) has values like "=", "!=" etc., which are invalid rust identifier. Therefor, typify will replace it with an capital X. The issue is now, that my enum have multiple variants which called X. Therefor, the following won't work as designed and by build fails:
Unfortunately, there isn't a way to do this currently. In a future version we intend to have a generic renaming by json path. In this case, that might look like:
{
"#/enum/<": "gt",
..
}
We'd do something equivalent with the builder interface you're using and for the macro interface.
Hey,
I tried to use typify to create types from my json schema. Currently, I'm creating my types via build.rs.
Here you see the result, which is created:
As you see, my enum (which I sadly cannot change) has values like "=", "!=" etc., which are invalid rust identifier. Therefor, typify will replace it with an capital X. The issue is now, that my enum have multiple variants which called X. Therefor, the following won't work as designed and by build fails:
How can I rename my enum variants? I tired the following:
Thanks!
see:
typify/typify-impl/src/util.rs
Line 756 in 6ba620b
The text was updated successfully, but these errors were encountered: