Filter by taxonomy parent using Json api In drupal 8.5 I have a taxonomy term list like this:

Term A (12 items)
  Term 1 (3 items)
  Term 2 (8 items)
  Term 3 (1 items)
Term B (3 items)
  Term 4 (1 items)
  Term 5 (2 items)


I want to use the json api to fetch all data within term B. So I expect a result set of 3 items.
But when I do:

https://www.some-api.com/jsonapi/node/test?
  _format=api_json&amp;
  filter[taxFilter][condition][path]=field_regio&amp;
  filter[taxFilter][condition][operator]=IN&amp;
  filter[taxFilter][condition][value][]=2 (=&gt; id of term B)


I get a response with "data": [], 
This is probably because the term id of these nodes are set to the children (term 4 and 5). 

But isn't drupal supposed to return all nodes in the children of term B?

Otherwise how can I get all nodes in Term A or B?
The term-ID 2 belongs to "Term B", not to "Term 4" or "Term 5". To check if term belongs to Term B you may include the term parent and check if it has id 2:

https://www.some-api.com/jsonapi/node/test?
_format=api_json&amp;
include=field_regio.parent
filter[taxFilter][condition][path]=field_regio.parent&amp;
filter[taxFilter][condition][operator]=IN&amp;
filter[taxFilter][condition][value][]=2 (=&gt; id of term B)


This should work at least for the simple example provided it the question.