You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
I'm working on the dm-rest-adapter code, which uses dm-serializer. Currently that code does not correctly honour :field options on properties, since it just calls #to_xml on the resource, so I'll have to post-process the result.
Perhaps a :raw => true option, or some such would be useful?
What do I need to do to run the specs? They just error with:
/home/chris/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- dm--adapter/spec/setup (LoadError)
Most of the dm-* projects do this when I run the specs, so I assume there's some environment setting I'm supposed to set up? I'd like to submit a patch, since this is currently holding back dm-rest-adapter. I need two optional behaviours:
Pay attention to :field names
Include the foreign keys in the output
Currently if we PUT any resource with associations, those associations are lost because the foreign keys are not serialized. Similarly, the fields that the REST service expects must be used in the Model, when ideally we'd be able to alias them with :field, since they're not the best named fields, but we don't have control over the remote service.
If this isn't something you'd like included in dm-serializer, please let me know and I'll re-invent the wheel, so to speak, directly in dm-rest-adapter.
When passing the :raw option to #to_json and #to_xml, all fields and foreign keys will be serialized using their original :field names and data-types. I need to write some specs, but this seems to work. I'm half asleep so will do that during the week and submit a pull request.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm working on the dm-rest-adapter code, which uses dm-serializer. Currently that code does not correctly honour
:field
options on properties, since it just calls#to_xml
on the resource, so I'll have to post-process the result.Perhaps a
:raw => true
option, or some such would be useful?The text was updated successfully, but these errors were encountered: