You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unable to set up a specific request body with extend_schema.
The description in source files says:
:param request: replaces the discovered ``Serializer``. Takes a variety of inputs
- ``Serializer`` class/instance
- basic types or instances of ``OpenApiTypes``
- :class:`.PolymorphicProxySerializer` for signaling that the operation
accepts a set of different types of objects.
- ``dict`` with media_type as keys and one of the above as values. Additionally, in
this case, it is also possible to provide a raw schema dict as value.
The first option works, as per the example in documentation. But it's unclear how to set up a custom dict. I've tried multiple different variations and usually it results in 2 options (regardless of my custom fields):
request={"field1": OpenApiTypes.STR, "field2": OpenApiTypes.STR, ...} >>> "string"
Yes, not even a json, just a single word "string".
Unable to set up a specific request body with extend_schema.
The description in source files says:
The first option works, as per the example in documentation. But it's unclear how to set up a custom dict. I've tried multiple different variations and usually it results in 2 options (regardless of my custom fields):
request={"field1": OpenApiTypes.STR, "field2": OpenApiTypes.STR, ...}
>>> "string"Yes, not even a json, just a single word "string".
And in some other cases I've seen this appear:
Which clearly looks like a placeholder.
The text was updated successfully, but these errors were encountered: