-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add GET /organization/:orgId/roles support #338
Add GET /organization/:orgId/roles support #338
Conversation
WorkOS::Types::ListStruct.new( | ||
data: roles, | ||
list_metadata: { | ||
after: nil, | ||
before: nil, | ||
}, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit silly. There's no pagination for this API, so perhaps I should just create a new type. Let me know your thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose you could just return the roles
array directly if you don't think it'll ever be a paginated API.
But if there's a chance it'll become paginated later, then returning this at least prevents the need to introduce a breaking change later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having to introduce a breaking change later is my worry. Pagination doesn't really make sense right now from a product perspective, but I worry if this will change as we see more use cases. I'll leave as-is for now.
WorkOS::Types::ListStruct.new( | ||
data: roles, | ||
list_metadata: { | ||
after: nil, | ||
before: nil, | ||
}, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose you could just return the roles
array directly if you don't think it'll ever be a paginated API.
But if there's a chance it'll become paginated later, then returning this at least prevents the need to introduce a breaking change later.
Description
Add GET /organization/:orgId/roles support.
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.