Wulf / tsync

Synchronize rust and typescript types!
Other
116 stars 10 forks source link

Added support for serde's 'rename_all' attribute #32

Closed thebluefish closed 1 year ago

thebluefish commented 1 year ago

Serde 1.0 throws an error when attempting to use the renameAll attribute per tests:

error: unknown serde container attribute renameAll

This adds support for the rename_all attribute according to https://serde.rs/container-attrs.html

I originally changed just the tag, removing support for renameAll, but I added a separate check in case the other tag is used somewhere I'm not aware of.

Wulf commented 1 year ago

hey @thebluefish , thanks a lot for your work here and sorry I've taken so long to look at it. It's great that you've thought of the backwards-compatible approach here but I think we should get rid of the old attribute altogether. I'll merge this in and add a quick patch for that. We'll consider this a breaking change and bump to tsync 2.0 so end-users know.