I completely forgot about this until this morning: https://github.com/json-api/json-api/pull/1333#discussion_r243379557

We can still do this because 2.1 has not actually been released.

Camel-casing is an official recommendation of the spec for profile query parameters.

CommentFileSizeAuthor
#2 3024799-2.patch15.1 KBgabesullice

Comments

gabesullice created an issue. See original summary.

gabesullice’s picture

Status: Active » Needs review
StatusFileSize
new15.1 KB

Patch.

gabesullice’s picture

Issue summary: View changes
gabesullice’s picture

Status: Needs review » Reviewed & tested by the community

These are just string replacements. I'll let either @e0ipso or @Wim Leers commit though.

wim leers’s picture

Status: Reviewed & tested by the community » Fixed

Hah!

+++ b/src/Access/EntityAccessChecker.php
@@ -11,6 +11,7 @@ use Drupal\Core\Entity\RevisionableInterface;
+use Drupal\jsonapi\JsonApiSpec;

@@ -197,7 +198,7 @@ class EntityAccessChecker {
-      $access = AccessResult::neutral()->addCacheContexts(['url.query_args:resource_version'])->orIf($access);
+      $access = AccessResult::neutral()->addCacheContexts(['url.query_args:' . JsonApiSpec::VERSION_QUERY_PARAMETER])->orIf($access);

This is a nice improvement. Everything else is a mere search/replace.

Status: Fixed » Closed (fixed)

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