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

support for singletons #3

Open
toumorokoshi opened this issue Sep 22, 2023 · 1 comment
Open

support for singletons #3

toumorokoshi opened this issue Sep 22, 2023 · 1 comment
Labels
resource-definition resource definition related discussions.

Comments

@toumorokoshi
Copy link
Member

we need to resolve whether singletons is an acceptable pattern for a resource, or is an implicit behavior that doesn't need to be explicitly stated in the resource definition (i.e. implemented server-side).

singletons are described in google.aip.dev today: https://google.aip.dev/156, with some patterns that help identify it.

@toumorokoshi
Copy link
Member Author

It is my personal opinion that we should not support singletons as a first class pattern, primarily because I don't see a scenario where singletons are a first-class concept in a resource.

The areas where a singleton differ are:

  1. no create, list, or delete methods.
  2. update and get operation directly on the sub-collection rather than an actual resource.

2 is problematic for a host of reasons (results in a non-uniform resource name pattern), so I argue it should be removed. a resource can get create / list / delete-able without necessarily being a singleton, so we don't need a specific identifier for that.

@toumorokoshi toumorokoshi mentioned this issue Sep 22, 2023
2 tasks
@toumorokoshi toumorokoshi added the resource-definition resource definition related discussions. label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resource-definition resource definition related discussions.
Projects
None yet
Development

No branches or pull requests

1 participant