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

Schemas: Map renderers/parsers for request/response media-types. #6865

Open
wants to merge 6 commits into
base: master
from

Conversation

@knivets
Copy link
Contributor

commented Aug 11, 2019

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

@knivets

This comment has been minimized.

Copy link
Contributor Author

commented Aug 20, 2019

@carltongibson and this one too 😄

@carltongibson

This comment has been minimized.

Copy link
Collaborator

commented Aug 21, 2019

HI @knivets. Yes. It's on the list. Just a question of bandwidth. They're not forgotten. 👍

@carltongibson
Copy link
Collaborator

left a comment

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?

@carltongibson carltongibson force-pushed the knivets:openapi_multipart branch from 549fec6 to 0e7954d Sep 3, 2019

@carltongibson

This comment has been minimized.

Copy link
Collaborator

commented Sep 3, 2019

(I squashed, rebased, and edited a little bit...)

@carltongibson carltongibson self-assigned this Sep 3, 2019

@carltongibson carltongibson changed the title [WIP] OpenAPI multipart media type Schemas: Map renderers/parsers for request/response media-types. Sep 3, 2019

@carltongibson carltongibson force-pushed the knivets:openapi_multipart branch from 0e7954d to 324242b Sep 3, 2019

@knivets

This comment has been minimized.

Copy link
Contributor Author

commented Sep 5, 2019

Sure, I'll try to add some tests by the end of the week.

@knivets

This comment has been minimized.

Copy link
Contributor Author

commented Sep 15, 2019

Hey @carltongibson, please have a look at the updates I've pushed. Let me know if you have any feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.