-
-
Notifications
You must be signed in to change notification settings - Fork 127
feat(model): add method wrapper to define the api response wrapper / overrides #281
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(model): add method wrapper to define the api response wrapper / overrides #281
Conversation
…avel's resource data wrapping. This is a shortcut for , , , that allows you to not only automatically unwrap using the standard first, find, get, all methods but also change what the wrapper key is in case you don't want to use the standard 'data' property
…ssion that prevents exported objects from merging with plain objects.
1ad80d5 to
602a787
Compare
…ssion that prevents exported objects from merging with plain objects. Also include package-lock.json for npm users
package-lock.json
Outdated
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.
This file should be excluded from the commit
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.
This file should be excluded from the commit
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.
Resolved. yarn.lock has been removed and also added to the .gitignore so it doesn't happen again.
…the data wrapper for the request
|
I updated this PR to also include |
|
@robsontenorio Who should be the reviewer of this PR? |
|
Hi guys, sorry for the delay. I've been very busy lately. I'll review the PR. @JRogaishio thank you for the PR! :) |
|
@JRogaishio On sidebar you need to allow edit/commits by maintainers. So @JoaoPedroAS51 can go ahead with this. |
|
@robsontenorio I don't think I can give maintainer access to my fork / pr since it's on an organization and not user owned. The option just doesn't exist on the PR (see below screenshot). I did however resolve the merge conflicts and brought yarn.lock back since it appears you're using it. Docs I'm trying to follow:
|
|
Hi @JRogaishio! Thank you for fixing the conflict! Yeah, we only save the |
|
@JoaoPedroAS51 You're welcome. Also the .gitignore has been reverted back to the robsontenorio/dev version so it should be all set now. |
|
Hi guys, sorry for not releasing it yet. It seems that the release action failed, I'll try to take a look over the weekend. |


Checklist
Changes:
$first,$find,$get, and$allobsolete but I kept them for backward compatibility. The the overloadablewrap()allows you to automatically unwrap using the standardfirst,find,get,allmethods but also change what the wrapper key is in case you don't want to use the standard 'data' propertywrap()typewrappedBy(wrap)andnowrap()builder methods to change / disable wrappingwrap()typewrappedBy()andnowrap()methods