-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error of multiple inputs with the same type. When using same seri… #530
Fix error of multiple inputs with the same type. When using same seri… #530
Conversation
I'm afraid I don't have any experience with Django Rest Framework, so I'm going to opt-out of reviewing this one. |
I don't have any experience with Django Rest Framework either unfortunately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this change require existing code bases to update their client? If I understand correctly the input type label will change.
I'm not sure, the types are generated every time the schema is created. I have been using this fix several months without problems. |
We ran into this problem. The pull request solves the problem, but is it necessary to create 2 Input types? would't be more appropriate to reuse the first one that gets created? After all if its the same Serializer, should be also the same serializer input type right? |
The correct way should be to reuse the first type as you are saying. But when I encountered this problem I didn't find the way to do it, so I implemented this workaround meanwhile. I haven't had time to look for a better solution. |
Yes, I hear you ... we commented the assertion :-) something like this? (Did not test it as I don't have the project setup)
|
It could work, at this moment I do not have the project configured to test it, but as soon as I can I will see if it works and I will update the PR accordingly. Thanks! |
aa8f1ff
to
1e76903
Compare
@dani0805 I have updated the PR with your solution, I haven't tested it in our projects yet, but the test of the schema works. |
…jango into bugfix/multiple_model_serializers
f20fbc2
to
97461d1
Compare
This would solve headaches for us. Let's get this merged 👍 |
why no one reviews and merges this, please merge this ASAP |
Hey @Shehab-Muhammad please appreciate that this project is worked on my volunteers in their spare time! |
@phalt I appreciate your work, of course. thank you |
…alizer.
Fix #478