Drf-yasg: Identically named serializers seem to confuse drf-yasg

Created on 6 Mar 2018  路  2Comments  路  Source: axnsan12/drf-yasg

We had two PatientSerializers defined in our project; one of them was used for both views in the Swagger output when in fact each view used a different PatientSerializer; my workaround was to rename one of them (probably best that they are not identically named, but still an issue that might bite someone else)

wontfix

Most helpful comment

Hello!

This is known and documented behaviour. I pondered a bit at the time and conisdered that it's preferable to the alternative (throwing an error). You can follow the steps from the link to resolve the conflict without having to rename the class.

All 2 comments

Hello!

This is known and documented behaviour. I pondered a bit at the time and conisdered that it's preferable to the alternative (throwing an error). You can follow the steps from the link to resolve the conflict without having to rename the class.

I'm going to close this off for now. If you have a suggestion about how this situation could be handled better, feel free to reopen it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phihag picture phihag  路  3Comments

nicholasgcoles picture nicholasgcoles  路  4Comments

Amoki picture Amoki  路  4Comments

gertjanol picture gertjanol  路  5Comments

mkurnikov picture mkurnikov  路  4Comments