-
Notifications
You must be signed in to change notification settings - Fork 476
Discussion: definitions name convention #519
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
Comments
@JanStevens you should turn this into a pull request with tests, so we can see what it would break |
@dblock … think it is better to talk about first, so the solution is based on more then one meaning 😉 @JanStevens … first thanks for starting it think we should start by talking about: "what would be expected by a third party dev from a API documentation?" the dev always have the route:
should the name of the response object be: {
"<Resource>": {
"…"
}
} or: {
"<NamespaceResource>": {
"…"
}
} next case
how should this be translated? |
@LeFnord is the boss, I wouldn't listen to me :) I tend to approach these problems in a very brute-force way and use tests as a way to learn about practical implications and expand the understanding of what a change will impact. |
@LeFnord The namespaced resource might show too much information about the internal workings of the API endpoint. (And might become troublesome long for no good reason). But again if we start to assume the name from the class name then we must take care that multiple class names don't clash together, some examples:
|
Hi @JanStevens, yeap the constraints are now quite clear, but for me the question comes up, how could it be achived in one API? maybe something like this:
could this be a step in this direction? |
Hi,
If you could just change By the way, I think showing the full name is a better behaviour than just the name. Having an internal and external entity seem a little strange, (for what I understand) entities are used for expose data through an API so they are not supposed to be private / internal and it's seems to be a lot more improbable than having two classes with the same name in different namespace. |
In light of the discussion in #515
My proposal is to introduce less magic/assumptions and be more clear about the naming of the definitions.
The text was updated successfully, but these errors were encountered: