I am using Django rest swagger. Added a image filed to serializer which appears in rest framework UI. But do not appear in Swagger UI.
Added the following field in serializer. upload_photo = serializers.ImageField( required=False)
But swagger showing a simple text field. While rest framework showing a upload field. Can anyone help me to show upload field in swagger ui as well
For a file field you can override th YAML doctstring for the field:
parameters:
-
name: file
type: file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With