Skip to content
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

Support Attributes named "type" #58

Open
aetherealtech opened this issue Aug 19, 2022 · 0 comments
Open

Support Attributes named "type" #58

aetherealtech opened this issue Aug 19, 2022 · 0 comments

Comments

@aetherealtech
Copy link

Expected Behavior

An entity with an attribute named type is legal json-api, and therefore Japx should be able to decode a resource with a field named type

Actual Behavior

Japx already requires an instance variable on entities named type that is assigned to the entity-level type, and the parser pulls all attributes up and therefore creates a conflict between type on the entity level and a type inside attributes

Steps to Reproduce the Problem

  1. Prepare a json-api response containing an entity with an attribute named type
  2. Decode the response with JapxKit.Decoder
  3. See that the type attribute is overwritten by the entity-level type

Specifications

  • Version:
  • Platform:
  • Subsystem:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant