New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V14/feature/response model type info improvements #14962
V14/feature/response model type info improvements #14962
Conversation
…n response models Changed some signatures to return actual responsemodels instead of presentation Added more types to response models that need it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Migaroez 👋
A few comments from my part:
- The new UDI type constants might be somewhat questionable. In general, a UDI type constant should only exist if an entity is uniquely identifiable by said UDI type -- that is, can be queried and/or identified in code (not in human eyes). For example, a document in the recycle bin will still be identified by the
Document
UDI type. - A lot of models need a linebreak between the existing properties and the
Type
property override. - A few changes are exclusively due to added and unused usings. I have noted
FolderResponseModel
andContentTreeItemResponseModel
, there may be others.
Thx @kjac for the critical eye! 2 & 3 have been taken care off. Regarding point one, I had a different approach previously where i proxied the udis as getOnly strings in a static class combined with constant strings for the non udi types and called it |
Responsibility was moved to frontend |
Prerequisites
If there's an existing issue for this PR then this fixes
Description
Added a type property to all ResponseModels that return actionable objects, most of them are entitites.
This helps the frontend to determine what UI they need to show when an intent for manipulation on these items is requested (especially in mixed lists).
Also
Possible improvements
For consistency, we are reusing entityUdi keys for most of the types. But we have to introduce some new values and it might not be the correct place to do so.
Reproduction
All fetch endpoints for the following resources should supply a type key that is the same for all endpoints within that resource