Skip to content

Fix casing of ProblemDetails for RFC compliance #53789

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

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

captainsafia
Copy link
Member

Addresses #53639.

In .NET 8, we merged a PR to remove the custom converters used for ProblemDetails and ValidationProbleemDetails in feature of the IgnoreWhenNull attributes that were provided in the box by System.Text.Json.

At the same time, we removed the pre-defined type names that existed on the properties of these types.

As it turns out, this was a bad move. The RFC for problem details is particular about property keys being all lower-case (ref) regardless of what serialization options the rest of the system might be using by default.

This means that are implementation is no longer RFC-compliant. Fixing this by bring backing the explicit type names.

I do plan on back porting to .NET 8.

@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Feb 2, 2024
@captainsafia
Copy link
Member Author

/backport to release/8.0

Copy link
Contributor

github-actions bot commented Feb 2, 2024

@captainsafia
Copy link
Member Author

/backport to release/8.0

@captainsafia captainsafia enabled auto-merge (squash) February 2, 2024 23:01
Copy link
Contributor

github-actions bot commented Feb 2, 2024

@captainsafia captainsafia merged commit ccffb50 into main Feb 2, 2024
@captainsafia captainsafia deleted the safia/problem-details-casing-fix branch February 2, 2024 23:29
@ghost ghost added this to the 9.0-preview2 milestone Feb 2, 2024
onurmicoogullari pushed a commit to onurmicoogullari/aspnetcore that referenced this pull request Feb 14, 2024
* Fix casing of ProblemDetails for RFC compliance

* Update tests
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants