Fable.Remoting
Fable.Remoting copied to clipboard
FableConverter incorrectly lowercases [<StringEnum(CaseRules.None)>]
As the title says, I have an enum:
[<StringEnum(CaseRules.None)>]
type Camera = FirstPerson | ArcRotate | IsometricTopDown
FableConverter then lowercases it anyway, causing issues on the client
https://github.com/Zaid-Ajaj/Fable.Remoting/blob/a9f65b819c02200fd42a3c4b7762d91842804e52/Fable.Remoting.Json/FableConverter.fs#L215-L221
Workaround:
[<StringEnum(CaseRules.None)>]
type Camera =
| [<CompiledName("FirstPerson")>] FirstPerson
| [<CompiledName("ArcRotate")>] ArcRotate
| [<CompiledName("IsometricTopDown")>] IsometricTopDown
Hello @0x53A thanks a lot for reporting the issue. I am glad you found a workaround. I will get to solving it shortly :smile: