-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix #24681 Support camelCase webapi #39237
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
base: 2.4-develop
Are you sure you want to change the base?
Fix #24681 Support camelCase webapi #39237
Conversation
Hi @tuyennn. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
@magento run all tests |
@magento run all tests |
@ihor-sviziev @sdzhepa does it look good? |
Hi @tuyennn @jayankaghosh @csdougliss, I reviewed your changes—they look good. However, I'm not sure if it is worth accepting these changes to Magento core since they will slightly slow down all API requests for everyone and have quite limited usage of this feature. |
@ihor-sviziev this is definitely used for specific projects. I'm not really sure if this might hit any performance issue incase we don't define any mapping object. Well a patch was created for years, and I believe it's not a problem if this wouldn't be accepted. |
@magento run all tests |
@magento run all tests |
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.Related Pull Requests
Add test cases version of #31001 thanks to jayankaghosh
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 followingQuestions or comments
Contribution checklist (*)