jcrist · GitHub

@jcrist

This:
- Adds support for changing a field's encode name using the `name` kwarg
  to `msgspec.field`.
- Adds tests for this behavior
This also changes how inheritence of `rename` configuration works in
structs. Previously the `rename` setting was applied to *all* fields on
a struct, including those defined in base classes. This meant you could
subclass a struct, set `rename="camel"`, and all existing fields would
then encode using camelCase. This behavior was deemed unintuitive.
Now a struct's `rename` configuration only affects fields defined on it,
or any of its subclasses (providing subclasses don't change the
configuration). The setting no longer applies retroactively to fields
defined in a struct's base class. This is a **breaking change**.

Read the original on github.com ↗