[ ] Is there a way to allow Cart API POST/DELETE/PATCH to bypass ReadOnlyModeMethodFilterwithout forcing "Accept all JSON:API create, read, update, and delete operations." to be enabled?
By mocking the bundle for the unknown order, we cannot have any field config values.
$field_definitions = $this->fieldManager->getFieldDefinitions(
$entity_type_id,
$resource_type->getBundle()
);
if (empty($context['related']) || empty($field_definitions[$context['related']])) {
throw new BadRequestHttpException('Invalid or missing related field.');
}
ReadOnlyModeMethodFilter
without forcing "Accept all JSON:API create, read, update, and delete operations." to be enabled?items
field on orders is not a base field, making pseudo-bundle mocks difficult, we need https://www.drupal.org/project/commerce/issues/3002939 to land. See note belowBase field + bundles problem
By mocking the bundle for the unknown order, we cannot have any field config values.
This causes the related field to not exist.