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

Enforce conflict response when requested PATCH resource object is unequal to endpoint #763

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
sliverc merged 11 commits into django-json-api:master from bpleshakov:patch-2
Jan 23, 2020

Conversation

Copy link
Contributor

@bpleshakov bpleshakov commented Jan 16, 2020
edited
Loading

Description of the Change

A server MUST return 409 Conflict when processing a PATCH request in which the resource object’s type and id do not match the server’s endpoint.

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name in AUTHORS

Boris Pleshakov added 3 commits January 16, 2020 19:27
A server MUST return 409 Conflict when processing a PATCH request in which the resource object’s type and id do not match the server’s endpoint.
Copy link

codecov bot commented Jan 17, 2020
edited
Loading

Codecov Report

Merging #763 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@
## master #763 +/- ##
=======================================
 Coverage 97.12% 97.12% 
=======================================
 Files 54 54 
 Lines 2787 2787 
=======================================
 Hits 2707 2707 
 Misses 80 80

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c51f6b9...7977c00. Read the comment docs.

@sliverc sliverc changed the title (削除) Validate that body and url id match. (削除ここまで) (追記) Enforce conflict response when requested PATCH resource object is unequal to endpoint (追記ここまで) Jan 20, 2020
Copy link
Member

@sliverc sliverc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this great addition to DJA. I always like to see PRs making DJA follow the JSON API spec more closely.

I have added some comments. Additionally in the body I have also added the pull request template again with the checklist. Could you add yourself to AUTHORS list as well and add a changelog entry?

Thanks.

Copy link
Member

@sliverc sliverc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@sliverc sliverc merged commit 96aaa13 into django-json-api:master Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@sliverc sliverc sliverc approved these changes

+1 more reviewer

@auvipy auvipy auvipy approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

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