Closed tobbe-j closed 1 year ago
It will require some changes in the managers to handle that correctly but it should be possible. We will try to implement the necessary changes in 2022.x
Nice, sounds good and looking forward to the possible improvements!
Is it ok to leave the issue open until there is any development on it or should I close it?
Yes, please
Finally, the necessary changes have been done and it's now possible to use domain specific nested resources according to the JSON:API specifiction, e.g. include=product.text,product.media,supplier,supplier.address
Would it be possible to allow including nested resources as defined in the jsonapi specification.
For example, when having a single product page where we would also want to display some information about the supplier, it's currently only possible to include the supplier resource
/jsonapi/default/product?id=1&include=supplier
. However, we would also probably want to show the supplier image and description which currenlty requires a new (and dependent) request/jsonapi/default/supplier?id=<id from previous request>&include=text,media
.The jsonapi spec allows nested includes, which would mean that this scenario could be solved via
/jsonapi/default/product?id=1&include=supplier,supplier.text,supplier.media
. This would greatly simplify a lot of data fetching when using the api.Although I'm not too familiar with the aimeos codebase yet it seems like this should be possible to implement in the aimeos data architechture, simply iterating over the different domains that need to be included and searching for the related resources.