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.

Generics not recognized well with OpenApiResponseWithBodyAttribute

See original GitHub issue

When using OpenApiResponseWithBody on 2 different methods with a generic MyResponse<int> and then MyResponse<string>, the UI doesn’t render. Also, if only used on one method, the properties of MyResponse do not show in the Models section.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Vivannaboacommented, Nov 1, 2021

Hello, with a generic type it’s working now. Here I am having a problem when there are two generic types.

it works:

Response<T>

It does not work:

Response<IEnumerable<T>>

image image

1reaction
powerdudecommented, Apr 9, 2021

thanks @justinyoo . I’ve already changed my object structure since i was under a timeline crunch, but if it works for the sample, then i’ll eventually migrate back to my old setup. Thanks for the fix!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Azure function not working with Generics?
I have a requirement that I have to use TEntity with the class. But Azure function not working when using Generics with class....
Read more >
Why Azure function not working with Generics? · Issue #735
I have a requirement that I have to use TEntity with the class. But Azure function not working when using Generics with class....
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