dpc-sdp / tide_api

Content API for Tide distribution.
https://www.drupal.org/project/tide_api
GNU General Public License v2.0
0 stars 2 forks source link

[SDPAP-7855] Allow undefined include in a request, so response is 200 rather than 400 #105

Closed krakerag closed 1 year ago

krakerag commented 1 year ago

JIRA issue: https://digital-vic.atlassian.net/browse/SDPAP-7855

Changed

  1. Adds some classes to be decorated to allow us to bypass the JSONAPI rules pertaining to include requests
  2. This means that any include request that doesn't match a field will still return valid fields rather than 400 response
  3. Added behat tests to cover these new changes

Screenshots

N/A

vincent-gao commented 1 year ago

@krakerag noice! just bit formating things

the title of the PR could be [SDPAP-7855] allow undefined include

the description

Jira

https://digital-vic.atlassian.net/browse/SDPAP-7855

Fix

This adds classes to allow us to define any include we want on a JSONAPI request, without it returning a bad request to the submitting front end.

krakerag commented 1 year ago

@vincent-gao totally. You've caught me out being lazy because there's no PR template here. I should add one!