feat(csharp): Add forward compatible enums using a string enum
- Add IStringEnum as an interface
- Generate string enums for all enums
- Add StringEnumSerializer
- Rename existing StringEnumSerializer to EnumSerializer
- Add feature flag to opt-out of the new enum 'enable-forward-compatible-enums'
- Update C# model and SDK version
- Add tests for old and new serializer
I assume we want to enable forward-compatible enums by default, so I coded it that way.
Is there a way to change existing users' generator files so we can set it to false for them?
Or should I make it false by default?
I did not test whether the old enum serializer still works. I did test the new enum serializer manually. Is there a way to include tests for our serializer?
I assume we want to enable forward-compatible enums by default, so I coded it that way. Is there a way to change existing users' generator files so we can set it to
falsefor them? Or should I make itfalseby default?
We'll want to release a minor version where it is set to false and then a major version where we swap the default. Automating these config upgrades is something we want to do and @armandobelardo is thinking about
🌿 Preview your docs: https://fern-preview-ad2190d1-a4ee-467a-b6e9-6d8367bc690d.docs.buildwithfern.com/learn
I did not test whether the old enum serializer still works. I did test the new enum serializer manually. Is there a way to include tests for our serializer?
One option is to include an enum serializer test in the generated SDK itself and have that run as part of the CI test process in the SDK
All feedback should be addressed now.
I reseeded with latest from main