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

Naming convention of data attributes keys #77

Open
renz-ken opened this issue Aug 17, 2016 · 2 comments
Open

Naming convention of data attributes keys #77

renz-ken opened this issue Aug 17, 2016 · 2 comments

Comments

@renz-ken
Copy link

According to the JSON recommendation (http://jsonapi.org/recommendations/#naming) the preferred naming convention is to use hyphens to separate words in keys, eg 'modified-date'. Current implementation of the library has a dependency on nilportugues/php-api-transformer which converts camelCase words to underscore-separated words, eg: 'modifiedDate' to 'modified_date', which leaves no way to conform to the recommendation. It would be great to add an option that allows to choose which transformation logic is applied to the key names.

@nilportugues
Copy link
Owner

Notice this is a recommendation, not an enforcement.

Yet I agree a parameter could be set to take this into account and allow different conventions

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

No branches or pull requests

2 participants