question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for C# 8 IAsyncEnumerable

See original GitHub issue

NSwag 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:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cypressiouscommented, Jan 5, 2020

I’m using 13.2.0 and I had to add [ProducesResponseType(typeof(IEnumerable<Foo>), StatusCodes.Status200OK)] to get it to work.

0reactions
RicoSutercommented, Jan 20, 2020

Ah shit, can you create a PR?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found