chore(api): add the new 'ownership' parameter for listing storages#2208
chore(api): add the new 'ownership' parameter for listing storages#2208nmanerikar merged 3 commits intomasterfrom
Conversation
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
tobice
left a comment
There was a problem hiding this comment.
Btw that's a lot of reviewers 😄 I'd say one person from the tooling team and one person from us should be enough.
Not sure why Franta is there, marked as an owner 🤔
The original idea was that I'm there to check that the OpenAPI spec follows best practices and Franta is supposed to review the correctness of what's being written there. We can re-evaluate this for sure. |
| type: string | ||
| enum: | ||
| - ownedByMe | ||
| - sharedWithMe | ||
| examples: [ownedByMe] |
There was a problem hiding this comment.
In OpenAPI 3.1 (which we now use), it should be possible to write enums like this:
type: string
oneOf:
- const: ownedByMe
description: Return only storages owned by the user.
- const: sharedWithMe
description: Return only storages shared with the user by other users.The benefit of this is that you don't have to repeat the documentation three times. Can you please try it?
There was a problem hiding this comment.
I did try it like that before. But that means that we end up with the generic term "storages" instead of the specific terms ("datasets", et.c.). I think using the generic term might be confusing for the user - from their POV they are looking at 'datasets' documentation, and suddenly the docs refer to 'storages'... are they the same? different?
There was a problem hiding this comment.
Yeah, that's also a valid point. Resolve it as you see fit 🙂
Document the new 'ownership' parameter in the listing requests for storages.
Note
Documents a new optional
ownershipquery parameter for storage listing endpoints to filter by resource ownership.ownershiptoGETlistings for datasets, key-value stores, and request queues (datasets.yaml,key-value-stores.yaml,request-queues.yaml)ownedByMeorsharedWithMe; default remains all accessible resourcesWritten by Cursor Bugbot for commit ee02f2e. Configure here.