Problem/Motivation
Replace JSON:API Schema dependency with Open API JSON:ARG module
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | Screenshot 2025-09-03 at 7.06.25 PM.png | 481.33 KB | ankitv18 |
| #15 | Screenshot 2025-09-03 at 7.04.26 PM.png | 456.75 KB | ankitv18 |
Issue fork jsonapi_query_builder-3529219
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- cps
changes, plain diff MR !5
- 3529219-replace-jsonapi-schema
compare
- backup
changes, plain diff MR !4
Comments
Comment #2
grasmash commentedComment #4
grasmash commentedComment #8
balsamaThe last commit fixes the PHPUnit tests. It does not fix the gitlab CI integration. That should be done in a separate issue.
Comment #9
ankitv18 commentedValidated the MR!5

Query builder page throwing 404 error
jsonapi_query_builder_update_10001 isn't executed properly

Comment #10
balsamaIt looks like you didn't update the composer dependencies when testing the update path? The update hook installs openapi_jsonapi, which the MR requires in its composer.json file. But according to your error, you don't have it in your codebase.
As for the JS error, you need to manually rebuild the JS app if you're testing it locally. (cd js; ./build.sh)
I think this all working as designed, but it would still be good to get a manual test that confirms.
Comment #12
traviscarden commentedComment #13
traviscarden commentedI've made a lot of progress here--I fixed the update hook a ton of static analysis, and some of the test issues--but I'm still having trouble with the React aspect of the JavaScript functional tests. I've improved the assertions a little and added a commit with some debugging output showing the HTML that Mink is getting before it starts looking for CSS selectors (as in, I actually committed the debugging output file so you can see it). It seems like the React app isn't initializing. It works just fine in manual testing, though. The failures are the same locally as on CI. Can anyone offer any guidance?
Comment #14
traviscarden commentedI've identified and fixed several more secondary issues, including a 403 error due to a missing route. Here's where things stand as I take off for the weekend. (Monday is a federal holiday in the U.S., so I won't be back till Tuesday.)
I think all the functional JavaScript tests are failing for the same reason, so I'm focusing on fixing one of them first:
\Drupal\Tests\jsonapi_query_builder\FunctionalJavascript\JsonApiQueryBuilderJsTest::testReactAppLoads(). The problem seems to be that the test browser (Mink/Selenium) doesn't render any React markup, while a real browser does. I've committed a few HTML dumps and screenshots for comparison:manual_test.htm(screenshot): Saved from a manual browser visit, shows the React app loading state as expected.custom-debugging.htm(screenshot): Captured by the test using$this->getSession()->getPage()->getOuterHtml(), but contains only CSS—no React app markup.simpletest_browser_output.html(screenshot): Generated by PHPUnit, also contains only CSS and no app markup.All the functional JavaScript tests are failing with the same error:
There are no more errors in the logs:
That's what I know at the moment. If my Functional JavaScript Test fairy doesn't visit over the weekend, I'll pick this up again on Tuesday.
Comment #15
ankitv18 commentedHi @traviscarden,


I've validated the functionality of this module and found few issues on sorting tab.
When I add the moderation_state
Drupal\Core\Entity\Query\QueryException: 'moderation_state' not found in Drupal\Core\Entity\Query\Sql\Tables->ensureEntityTable() (line 373 of /var/www/html/docroot/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php).When I add the UUID or Path field getting 400 error in response.
Drupal\Core\Http\Exception\CacheableBadRequestHttpException: Invalid nested filtering. The field `uuid`, given in the path `uuid`, does not exist. in Drupal\jsonapi\Context\FieldResolver->resolveInternalEntityQueryPath() (line 292 of /var/www/html/docroot/core/modules/jsonapi/src/Context/FieldResolver.php).Comment #16
traviscarden commentedThank you, @ankitv18. Do you know when these issues were introduced? Are they already there on the main branch, or are they regressions from this issue? And if this issue has introduced them, did they work before my changes and now they're broken?
Are you following a test script on this issue, or are you doing unguided/exploratory testing? If there are tests you're repeating as the issue progresses, would you share your checklist?
Comment #17
traviscarden commentedI've redone the local work (I want to make sure I didn't mess one of them up before; I'm not certain.) Here's the update:
manual_test.htm(screenshot): Saved from a manual browser visit.custom-debugging.htm(screenshot): Captured by the test using$this->getSession()->getPage()->getOuterHtml().simpletest_browser_output.html(screenshot)All the functional JavaScript tests are failing with the same error:
There are no more errors in the logs:
Comment #18
traviscarden commentedI don't know why the tests are still failing on CI. They're all passing locally, and so is stylelint. I've been instructed to go ahead and disable the failing jobs so we can merge the MR. I have done so, and of course, the build passes now.
I have extracted @ankitv18's comment in #15 to its own issue: #3545512: Errors when sorting.
Handing off to @balsama for review and merge.
Comment #19
balsamaThanks.
Comment #22
balsama