Replace JSON:API Schema dependency with Open API JSON:ARG module

Created on 9 June 2025, 4 months ago

Problem/Motivation

Replace JSON:API Schema dependency with Open API JSON:ARG module

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇺🇸United States grasmash

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

Merge Requests

Comments & Activities

  • Issue created by @grasmash
  • Pipeline finished with Failed
    4 months ago
    Total: 38s
    #517988
  • Pipeline finished with Failed
    4 months ago
    Total: 98s
    #517999
  • Pipeline finished with Failed
    4 months ago
    Total: 38s
    #518000
  • First commit to issue fork.
  • Pipeline finished with Failed
    4 months ago
    Total: 878s
    #524521
  • Pipeline finished with Failed
    4 months ago
    Total: 3687s
    #524526
  • 🇺🇸United States balsama boston

    balsama changed the visibility of the branch backup to hidden.

  • 🇺🇸United States balsama boston

    The last commit fixes the PHPUnit tests. It does not fix the gitlab CI integration. That should be done in a separate issue.

  • Pipeline finished with Failed
    4 months ago
    Total: 3686s
    #525336
  • 🇮🇳India ankitv18

    Validated the MR!5
    Query builder page throwing 404 error

    jsonapi_query_builder_update_10001 isn't executed properly

  • 🇺🇸United States balsama boston

    It 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.

  • Status changed to Needs review about 2 months ago
  • First commit to issue fork.
  • Pipeline finished with Failed
    about 2 months ago
    Total: 2789s
    #575931
  • Pipeline finished with Failed
    about 2 months ago
    #576709
  • Pipeline finished with Failed
    about 2 months ago
    #579349
  • Pipeline finished with Failed
    about 2 months ago
    #579363
  • Pipeline finished with Failed
    about 2 months ago
    Total: 1893s
    #579965
  • Pipeline finished with Failed
    about 2 months ago
    Total: 2795s
    #579983
  • Pipeline finished with Running
    about 2 months ago
    #579996
  • Pipeline finished with Failed
    about 1 month ago
    #581018
  • Pipeline finished with Running
    about 1 month ago
    #581054
  • Pipeline finished with Failed
    about 1 month ago
    Total: 2494s
    #582624
  • 🇺🇸United States traviscarden

    I'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?

  • Pipeline finished with Failed
    about 1 month ago
    Total: 2788s
    #582639
  • Pipeline finished with Failed
    about 1 month ago
    Total: 2808s
    #584305
  • Pipeline finished with Failed
    about 1 month ago
    #585515
  • Pipeline finished with Failed
    about 1 month ago
    Total: 2770s
    #585683
  • Pipeline finished with Failed
    about 1 month ago
    Total: 2798s
    #585769
  • 🇺🇸United States traviscarden

    I'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:

    All the functional JavaScript tests are failing with the same error:

    1) Drupal\Tests\jsonapi_query_builder\FunctionalJavascript\JsonApiQueryBuilderJsTest::testReactAppLoads
    Behat\Mink\Exception\ElementNotFoundException: Element matching css ".query-panel-tab[data-tab="fields"]" not found.
    
    /var/www/html/vendor/behat/mink/src/WebAssert.php:465
    /var/www/html/tests/src/FunctionalJavascript/JsonApiQueryBuilderJsTest.php:113
    

    There are no more errors in the logs:

     ---- -------------- -------- ---------- ------------------------------------------------------------
      ID   Date           Type     Severity   Message
     ---- -------------- -------- ---------- ------------------------------------------------------------
      11   30/Aug 07:12   user     Info       User xlpztkl0 used one-time login link at time 1756501921.
      10   30/Aug 07:12   user     Info       Session opened for xlpztkl0.
      9    30/Aug 07:12   system   Info       jsonapi_query_builder module installed.
      8    30/Aug 07:12   system   Info       openapi_jsonapi module installed.
      7    30/Aug 07:12   system   Info       schemata_json_schema module installed.
      6    30/Aug 07:12   system   Info       schemata module installed.
      5    30/Aug 07:11   system   Info       openapi module installed.
      4    30/Aug 07:11   system   Info       jsonapi module installed.
      3    30/Aug 07:11   system   Info       serialization module installed.
      2    30/Aug 07:11   system   Info       field_ui module installed.
     ---- -------------- -------- ---------- ------------------------------------------------------------
    

    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.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 2786s
    #585796
  • 🇮🇳India ankitv18

    Hi @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).

  • 🇺🇸United States traviscarden

    Thank 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?

  • 🇺🇸United States traviscarden

    I'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:

    All the functional JavaScript tests are failing with the same error:

    1) Drupal\Tests\jsonapi_query_builder\FunctionalJavascript\JsonApiQueryBuilderJsTest::testReactAppLoads
    Behat\Mink\Exception\ElementNotFoundException: Element matching css ".query-panel-tab[data-tab="fields"]" not found.
    
    /var/www/html/vendor/behat/mink/src/WebAssert.php:465
    /var/www/html/tests/src/FunctionalJavascript/JsonApiQueryBuilderJsTest.php:121
    

    There are no more errors in the logs:

     ---- -------------- -------- ---------- ------------------------------------------------------------
      ID   Date           Type     Severity   Message
     ---- -------------- -------- ---------- ------------------------------------------------------------
      11   04/Sep 04:12   user     Info       User kw696290 used one-time login link at time 1756923133.
      10   04/Sep 04:12   user     Info       Session opened for kw696290.
      9    04/Sep 04:12   system   Info       jsonapi_query_builder module installed.
      8    04/Sep 04:12   system   Info       openapi_jsonapi module installed.
      7    04/Sep 04:12   system   Info       schemata_json_schema module installed.
      6    04/Sep 04:12   system   Info       schemata module installed.
      5    04/Sep 04:12   system   Info       openapi module installed.
      4    04/Sep 04:12   system   Info       jsonapi module installed.
      3    04/Sep 04:12   system   Info       serialization module installed.
      2    04/Sep 04:12   system   Info       field_ui module installed.
     ---- -------------- -------- ---------- ------------------------------------------------------------
    
  • Pipeline finished with Failed
    about 1 month ago
    Total: 1883s
    #589307
  • Pipeline finished with Failed
    about 1 month ago
    Total: 1887s
    #589750
  • Pipeline finished with Failed
    about 1 month ago
    Total: 1892s
    #591487
  • Pipeline finished with Failed
    about 1 month ago
    Total: 1907s
    #591526
  • Pipeline finished with Failed
    about 1 month ago
    Total: 1879s
    #591820
  • Pipeline finished with Success
    about 1 month ago
    Total: 133s
    #593219
  • 🇺🇸United States traviscarden

    I 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: 🐛 Errors when sorting Active .

    Handing off to @balsama for review and merge.

  • 🇺🇸United States balsama boston

    Thanks.

    • balsama committed e27bcc60 on 1.0.x
      Issue #3529219: Replace JSON:API Schema dependency with Open API JSON:...
    • balsama committed e27bcc60 on 2.0.x
      Issue #3529219: Replace JSON:API Schema dependency with Open API JSON:...
  • 🇺🇸United States balsama boston
  • Now that this issue is closed, please review the contribution record.

    As a contributor, attribute any organization helped you, or if you volunteered your own time.

    Maintainers, please credit people who helped resolve this issue.

Production build 0.71.5 2024