-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Decide on whether to rename ProblemDetail to ProblemDetails #29303
Comments
Thanks for the comment. From the opening of the spec:
It uses both singular ("problem detail") and plural ("machine-readable details") in the same sentence, so clearly there is something very intentional here. Most of the spec uses plural, but the double quotes around "problem detail" seems meant to draw a distinction. Here is my interpretation of it. The singular form refers to the fact there is one problem to explain, you can choose one HTTP status and reason, and there is one String field called "detail". In other words, here is the problem and a description of it. The plural form, by contrast, refers to all the additional fields included in the response, which can be seen as auxiliary details along with the description. There is a bit of an overlap of terminology there. The spec could have used a different name for the "detail" field, perhaps "description", "cause", or similar. Overall, I think neither We'll try and finalize this for RC2 next week, but comments welcome in the mean time. |
I would see the Also, http APIs are usually kept in singular names as best practice. In contrast, the naming |
FYI: spring-security use |
And AWS is using |
The Spring Security example isn't something to go by. Yes, the same ending, but other than that, its own context and reasons. Let's stick to the case of RFC 7807. I've already laid out my interpretation of the language used there. If you have any comments or thoughts on that, please share. @membersound I take it you see this as the plural applying to both "problem" and "detail", and that there is only one problem to be detailed. |
FWIW, I agree with the current naming and interpretation outlined by @rstoyanchev. The way I see it, this is a part of story that's basically about translating an exception (singular) to some specific representation of the underlying error. The translation is 1:1 so it seems natural to me to name the representation as |
I'm closing this in favour of the current choice, |
Keep it consistent with RFC title Problem Details for HTTP APIs
The text was updated successfully, but these errors were encountered: