📝 Support conditional parsing in components (#453)
Right now we support conditional return types:
django-modern-rest/django_modern_rest/negotiation.py
Lines 212 to 228 in 35051cd
But, incomming
Body / Headers / Query can also be conditional, depending on the content-type.Should we reuse the same feature for parsing?
OpenAPI fully supports this feature:
requestBody:
description: Optional description in *Markdown*
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Pet"
application/xml:
schema:
$ref: "#/components/schemas/Pet"
For people who want to solve this: this is not easy!
Here's how the process should look like:
1. You present the idea and prototype implementation
2. We iterate on the design (several times maybe)
3. I approve the design
4. We can then continue with the implementation :)
#enhancement #help_wanted #django_modern_rest
sent via relator