Update justinrainbow/json-schema library from 5.* to ~5 || ~6 to allow for a smoother updates and better integration with JSON:API Extra

Created on 12 June 2025, 15 days ago

Problem/Motivation

JSON:API Extras, Schemata, and the e0ipso/shaper library are using the justinrainbow/json-schema with a wider options to use ~5 or ~6

jsonrainbow/json-schema has a new release
https://github.com/jsonrainbow/json-schema/releases/tag/6.4.2

Some time we could face the following error in some $ref or JSON API
"JsonSchema\Exception\InvalidArgumentException: Unable to encode schema array as JSON: Recursion detected in JsonSchema\Constraints\BaseConstraint::arrayToObjectRecursive() (line 143 of /var/www/html/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/BaseConstraint.php)."

Steps to reproduce

Given that a Drupal ~11.1/~11.2 jsonapi_extras, schemata, and ui_patterns modules required and enabled
Then they are forced to use the 5.* version of the library
But not the ~6 version

Proposed resolution

  • Change "justinrainbow/json-schema" to ~5 || ~6 in the composer.json file, to allow for a smoother update process.
  • Hoping that the justinrainbow/json-schema could be added to Drupal Core at some point

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024