- Issue created by @capysara
- 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
The case is that there are no or only very few benefits to making it configurable. This GET parameter (docs) controls how much detailed data the API should include in its response regarding the given asset. As the module utilizes its own HTTP Client responsible for sending most of the external requests, and each API endpoint has a dedicated method to call. Nowhere else within the entire codebase of the module does this
expand
GET parameter have an effect. Therefore, I tend to suggest rather simply deleting these@todo
comments and leaving thisexpand
parameter the most optimized for each endpoint as possible. - First commit to issue fork.
- 🇮🇳India rajeshreeputra Pune
rajeshreeputra → changed the visibility of the branch 3392969-asset-type-display to hidden.
- Merge request !181Resolve #3392969 "Fix: Remove todo for expand parameters in the Client class." → (Open) created by rajeshreeputra
- 🇮🇳India rajeshreeputra Pune
I've implemented the solution suggested by @baluertl in comment #3 ✨ Make expand parameters in getAsset configurable so users can select what information is requested Active . After reviewing the codebase, making the expand parameters configurable would provide minimal benefit since:
- The expand parameter is only used in
getAsset()
methods where the detailed data is actually needed. - Each API endpoint has its own dedicated method with optimized or no parameters.
- Making it configurable would add unnecessary complexity without significant value.
The changes in MR !181 include:
- Removed the @todo comment from the $expand property documentation, as keeping it hardcoded is the preferred approach.
- Removed unnecessary expand parameter from the getAssetVersions() method call, as version endpoints don't require the same expanded data as asset detail endpoints.
This keeps the expand parameters optimized for get asset data endpoint while cleaning up the outdated todo comments. The current implementation is already efficient and doesn't require user configuration.
- The expand parameter is only used in