Add support for C# 8 IAsyncEnumerable
See original GitHub issueNSwag currently generates from this REST API method signature:
public IAsyncEnumerable<MyDataType> GetNormCodes(string kpiCode)
the following datatype definition in its swagger.json:
...
"IAsyncEnumerableOfMyDataType": {
"type": "object",
"x-abstract": true
}
...
Support for IAsyncEnumerable would be awesome, as web APIs will be using it more in the future.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Async streams - C# 8.0 draft feature specifications
This feature specification describes async streams, which return streams of data asynchronously, typically as each element is produced or ...
Read more >IAsyncEnumerable In C# 8 - NET Core Tutorials
With IOT becoming bigger and bigger, it makes sense for C# to add a way to iterate over an IEnumerable in an async...
Read more >Iterating with Async Enumerables in C# 8
To produce an async enumerable, the language supports writing an iterator just as it does for the synchronous case, but with async ...
Read more >Asynchronous coroutines with C# and IAsyncEnumerable
In 2018, C# 8.0 introduced support for asynchronous streams with new language and runtime features like: IAsyncEnumerable · IAsyncEnumerator ...
Read more >net standard 2.0 - Is IAsyncEnumerable supported in C# 8.0?
The answer of Vlad is the right one. Add LangVersion 8.0 to the desired Projects PropertGroup; Add the Microsoft.Bcl.AsyncInterfaces as ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m using 13.2.0 and I had to add
[ProducesResponseType(typeof(IEnumerable<Foo>), StatusCodes.Status200OK)]
to get it to work.Ah shit, can you create a PR?