New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make DefaultProblemDetailsFactory public #55666
Conversation
/// It provides methods to create instances of `ProblemDetails` and `ValidationProblemDetails` with default settings. | ||
/// This class uses the provided `ApiBehaviorOptions` for client error mapping and an optional custom configuration action to further customize the problem details. | ||
/// </summary> | ||
public sealed class DefaultProblemDetailsFactory : ProblemDetailsFactory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GiovanniBraconi please address the analyzer-failure.
Have a look at How to use Microsoft.CodeAnalysis.PublicApiAnalyzers and see at the files in https://github.com/dotnet/aspnetcore/tree/main/src/Mvc/Mvc.Core/src folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gfoidl; sorry for the late response. It should work fine now 😄
Next time i will write a status update in the description to let other people know i'm still working on the PR.
- Add DefaultProblemDetailsFactory.cs constructor and methods to PublicAPI.Unshipped.txt - Remove duplicated xml comments from methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM outside of a small nit to apply.
We already have test coverage for this via ProblemDetailsFactoryTest.
Thanks for the first look @gfoidl!
src/Mvc/Mvc.Core/src/Infrastructure/DefaultProblemDetailsFactory.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Safia Abdalla <safia@safia.rocks>
Description
Fixes #53030
Following this suggestion i changed the DefaultProblemDetailsFactory class access modifier from internal to public.