Skip to content

Fixed incorrect OpenAPI response schema generation for a DELETE method in generic views #6860

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

Merged
merged 2 commits into from
Aug 9, 2019

Conversation

knivets
Copy link
Contributor

@knivets knivets commented Aug 9, 2019

Fixes #6856

…enerated incorrect OpenAPI response body schema
@knivets
Copy link
Contributor Author

knivets commented Aug 9, 2019

I was wondering: what if a user overrides the delete method to include a response body? How can we detect this in the inspector? Should we?

@carltongibson
Copy link
Collaborator

Let’s not try to guess. We’ll cross that bridge when it comes up. (In the first place they can just subclass AutoSchema here.)

@knivets
Copy link
Contributor Author

knivets commented Aug 9, 2019

Pushed an update!

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.

Yep OK. That looks like it. Welcome aboard! 🕺

@knivets
Copy link
Contributor Author

knivets commented Aug 9, 2019

Nice! I have a couple of other issues, all related to OpenAPI generation. Would you be able to have a look? Also if I'm willing to work on these, should I attach detailed examples too? I tested and I know that those are bugs/issues.

@carltongibson
Copy link
Collaborator

Yes, super. Create tickets, or straight to PR is you’ve got a fix already. Thanks!

@carltongibson carltongibson merged commit a142467 into encode:master Aug 9, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DRF generates incorrect OpenAPI schema for generic views' delete method
2 participants