Closed anreton closed 2 years ago
Problem Details is specified in RFC 7807 https://datatracker.ietf.org/doc/html/rfc7807 It is very specific about the spelling/casing of the individual properties. So you can't really remove the fixed values.
Problem Details is specified in RFC 7807 https://datatracker.ietf.org/doc/html/rfc7807 It is very specific about the spelling/casing of the individual properties. So you can't really remove the fixed values.
@Tornhoof, thank you for your response.
Looked through the specification Problem Details. But nowhere did I find a specific requirement about casing of the properties and that it must be strictly enforced.
The RFC contains the literal spelling of the individual properties, they even quote each occurrence.
I don't think your goal of configuration is bad, just your suggested method, as it will break conformance with the RFC.
@anreton you can also create a new JsonConverter only for ProblemDetails
@monterolebronhg, indeed, thanks for the replies.
Perhaps I should close the issue.
Background and Motivation
At the moment, all properties ProblemDetails have attribute JsonPropertyNameAttribute with camelCase-style.
ProblemDetails
But not everyone uses style camelCase-style in their projects, e.g. like this:
For casing-style consistency with the rest of the project, it might make sense to remove the JsonPropertyNameAttribute from all properties of ProblemDetails.