webauthn-swift icon indicating copy to clipboard operation
webauthn-swift copied to clipboard

Remove public enums

Open 0xTim opened this issue 1 year ago • 3 comments

Public enums are a nightmare with libraries in Swift, we should remove them

0xTim avatar Jan 28 '25 22:01 0xTim

Seems like there are a few more left, like COSEAlgorithmIdentifier

dimitribouniol avatar Oct 09 '25 10:10 dimitribouniol

We might be able to get around this now with extensible enums - I think anything that's unlikely to be switched on by end users in most cases shouldn't be an enum, otherwise they can live as an extensible enum

0xTim avatar Oct 09 '25 10:10 0xTim

Although I am very thankful we now have extensible enums, the other reason we don't want to be using them is so we don't choke decoding optional cases we didn't explicitly model out, which the spec makes copious use of 😅

dimitribouniol avatar Oct 09 '25 12:10 dimitribouniol