Skip to content

Should be able to return "Resource Identifier Objects" #62

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

Closed
dimisus opened this issue Feb 1, 2019 · 4 comments
Closed

Should be able to return "Resource Identifier Objects" #62

dimisus opened this issue Feb 1, 2019 · 4 comments

Comments

@dimisus
Copy link

dimisus commented Feb 1, 2019

I try to return a resource identifier object of an entity and to do so I tried to whitelist the 'id' only or to serialize data where data = { id }.

I always end up with the attributes object being empty attributes: {}

Shouldn't there be an option to deactivate attributes or any way to represent the resource identifier only?

@dimisus
Copy link
Author

dimisus commented Feb 4, 2019

I think what is needed is a flag... something like onlyResourceIdentifiers... I will try to create a pull request asap.

@danivek
Copy link
Owner

danivek commented Feb 4, 2019

@dimisus, You are right, there is no reason to keep empty attributes property. I will add a check for empty attributes property.

@dimisus
Copy link
Author

dimisus commented Feb 4, 2019

Okay, cool. Thank you.

@danivek danivek closed this as completed in 1bff535 Feb 4, 2019
@danivek
Copy link
Owner

danivek commented Feb 4, 2019

Fixed in v1.14.1

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

2 participants