quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

Swift: Add flag for optional enums

Open afajl opened this issue 3 years ago • 1 comments

Added swift option optionalEnums

Use case: When an API where Enums are used and might be expanded later versions. Decoding would fail in those cases, with this option it's now decoded as nil.

afajl avatar Jun 22 '22 12:06 afajl

⭐ ⭐ ⭐ Very useful, been thinking about this addition!

johanrydenstam avatar Jun 23 '22 07:06 johanrydenstam

@afajl thank you! Sorry for delay. We've just updated our CI to work again.

Can you add a test for this option? Add it to quickTestRendererOptions in languages.ts under the Swift definition.

dvdsgl avatar Dec 31 '22 17:12 dvdsgl