-
Notifications
You must be signed in to change notification settings - Fork 0
API Naming conventions #1
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
base: main
Are you sure you want to change the base?
Conversation
Document API naming convetions for methods, functions, and OpenAPI operations
|
We recently had a discussion around abbreviating "city council district" and "community district" as "cd" and "ccd". The objection to using these initialisms is because it's difficult to remember what they mean. The general rule is that we should favor writing out the full word when practical. However, we write Personally, I think we should still prefer to write out terms. However, if a term has an abbreviation that has reached common use, it is better to use this abbreviation. |
|
What should one name a function without a limit, if a corresponding function with a limit exists? |
I'm not sure I understand the context enough. Is there a specific example you're thinking of? |
|
Let's say I want to add a function like this findMany but without a limit or offset. |
I'm unclear on what you mean by "common use". The common use of |
Ahh, it would still be I prefer using |
It's a judgement call. But if an abbreviation gives someone significant pause, then it's better to write it out. |
I see a case where we want to return all of the results of that |
I understand that, and I greatly empathize with you. It seems like Tyler, you, and I are all on the same page - we should give great priority to requiring as little as possible reliance on memory. |
We haven't had to consider downloads. The closest we've come is with the "mvt" endpoints, which return files. For those, we've been using "findTiles" as the name. However, we may not want to keep this pattern for other file types. This is a chance to get ahead of a possible feature request by having a convention in place. Do you have something in mind? I think we would want to consider:
|
If we are going to continue to allow users to export data to CSV that matches the filters they have selected, we will need to do so dynamically. I don't have the answers to all of the things you just listed to consider, but my assumptions in asking were that we would need a function that returns the same results as that |
|
I'm confused - why did #402 use |
You'll see in the edits that my penultimate version had it as So... it was a missed opportunity to be consistent |
|
@dhochbaum-dcp @TangoYankee I'd like to revive this conversation and see if we can't get this merged in. Rereading the back and forth, it sounds like one point of contention is On the topic of abbreviating, I think the three of us are generally on the same page but maybe it's worth thinking about how this documentation could be improved to give some clarity on when to abbreviate or not? This is something that is going to be gray area no matter what, which is fine and normal (fwiw, I came across API design documentation from the VA a while back that lists avoiding abbreviation as a "should"). |
|
I think we can merge this in. I am fine with using |
@TangoYankee Thoughts on @dhochbaum-dcp's comment here? Makes sense to me, though I might prefer |
Document API naming convetions for methods, functions, and OpenAPI operations