Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Add a method for getting serializer field name (OpenAPI)#7493
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Add a method for getting serializer field name (OpenAPI)#7493
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carltongibson left a comment
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.
Grrr. Yes. Seems reasonable. Can you add docs and tests please.
denisorehovsky commentedAug 23, 2020
@carltongibson Added docs and test. |
t-ionut commentedDec 21, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'd also love to see this merged 😄 I'm working on an API that'll be used by an Angular app and it can generate services based on OpenAPI & Swagger. I'd like to have both the API and its Swagger documentation show the same fields, in camelCase. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
WhyNotHugo commentedOct 15, 2022
. |
I've camelized my API using djangorestframework-camel-case (https://github.com/vbabiy/djangorestframework-camel-case). However, OpenAPI is still showing me that all of my fields are in snake case.
One way of fixing this is to override
map_serializermethod and do something similar to what has been described herevbabiy/djangorestframework-camel-case#79 (comment)However, it would be much simpler if we had a separate method for getting serializer field name that I can override:
This PR adds this method.