{"action":"opened","issue":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/491","labels_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/491/labels{/name}","comments_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/491/comments","events_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/491/events","html_url":"https://github.com/cerebris/jsonapi-resources/issues/491","id":111420470,"number":491,"title":"Why does :type show a NAME COLLISION?","user":{"login":"nathanpalmer","id":125599,"avatar_url":"https://avatars.githubusercontent.com/u/125599?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanpalmer","html_url":"https://github.com/nathanpalmer","followers_url":"https://api.github.com/users/nathanpalmer/followers","following_url":"https://api.github.com/users/nathanpalmer/following{/other_user}","gists_url":"https://api.github.com/users/nathanpalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanpalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanpalmer/subscriptions","organizations_url":"https://api.github.com/users/nathanpalmer/orgs","repos_url":"https://api.github.com/users/nathanpalmer/repos","events_url":"https://api.github.com/users/nathanpalmer/events{/privacy}","received_events_url":"https://api.github.com/users/nathanpalmer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-14T15:15:20Z","updated_at":"2015-10-14T15:15:20Z","closed_at":null,"body":"If our models have a property called type it shows this `NAME COLLISION` error. However since the properties for a model go under attribute it shouldn't conflict with the jsonapi spec (and also seems to be serializing properly in my tests.)\r\n\r\n```ruby\r\ndef check_reserved_attribute_name(name)\r\n  # Allow :id since it can be used to specify the format. Since it is a method on the base Resource\r\n  # an attribute method won't be created for it.\r\n  if [:type, :href, :links, :model].include?(name.to_sym)\r\n    warn \"[NAME COLLISION] `#{name}` is a reserved key in #{@@resource_types[_type]}.\"\r\n  end\r\nend \r\n```"}}