Skip to content
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

Naming choices for list vs other operation types #191

Open
maxb opened this issue Jul 10, 2023 · 1 comment
Open

Naming choices for list vs other operation types #191

maxb opened this issue Jul 10, 2023 · 1 comment

Comments

@maxb
Copy link
Contributor

maxb commented Jul 10, 2023

Expected Behavior

I'd expect the same name to be used to describe the same concept, in the names of all API calls manipulating it.

Current Behavior

Taking the auth/github backend as an example:

https://github.com/hashicorp/vault/blob/ece2995ee1df24341ec1dd0fdcc2fdedc6737806/builtin/credential/github/backend.go#L38-L45

Why has the operation for listing team configuration items been set to describe team configuration items as "teams", whereas the operations for reading/writing/deleting team configuration items been set to describe team configuration items as "team mappings" ?

I have no strong feelings whether these things are described as "teams" or "team mappings", but I do feel the set of APIs to perform list/read/write/delete operations on them ought to all agree on what they call the single kind of thing.

@averche
Copy link
Collaborator

averche commented Jul 10, 2023

IIRC, my thinking around this was that the Read operation would return a single "team policy mapping", whereas the list operation would return just the keys (list of all teams).

I also don't have strong feelings around this. I guess if we were to settle on a single name, I'd go with "team(s)" / "user(s)", since it kind of works for both List and Read/Write/Delete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants