Comments

Wim Leers created an issue. See original summary.

e0ipso’s picture

Thanks for taking the time to create this!

e0ipso’s picture

Title: [PP-1] Move Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber::validateResponse() to its own subscriber » Move Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber::validateResponse() to its own subscriber
wim leers’s picture

Status: Postponed » Active
wim leers’s picture

wim leers’s picture

Status: Active » Needs review
Related issues: +#2941685: Port parameter based resource config from REST module
StatusFileSize
new20.6 KB

Done.

Together with #2941685: Port parameter based resource config from REST module, this will make sure that \Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber matches \Drupal\rest\EventSubscriber\ResourceResponseSubscriber as closely as possible, hence opening the door to moving it into the serialization module in the future.

Rather than one very complex event subscriber, we now have two simple ones, one of which will disappear in the future!

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Needs review » Needs work
wim leers’s picture

Assigned: wim leers » Unassigned
Status: Needs work » Needs review
StatusFileSize
new20.61 KB
gabesullice’s picture

Issue tags: +API-First Initiative

Looks really good. Just one thing:

+++ b/src/EventSubscriber/ResourceResponseValidator.php
@@ -0,0 +1,257 @@
+   * Serializes ResourceResponse responses' data, and removes that data.

Outdated comment.

gabesullice’s picture

Status: Needs review » Reviewed & tested by the community

RTBC, the one test failure is due to a required update to HEAD because of: #2950129: Add helpful reason for 'update' and 'delete' access not being allowed to MediaAccessControlHandler

gabesullice’s picture

Status: Reviewed & tested by the community » Needs work

Whoops, actually still needs work because of the comment, then it can be RTBC.

wim leers’s picture

Assigned: wim leers » Unassigned
Status: Needs work » Needs review
StatusFileSize
new689 bytes
new20.57 KB

Addressed #9.

Will re-RTBC once this passes against 8.6, i.e. once #2969493: MediaTest::testPatchIndividual() and MediaTest::testDeleteIndividual() failing on 8.6 lands.

wim leers’s picture

wim leers’s picture

Status: Needs review » Reviewed & tested by the community

Green on both 8.5 & 8.6!

wim leers’s picture

Crediting @dawehner because he suggested it (see IS).

  • Wim Leers committed 6e33f68 on 8.x-1.x
    Issue #2859207 by Wim Leers, gabesullice, dawehner: Move Drupal\jsonapi\...
  • Wim Leers committed 5ddf31a on 8.x-2.x
    Issue #2859207 by Wim Leers, gabesullice, dawehner: Move Drupal\jsonapi\...
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.