-
Notifications
You must be signed in to change notification settings - Fork 29
feat: mergepatch to support partial update of nested objects #1891
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
feat: mergepatch to support partial update of nested objects #1891
Conversation
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.
I left some comments/questions. Once clarified I will review again.
The warnings about using any
perhaps can be resolved if we use unknown
instead.
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.
I've left one comment, otherwise looks good to me.
I assigned @martin-trajanovski to review also, as he developed datasets v4 controller he knows it better than me.
Thank you Jay! |
Thank you @martin (also for pointing out the utils function). The present |
I think you can move just those two that are more general ones like |
* Provide a consistent context to all job actions The change is most visible in handlebars templates. Before, `{{this}}` would correspond to different objects depending on how the action is called; either a DTO or a Job or even a Dataset. Now these are accessed consistently through top-level fields; thus `{{id}}` becomes `{{job.id}}`, `{{jobParams}}` becomes `{{request.jobParams}}`, etc. This also adds access to environmental variables via `{{env}}`, making it easier to include secrets actions without hard-coding them. Tests and example files should be up-to-date. * Add datasets to the context Datasets get cached in the context, meaning that they only need to be fetched once for all actions.
This reverts commit feb0d6e.
This reverts commit b10cb99.
Description
As discussed in issue #954, this PR implements support for
application/merge-patch+json
type of content on requests to update endpoints. Support is added to the newer V4 endpoints for now.Motivation
easier updates, especially of scientific metadata
Changes:
application/merge-patch+json
content-type supportapplication/json
content-type remainsTests included
Documentation
official documentation info