-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Openapi custom operation name #7190
Openapi custom operation name #7190
Conversation
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.
Hi @gnuletik.
I think this is a good step.
- Let's promote
_get_operation_id()
toget_operation_id()
and document it to be overridden. - Then add
get_operation_id_base()
, which just allows people to add logic instead of using the model name. - Then call the
__init__()
kwargoperation_id_base
.
Make sense? I think that will give the right level of flexibility for the future.
8bebf03
to
a36232a
Compare
Hi @carltongibson, Thanks for the feedback! |
* rename operation_name with operation_id_base * add get_operation_id_base * get_operation_id not private * update docs * update tests
a36232a
to
03d3406
Compare
Thanks for the heads up @dhaval-mehta ! |
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.
Super. Thank looks great @gnuletik. 🥇
This PR allow the user to customize the operationId's name.
It fixes the subtask " Allow setting a custom operation ID on views with an attribute?" defined here #6549
Thanks !