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
Fix webapi returns variables in JSON using snake case and I need came… #31001
base: 2.4-develop
Are you sure you want to change the base?
Conversation
Hi @jayankaghosh. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
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 @jayankaghosh,
In general your changes looks good to me.
Could you make the new method to be private (due to backward compatibility reasons) and cover your changes with any type of automated tests?
lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Ihor Sviziev <ihor-sviziev@users.noreply.github.com>
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 @jayankaghosh ,
Now the changes looks good to me. Could you cover your changes with some kind of automated test?
Hi @ihor-sviziev I am not affiliated with this PR in any way |
@aredridel , I just pressed wrong nick from the autocomplete. Sorry for disturbing you |
@magento run all tests |
@ihor-sviziev I'm not sure how to proceed with writing the tests for this. Some help would be appreciated |
Hi @engcom-Bravo @engcom-Charlie @engcom-Delta could you help with cover thing this PR with automated tests? |
Maybe @engcom-Hotel @sdzhepa could help? |
@ihor-sviziev Guess they've abandoned us 😛 |
Hello @ihor-sviziev @jayankaghosh Sorry for the late response. Let me please clarify the situation. |
Can this solution be used? Perhaps with an override/plugin? |
@sdzhepa When can I expect an update on this? |
Add this in werbapi_rest\di.xml:
This way you can name your vars as you please. |
Description (*)
Added objectKeyMap which accepts parameters from di.xml to modify data object keys
We can now modify the keys of any accessor on any class used in the rendering of the REST API, using the following (or similar) snippet in the
di.xml
of thewebapi_rest
directory.Fixed Issues (if relevant)
Manual testing scenarios (*)
di.xml
insidewebapi_rest
directory of any module and inject object key names to it, similar to the followingContribution checklist (*)