Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
OpenAPI: Map renderers/parsers for request/response media-types.#6865
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
knivets commentedAug 20, 2019
@carltongibson and this one too 😄 |
carltongibson commentedAug 21, 2019
HI@knivets. Yes. It's on the list. Just a question of bandwidth. They're not forgotten. 👍 |
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.
Hi@knivets. OK, this looks great.
We could probably just do with some tests checking a view with different parsers/renderers, to confirm the request/responses are correctly generated. Do you have the bandwidth to add a couple of those?
549fec6 to0e7954dComparecarltongibson commentedSep 3, 2019
(I squashed, rebased, and edited a little bit...) |
0e7954d to324242bCompareknivets commentedSep 5, 2019
Sure, I'll try to add some tests by the end of the week. |
knivets commentedSep 15, 2019
Hey@carltongibson, please have a look at the updates I've pushed. Let me know if you have any feedback. |
knivets commentedSep 29, 2019
Any update on this@carltongibson? |
carltongibson commentedOct 1, 2019
Hi@knivets. Sorry for the delay. BeenBusy™. Looking good — I'll have a proper look this week. 🥇 |
knivets commentedOct 1, 2019
No worries@carltongibson |
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.
OK, great stuff. Sorry for the delay in getting to you@knivets! Thanks so much. 🥇
Issue#6863
TL;DR I ended up implementing an automatic parser/renderer mapping to corresponding request/response media type. The tests are passing.
So while testing this I discovered that every endpoint that supports request body, accepts multipart requests even if there are no file fields in serializers. This is correct since this is how DRF default parsers setting actually works. So there is no longer a need to handle endpoints that accept files in a special way. Anyway, this is just an idea let me know what you think@carltongibson@tomchristie