Schema/OpenAPI: Make operationId camel-case#7208
Merged
carltongibson merged 2 commits intoencode:masterfrom Mar 3, 2020
Merged
Schema/OpenAPI: Make operationId camel-case#7208carltongibson merged 2 commits intoencode:masterfrom
carltongibson merged 2 commits intoencode:masterfrom
Conversation
Collaborator
carltongibson
left a comment
There was a problem hiding this comment.
Hi @gnuletik. OK, this seems reasonable. If you rebase and adjust tests we'll go with it.
Thanks for the input!
1bfdce9 to
3300936
Compare
Contributor
Author
|
Thanks for the feedback! |
Collaborator
|
Super thanks. I think we just need one more rebase. 😀 |
7d2dbdd to
200e839
Compare
200e839 to
d1c849e
Compare
Closed
6 tasks
Contributor
Author
|
I rebased it on master @carltongibson :) |
carltongibson
approved these changes
Mar 3, 2020
Collaborator
carltongibson
left a comment
There was a problem hiding this comment.
Well done.
Finally! 😀
pchiquet
pushed a commit
to pchiquet/django-rest-framework
that referenced
this pull request
Nov 17, 2020
sigvef
pushed a commit
to sigvef/django-rest-framework
that referenced
this pull request
Dec 3, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR intend to make the OpenAPI - AutoSchema's operationIds camel case and consistent across the schema.
The operationId in OpenAPI examples are all camel case.
e.g. : Do a CTRL-F for "operationId" on the spec
The current behavior is the following :
ViewSet(with the inherited methods :get,list,retrieve,partial_updateetc..), you will get anoperationIdlikepartial_updateItemwhich is halfsnake_caseand halfcamelCase.get,post,putetc...), you will get anoperationIdlikeRetrieveItemwhich is "PascalCase" or "upper camel case".With this PR, the auto-generated
operationIdwill be camelCase.