SwaggerProvider icon indicating copy to clipboard operation
SwaggerProvider copied to clipboard

Support representing arrays as F# lists

Open adamjones1 opened this issue 7 years ago • 1 comments

At the moment OpenApi arrays are represented as .Net arrays in the generated types. Is there any chance there could be a flag added to optionally use F# lists instead? Obviously arrays are best for C# interop but if you're only consuming from F# then lists have the benefits of being non-nullable, immutable, O(1)-append etc. Generally they're more idiomatic in F# so if your client app uses lists ubiquitously for collections then you don't have to add glue code around the generated types to convert back and forth all the time.

adamjones1 avatar Feb 28 '19 18:02 adamjones1

Or as ImmutableArray

xperiandri avatar Oct 25 '20 12:10 xperiandri