-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[Backport] REST API - Attribute option creation -> no ID returned #20201
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
[Backport] REST API - Attribute option creation -> no ID returned #20201
Conversation
Hi @milindsingh. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Isn't this considered a backwards incompatible change? The API response changes in a patch version, existing API implementations might not expect this to happen. And won't this PR cause the API to return |
@hostep Kindly check #6300 (comment) |
Thanks @milindsingh, I don't really agree with @mbrinton01, so let's include him in here. @mbrinton01: can you check out #18392 (full history can be found in #12920) and also my question above regarding backwards compatibility? Thanks! |
@hostep Can you please confirm about 2 things ?
|
@milindsingh: I'm not a Magento employee, so I can't confirm any of these things, sorry! :) Might be best to wait until someone from the maintainers or Magento has replied here to see where this needs to go. |
@milindsingh did you check my PR ? #18392 |
Adding @paliarush for help on backwards compatibility API policy. Alex, do we have strict guidelines on backwards compatibility for API responses? |
Hi @aleron75, thank you for the review. |
@aleron75: why is this approved, it makes no sense? Have you read through #12920 (comment) or #18392 ? I think we need to wait until #19108 is approved before any of this can be backported to 2.2 (if that is even allowed by backwards compatible rules for API responses, which we don't know about yet...) |
Hi @milindsingh @aleron75 unfortunately we cannot allow backporting such API changes to 2.2. I have to close this pull request according to above. Feel free to contanct me in case of any comments or questions See Code Contributions Guide for more information. |
Hi @milindsingh, thank you for your contribution! |
Original Pull Request
#12920
Set option_id in value field to attributeoptioninterface return type
Description
I have changed return type of add function and set value to option. So when we do REST or SOAP api then it will return option_id in 'value' field to attributeoptioninterface return type.
Fixed Issues (if relevant)
Manual testing scenarios
POST /rest/default/V1/products/attributes/manufacturer/options
with following Body:
{ "option": { "label": "Manufacturer 1" } }
Contribution checklist