Problem/Motivation
In #3529219-15: Replace JSON:API Schema dependency with Open API JSON:API module, @ankitv18 discovered a couple of issues. They have not yet been validated. This issue is just to decouple them. I'm copying the original report here verbatim:
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).
![]()
Issue fork jsonapi_query_builder-3545512
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:

Comments
Comment #2
traviscarden commentedNote: I have asked @ankitv18 to leave a comment just so the issue credit system knows he contributed.
Comment #4
ankitv18 commentedThanks @traviscarden,
I'll validate again with 2.0.x-dev branch to check whether this issue still there.
Comment #5
ankitv18 commentedComment #6
traviscarden commented@ankitv18 I have confirmed that the bug(s) persist on 2.0.x-dev. And there are actually quite a few fields in addition to the ones you listed that cause the same or similar errors. We'll have to investigate whether they all have a common cause or not.
Comment #8
traviscarden commentedThe problem in both cases was that the "Sort" dropdown was showing invalid options, i.e., options that shouldn't have been in the list to begin with because the endpoint doesn't actually support them. This MR prevents that from happening anymore.
Comment #9
ankitv18 commentedComment #10
balsamaThanks! Thoroughly tested locally.
Comment #12
balsamaComment #14
traviscarden commented