-
Notifications
You must be signed in to change notification settings - Fork 271
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
many=True inconsistent behavior for non-200 status_code #402
Comments
hey! yes we changed that on purpose. the other argument is in #277. the rationale was that responses in the error range ( i have to investigate if it is possible to honor that |
@tfranzel I am also having this same issue. Is there perhaps an estimation on when a fix for this will be pushed out or any guidance you could give for anyone looking to make a PR to fix this, such as where in the code we can find this behavior? Also, in the meantime, is there any workaround we can apply? Edit: I see this line here is responsible for the behavior: drf-spectacular/drf_spectacular/openapi.py Line 1081 in 2a22935
|
regarding my earlier comment:
pretty certain at this point that it is not possible make it do the right thing by design. DRF simply does not provide enough information for us at this point to make a more educated decision. @ConnorLanglois : i'll look into it again, but a setting is the most likely outcome. can't see any other way to serve both use-cases. |
@ConnorLanglois @jerinpetergeorge introduced a new setting to choose the behavior. default is the current behavior. |
@tfranzel Nice work man! Really appreciate the hard work and fast response time. Yeah that setting looks perfect, any clue on when next release is? |
thanks! got one more issue to look at after which i will do a release. |
Consider I have a view as below,
Specifically, focus on the
responses=EmptyPayloadResponseSerializer(many=True)
statementI have got the expected behavior
So fo so good!!!
Then, I have changed the
responses
parameter as,and I have got the schema as,
Is this the intended behavior? 🤔
The text was updated successfully, but these errors were encountered: