hashicorp / vault-client-go

HashiCorp Vault Go Client Library generated from OpenAPI spec.
Mozilla Public License 2.0
84 stars 17 forks source link

Naming choices for list vs other operation types #191

Open maxb opened 1 year ago

maxb commented 1 year ago

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 commented 1 year ago

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.