-
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
Enable to get items considering with Alias name #1355
Enable to get items considering with Alias name #1355
Conversation
This commit update /entity/api/v2 API handler to be able to get item considering with related item.
…iesListRequest format
b1e4122
to
1875e25
Compare
⚡ ⚡ ⚡ Now the latest apiv2 client npm package is available at: |
eabd299
to
6c021b2
Compare
|
||
@extend_schema( | ||
parameters=[ | ||
OpenApiParameter("with_alias", OpenApiTypes.STR, OpenApiParameter.QUERY), |
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.
It would be better to use OpenApiTypes.BOOL
instead of OpenApiTypes.STR
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.
On second thought, OpenApiTypes.STR
is better than BOOL
because this is a GET parameter.
The request.query_params.get("with_alias")
contains string
typed value even through extend_schema
configuration.
if request.query_params.get("with_alias"):
return original_fields + ["aliases__name"]
else:
return original_fields
So that condition would be True
when user specified with_alias=false
.
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.
LGTM!
This commit update /entity/api/v2 API handler to be able to get item considering with related item.
Confirmation
I confirmed that I can get item that is related with specified alias at the alias list page.