Remove `required` attribute from unidirectional serializers
Problem
Most serializers in the API are unidirectional, in that they serialize instances to JSON but not vice versa. These serializers have no use for the required attribute.
Solution
The required argument should be removed from all output serializers.
Additional context
To be fair, the required prop has a notable effect during serialization. If set to False fields with the value null are omitted entirely, which is counterintuitive and may be surprising, so we better leave it to the default value of True.
Implementation
- [ ] 🙋 I would be interested in implementing this feature.
Hi @dhruvkb, This issue seems to be a good initiation of my journey toward contribution to FOSS projects. Can you please assign this to me?
Welcome, @sahil-R! I assigned the issue to you. Thank you for your interest in improving Openverse.
@krysal @dhruvkb hey, I have cloned the repo and trying to build the server but pipenv isn't working and for some reason the curl as well for registration, I have edited the code but want to test it, the slack channel is also not working can I please get some heads help
@krysal @dhruvkb i managed to run the django server anyways,Thank you.
Hi @sahil-R, to build the server you do not need Pipenv. You can use the Docker-based development setup. Follow the steps in our Quickstart guide and comment here if you face any issues.
the slack channel is also not working
Can you elaborate on this? To the best of my knowledge the Slack channel is very active. If you post there, you will definitely receive a response.
Hey Dhruv, I tried to get the verification code for the slack account but the email is not reaching my inbox, I have checked my spam emails as well but without confirmation, i cannot get into the slack account,can you please send me the invitation,i have a few more things to talk as well like the pipenv is not installing the pipfile,and other stuff regarding the installation for general API and stuff.
Regards, Sahil Rasaikar
On Tue, Oct 18, 2022 at 1:53 AM Dhruv Bhanushali @.***> wrote:
Hi @sahil-R https://github.com/sahil-R, to build the server you do not need Pipenv. You can use the Docker-based development setup. Follow the steps in our Quickstart guide https://wordpress.github.io/openverse-api/guides/quickstart.html and comment here if you face any issues.
the slack channel is also not working
Can you elaborate on this? To the best of my knowledge the Slack channel is very active. If you post there, you will definitely receive a response.
— Reply to this email directly, view it on GitHub https://github.com/WordPress/openverse-api/issues/674#issuecomment-1281446864, or unsubscribe https://github.com/notifications/unsubscribe-auth/APGJ2CKGZ7FD4CJAPQELEATWDWYSZANCNFSM5U5ZF5TQ . You are receiving this because you were mentioned.Message ID: @.***>
@sahil-R it's not possible to invite you to the Making WordPress Slack workspace. You'll have to sign up for it by creating a WordPress.org account first and then following the instructions to join Slack on this page.
Thank you very much,i'll get in touch.
Dhruv, I have updated the tests, and all tests are working fine as messaged you on slack as well, ill be waiting for the next steps,Thankyou.
Now that you've set up the local stack @sahil-R, the next step would be to remove the required prop from the serializers as mentioned in the original issue and open a PR with your changes.