Skip to content
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

Merged
merged 4 commits into from May 19, 2024

Conversation

GiovanniBraconi
Copy link
Contributor

@GiovanniBraconi GiovanniBraconi commented May 11, 2024

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Description

Fixes #53030

Following this suggestion i changed the DefaultProblemDetailsFactory class access modifier from internal to public.

@GiovanniBraconi GiovanniBraconi requested a review from a team as a code owner May 11, 2024 06:44
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label May 11, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label May 11, 2024
@GiovanniBraconi GiovanniBraconi marked this pull request as draft May 12, 2024 10:27
/// 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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.

GiovanniBraconi and others added 3 commits May 15, 2024 09:19
- Add DefaultProblemDetailsFactory.cs constructor and methods to PublicAPI.Unshipped.txt

- Remove duplicated xml comments from methods
Copy link
Member

@captainsafia captainsafia left a 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!

Co-authored-by: Safia Abdalla <safia@safia.rocks>
@captainsafia captainsafia merged commit 94ad1d4 into dotnet:main May 19, 2024
26 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0-preview5 milestone May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates community-contribution Indicates that the PR has been added by a community member
Projects
None yet
4 participants