Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Convert include queries back to snake case #257

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

Merged
jerel merged 1 commit into django-json-api:develop from ZeroCater:underscore_includes
Jul 12, 2016

Conversation

Copy link
Contributor

@birkholz birkholz commented Jun 30, 2016
edited
Loading

In parsers, we convert incoming keys to snake case (undoing whatever formatting was done during rendering). However, include parameters have to exactly match the fields of models/serializers.

This PR brings the same reversal behavior to include parameters as its done for attributes, etc.

Example:
?include[firstName]= == ?include[first_name]=

ebramanti reacted with thumbs up emoji
Copy link
Member

jerel commented Jul 7, 2016

@scottfisk what are your thoughts on this? This one would be easy to merge but it looks like we also have related work at #204

Copy link
Contributor Author

birkholz commented Jul 7, 2016

@jerel I wrote this up before I saw #204

It seems that #204 is taking things further by also reversing pluralization and adding a setting to specify which format the keys should be reverted to. In my opinion, the effort of that PR should be expanded to the other areas that perform this behavior, namely parsing. This could then be considered a stopgap until that larger development is ready.

Copy link
Contributor

@jerel This looks good to me. Agreed @birkholz I think we can pull this and #204 can continue the more in depth work based on this.

@jerel jerel merged commit c93dea1 into django-json-api:develop Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /