Fable.Remoting icon indicating copy to clipboard operation
Fable.Remoting copied to clipboard

FableConverter incorrectly lowercases [<StringEnum(CaseRules.None)>]

Open 0x53A opened this issue 6 years ago • 2 comments

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

0x53A avatar Jul 30 '19 16:07 0x53A

Workaround:

[<StringEnum(CaseRules.None)>]
type Camera =
| [<CompiledName("FirstPerson")>] FirstPerson
| [<CompiledName("ArcRotate")>] ArcRotate
| [<CompiledName("IsometricTopDown")>] IsometricTopDown

0x53A avatar Jul 30 '19 16:07 0x53A

Hello @0x53A thanks a lot for reporting the issue. I am glad you found a workaround. I will get to solving it shortly :smile:

Zaid-Ajaj avatar Jul 30 '19 17:07 Zaid-Ajaj