Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Rework automatic :id assignment #3

Open
nbibler opened this issue Apr 27, 2015 · 0 comments
Open

Rework automatic :id assignment #3

nbibler opened this issue Apr 27, 2015 · 0 comments

Comments

@nbibler
Copy link
Member

nbibler commented Apr 27, 2015

In the Mapping definition the :id attribute is automatically defined. While I recognize that JSON API requires an ID, I'm not entirely sure that AMS does. Further, recent changes to the serializers to allow for customizations of the value (block attribute syntax, for example) cannot be used with this attribute definition.

# /lib/ivy/serializers/mapping.rb
module Ivy
  module Serializers
    class Mapping
      def initialize(klass)
        # ...

        attribute(:id)
      end
    end
  end
end

Should the :id continue to be auto-set or should that be the responsibility of the developer to include in each/all of their serializers?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant