forked from Empact/roxml
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Parsing null values results in property being set despite reader
property present
#234
Comments
oliverguenther
added a commit
to opf/openproject
that referenced
this issue
Mar 15, 2021
oliverguenther
added a commit
to opf/openproject
that referenced
this issue
Mar 15, 2021
4 tasks
oliverguenther
added a commit
to opf/openproject
that referenced
this issue
Mar 17, 2021
ulferts
pushed a commit
to opf/openproject
that referenced
this issue
Mar 23, 2021
* Add Users form endpoints * Avoid cache_if as it caches properties for new_record? as well * Add specs * Add missing custom_field_values method * Fix missing firstname lastname api conversions * Disable cached_representer on user payload * Add patch to allow using our custom setter in case of nil values trailblazer/representable#234 * Add test for changing status * Fix expectation with changed attribute mapping * Disable rendering name property for users The name property is not accessible directly for users * Fix attribute names for first and lastname for writable * Ensure password is marked writable even though its not an attribute * Avoid explicitly setting to_ar_name conversion * Reuse AssignableCustomFieldValues concern * Fix structure of users.apib to be flat * Extend requests with custom fields * Output name, but dont mark as writable attribute * Fix id indentation * Rename schema email property * Fix param for user update form * Fix schema docs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
reader:
option is documented as follows:I have the following representer that sets a different property on represented after processing it. I do not want to have
status_code
being set automatically by representable, which is why I'm using areader
. Actually, I could have lived with asetter:
but that again is not called when passing{ status: nil }
into the representer.I would suspect the following code:
to output
But actually the call outputs
How should one avoid the
status
property being written and bypassing any setter / reader ?The text was updated successfully, but these errors were encountered: