feat: Header to render only specific bones in the json renderer - #1376
Closed
ArneGudermann wants to merge 3 commits into
Closed
ArneGudermann wants to merge 3 commits into
ArneGudermann wants to merge 3 commits into
Conversation
akelch
approved these changes
Jan 23, 2025
phorward
requested changes
Jan 23, 2025
phorward
left a comment
Member
There was a problem hiding this comment.
So my suggestion would be the following:
- Evaluate an
x-viur-bonelistin the viewSkel and create a dynamic SubSkel based on it - The SubSkel is then integrated into the normal process in ViUR, data is retrieved with it and it only ever affects the bones that are in the subskel
- Nothing has to be adapted to any renderers
- If this works well, it could be extended to the BaseBone() as a general option.
Dynamic SubSkels are only available from viur-core 3.7 and I'm not patching that down to 3.6.
phorward
added a commit
to phorward/viur-core
that referenced
this pull request
Jan 23, 2025
- Introduces generic `SkelModule.skel()` function to obtain a skeleton instance. - Modifies all prototypes to accept `bones_from_request` Replacement for viur-framework#1376
Member
|
I am completely on @phorward's side. A renderer should transform data into a desired format. But it should not apply any logic to this data, except that which concerns the output format. Reducing or expanding the data does not belong in there, but in the module. |
phorward
added a commit
to phorward/viur-core
that referenced
this pull request
Feb 3, 2025
- Introduces generic `SkelModule.skel()` function to obtain a skeleton instance. - Modifies all prototypes to accept `bones_from_request` Replacement for viur-framework#1376
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a check for a Header Field
x-viur-bonelist. The names of the bones to be rendered can be entered in this field.