box / box-python-sdk-gen

Repository for generated Box Python SDK
Apache License 2.0
20 stars 4 forks source link

fix: add handling to update_user_by_id to allow setting enterprise to 'null' to roll users off enterprise #203

Closed Djones4822 closed 5 days ago

Djones4822 commented 1 week ago

Added handling to the update_user_by_id to allow the string "null" for enterprise to properly clear the enterprise as per the api documentation. I'm unsure where else this pattern may exist, but it seems that the sdk generally does not allow users to "clear" values since the serialize method always filters out values set to None. This PR only addresses this one use case through direct handling of the enterprise request body parameter.

CLAassistant commented 1 week ago

CLA assistant check
All committers have signed the CLA.

arjankowski commented 5 days ago

Hi @Djones4822 Thank you for your contribution, first by reporting the bug and then by creating a PR with the fix 🚀

However, we cannot merge this PR because the code in this repository is generated by our product codegen based on the API. Even if we merged this or any other PR modifying the code, these changes would be overwritten the next time the generator is run.

To address the issue correctly, we need to make changes to our code generator to support nullable fields globally. Nevertheless, we appreciate the inspiration, it will certainly be useful 👍

Regards, Artur