axnsan12 / drf-yasg

Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.
https://drf-yasg.readthedocs.io/en/stable/
Other
3.39k stars 434 forks source link

Fields get shown as required in PATCH #719

Open creyD opened 3 years ago

creyD commented 3 years ago

I created a ModelSerializer in DRF and I am handling it with rest_framework.UpdateModelMixin.

When accessing the Swagger UI, I see the same structure for PUT as for PATCH, even though for PATCH fields shouldn't be required.

If I actually use the API, it functions correctly, so the display here is wrong.

patch put

creyD commented 3 years ago

@axnsan12 Could you please take a look at this?

MartinSchmidt123 commented 2 years ago

I can confirm this behavior.