Use atoms to represent enums
Previously, deserializing an enum value would yield an integer. Since you would not want to hard code these integers into your Elixir code, and because they're essentially unreadable, we generated macros/functions to convert back and forth between enum names and values.
With this commit, enum values are deserialized as atoms, which is more idiomatic and people should generally be able to work with directly.
We still generate the macros, which should provide some backwards compatibility. They generate a deprecation warning when used. At some point in the future we should remove them completely.
The atoms used match the enum definitions exactly. We no longer need to worry about manipulating the case and adding underscores to generate valid Elixir identifiers.
Closes #312.
This would be a breaking change for me. I commented on #312. Sorry I missed the issue when you originally posted it :/
@dantswain No problem, I didn't wait long before putting up code but there's no rush.