Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Partial serializer should not have required fields (OpenAPI)#7563
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
adamchainz commentedOct 6, 2020
Plaese provide more explanation of this issue - e.g. a link to the relevant decsription in the Open API spec, what issues you're facing, ... |
denisorehovsky commentedOct 6, 2020
@adamchainz Hi, Adam. Here's the problem. Let's say we have this serializer: And a ViewSet: Since the request is partial, all the fields are not required. In a request body, we can send:
And it should work. However, DRF's OpenAPI generated documentation will show that both field_a and field_b are required, even though they're not. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
denisorehovsky commentedOct 16, 2022
@adamchainz So what do you think? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
auvipy left a comment
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.
it is a very small change so if you could rebase we can consider accepting this. otherwise will close
auvipy commentedDec 17, 2022
can you please share the relevant part of the spec to verify? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
No description provided.