 [ ← blog / drupal ](/) Dec 22, 2020  ·  \#drupal  ·  2 min read 

# JSON:API Resources is Drupal 9.1 compatible



[JSON:API Resources](https://www.drupal.org/project/jsonapi_resources) is now Drupal 9.0 **and** 9.1 compatible with the [8.x-1.0-beta4 release](https://www.drupal.org/project/jsonapi_resources/releases/8.x-1.0-beta4)! If you are not familiar with this module, it is essentially the sandbox contributed project for building the extensibility layer for Drupal's JSON:API implementation. That is a fancy way of saying it lets you define custom endpoints that leverage the JSON:API specification.

We shipped the module with a requirement of `drupal/core:^8.8@alpha` as we required some code that would ship in Drupal 8.8.0. Howevever, we never released the fix for the `composer.json` file to allow installation of th module with Drupal 9!

I [made a commit *nine months* ago fixing it](https://git.drupalcode.org/project/jsonapi_resources/-/commit/e6351e136dd7de5f1f3a662281deff34f988a5c7). But I never got around to making a release 😬.

     ![git commit diff fixing drupal/core requirement](/sites/default/files/styles/large/public/2020-12/Screen%20Shot%202020-12-22%20at%2011.17.06%20PM.png?itok=8hYRrTcS) 

 

This is a pretty big deal because it unblocks most of (the entire?) JSON:API contrib ecosystem for Drupal 9 support. You couldn't use [JSON:API Search API](https://www.drupal.org/project/jsonapi_search_api), [JSON:API Views](https://www.drupal.org/project/jsonapi_views), and more on Drupal 9.

This release also comes with [a fix to be compatible with 9.1.0](https://www.drupal.org/project/jsonapi_resources/issues/3187549)! The `\Drupal\jsonapi\ResourceResponse` class used to implement `CacheableResponseInterface`. It does not in 9.1.0 and instead there is  a new `\Drupal\jsonapi\CacheableResourceResponse` response class. Here's the change record: <https://www.drupal.org/node/3163310>

I also tagged a new release of [JSON:API User Resources](https://www.drupal.org/project/jsonapi_user_resources) ([8.x-1.0-alpha4](https://www.drupal.org/project/jsonapi_user_resources/releases/8.x-1.0-alpha4).) This included a fix to the module to make it Drupal 9 compatible. This module supports user registration and password resets over JSON:API.

The JSON:API Search API needs some updates in the tests – <https://www.drupal.org/pift-ci-job/1921557>. But it should be fine on Drupal 9, as the failures are related to test specific items.

 

  ![](/themes/custom/mglaman/images/headshot.webp)Thanks for reading

I write about Drupal, PHP, and the quiet infrastructure behind large sites — caching, config, and testing. New posts land every week or two.

 [Subscribe via RSS →](/rss.xml) [About me →](/about-me) 

 



 

  [← Older

PHPStan Drupal 0.12.7 released, latest PHPStan now supported!

 ](/blog/phpstan-drupal-0127-released-latest-phpstan-now-supported) [Newer →

Wait, don't (immediately) send that email!

 ](/blog/wait-dont-immediately-send-email)