Swashbuckle.AspNetCore icon indicating copy to clipboard operation
Swashbuckle.AspNetCore copied to clipboard

C# 9 Record - Read example/summary from positional record

Open pixellos opened this issue 2 years ago • 1 comments

Minimal fix for most common case of C#9 constructor. https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/1920

pixellos avatar Nov 12 '22 11:11 pixellos

@domaindrivendev is there something that needs to be done to get this merged? Or is it no go?

pixellos avatar Nov 17 '22 16:11 pixellos

@Bumping

pixellos avatar Feb 09 '23 19:02 pixellos

This would be very nice to have!

LockTar avatar Apr 13 '23 15:04 LockTar

This is very needed :/ Why its not merged yet?

Naxaliav avatar May 25 '23 17:05 Naxaliav

If there would be any feedback about what to improve, i'd implement it right away - but no contributor was engaged in this thread :( .

pixellos avatar May 25 '23 17:05 pixellos

this is very needed for a project I'm on too - we currently have a separate build we use because of it.

owns avatar May 25 '23 18:05 owns

@domaindrivendev any feedback about this PR? Records are commonly used for API contracts since they have easier declaration and better equality. Now basically I am forced to have a copy XmlCommentsSchemaFilter.cs from this contribution at work, since we strongly document everything with openAPI…. If any updates are needed, just let us now… We are actual users of this already. (even though its unofficial)

Naxaliav avatar May 25 '23 20:05 Naxaliav

+1 in the line waiting for this improvement hehe

paulosincos avatar Jul 06 '23 18:07 paulosincos

Can we get this merged?

niemyjski avatar Aug 27 '23 18:08 niemyjski

There are some build issues - probably https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/2672/files would be predecessor of this RP

pixellos avatar Sep 26 '23 08:09 pixellos

@pixellos You say that #2672 is a predecessor. Any idea when that one will be closed so this will be closed? Because all checks are passing on that PR. What can we do to help?

LockTar avatar Oct 04 '23 07:10 LockTar

Yes, but i haven't got changes from #2672 but from master, on which tests are already failing. Personally, i just did a filter in my project to retrofit this functionality.

pixellos avatar Oct 04 '23 13:10 pixellos

I believe it's crucial for the developer community to have this issue resolved, especially since the necessary code to fix it is already available. Documentation is incredibly important when building an API, and it's been three years since the release of .NET 5 with record types. In my opinion, prioritizing the resolution and merging of this issue might be more important than adding new features.

barruka avatar Jan 06 '24 16:01 barruka

Thanks for contributing - if you'd like to continue with this pull request, please rebase against the default branch to pick up our new CI.

martincostello avatar Apr 13 '24 08:04 martincostello

Hi, on it :)

pixellos avatar Apr 13 '24 09:04 pixellos

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.66%. Comparing base (c207be7) to head (f9997fd).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2546      +/-   ##
==========================================
+ Coverage   91.62%   91.66%   +0.03%     
==========================================
  Files          91       91              
  Lines        2998     3010      +12     
  Branches      514      517       +3     
==========================================
+ Hits         2747     2759      +12     
  Misses        251      251              
Flag Coverage Δ
Linux 91.66% <100.00%> (+0.03%) :arrow_up:
Windows 91.66% <100.00%> (+0.03%) :arrow_up:
macOS 91.66% <100.00%> (+0.03%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 13 '24 10:04 codecov-commenter

build / windows-latest (pull_request) seems to be transient error - sth wrong with coverlet - as ubuntu succeeded

pixellos avatar Apr 13 '24 11:04 pixellos

Thanks for the fast turnaround! This will be part of the next release (we haven't planned when that will be yet).

If you'd like to consume these changes before then, you can use our pre-release feed in MyGet: https://www.myget.org/gallery/domaindrivendev

martincostello avatar Apr 13 '24 11:04 martincostello