Skip to content
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

Fixes #6875 - OpenAPI Schema inconsistent operationId casing #6876

Merged
merged 1 commit into from Sep 3, 2019

Conversation

peterfarrell
Copy link
Contributor

Description

Fixes incorrect casing of operationId in OpenAPI generation - refs #6875. Specifically fixing ListThings to listThings which standardizes on lowerInitialCamelCase like the other method types.

Updated tests as well.

@peterfarrell
Copy link
Contributor Author

@carltongibson Fixed issue with casing also fixed edge cases where it incorrectly removed the "action" from the end of the name. If the view class was called AuthorRecreate, it would incorrectly build the operationId as createAuthorRe by stripping create was the action at the end when it's the end steam of Recreate. Used title() on the action to properly look at the camel-casing of the name to see if the action should be stripped from the end AuthorRecreate (put) -> createAuthorRecreate.

Ready for review.

Copy link
Collaborator

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, super. Thanks @peterfarrell!

@carltongibson carltongibson merged commit b3f032f into encode:master Sep 3, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants