-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
chore(api): Publish ProjectFiltersEndpoint #78954
Conversation
|
||
class ProjectFiltersResponse(TypedDict): | ||
id: int | ||
active: bool |
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'm not sure whether it's safe to document this as a bool
. Per the comment on ProjectFiltersEndpoint.get
:
# 'active' will be either a boolean or list for the legacy browser filters
# all other filters will be boolean
Looking at inbound_filters.get_filter_state
, there's one path where it returns arbitrary ProjectOption.objects.get_value
results in the _legacy_browsers_filter
case. Is that worth documenting, and if so how should we capture what seems to be freeform data?
parameters=[GlobalParams.ORG_ID_OR_SLUG, GlobalParams.PROJECT_ID_OR_SLUG], | ||
responses={ | ||
200: inline_sentry_response_serializer( | ||
"ProjectFiltersResponse", ProjectFiltersResponse |
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.
AFAICT an ad-hoc TypedDict
is appropriate here. Let me know if there's a better convention to follow for naming and/or where to define it.
Should we also type hint
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
No description provided.