Skip to content
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

Partial updates #4

Open
eduard93 opened this issue Nov 18, 2019 · 3 comments
Open

Partial updates #4

eduard93 opened this issue Nov 18, 2019 · 3 comments

Comments

@eduard93
Copy link

Currently old RESTForms supports partial object updates.
For example you have a person object: { _id: 1, Name: Alice, Location: London}
You can send a PUT request { _id:1, Location: Wonderland} and it would update the object to:
{ _id: 1, Name: Alice, Location: Wonderland}.

Note that the Name stayed the same (so it's not NULL).

@eduard93
Copy link
Author

Validate that new RESTForms supports this workflow

@isc-afuentes
Copy link

%JSONImport() method allows importing data using different mappings.

  • A user could define different mappings to import or export data (e.g. a mapping which considers only a subset of the properties of the object).
  • Pull request Object CRUD using %JSON.Adaptor mappings #8 introduces a first multiple mapping support using class parameters.

However, we should consider if we must use PUT /form/object/:class/:id for a full update, and PATCH /form/object/:class/:id for partial updates.

@eduard93
Copy link
Author

Is there a need for a full update?
I'd say PUT with partial update is enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants