-
Notifications
You must be signed in to change notification settings - Fork 9.4k
2.3 only - creating attribute option value using API returns unexpected response #18392 #19108
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
2.3 only - creating attribute option value using API returns unexpected response #18392 #19108
Conversation
Hi @Nazar65. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @VladimirZaets, thank you for the review. |
…attribute-option-value
\Magento\Eav\Model\ResourceModel\Entity\Attribute $resourceModel | ||
AttributeRepository $attributeRepository, | ||
Attribute $resourceModel, | ||
GetAttributeOptionId $getAttributeOptionId |
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.
Please, inject new dependencies according to our Backward Compatible Development Guide
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.
ok
Hi @sidolov all done. |
@@ -14,6 +14,7 @@ | |||
use Magento\Framework\Exception\InputException; | |||
use Magento\Framework\Exception\NoSuchEntityException; | |||
use Magento\Framework\Exception\StateException; | |||
use \Magento\Framework\App\ObjectManager; |
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.
The first \
can be removed here so it's consistent with the use statements above it.
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.
@hostep Thanks for some reason I did not see it right away
remove "\" from use Object Manager
Hi @Nazar65, thank you for your contribution! |
Description (*)
Return value should be the ID of the new option
Fixed Issues (if relevant)
Manual testing scenarios (*)
curl -k -X POST "https://domain.tld/rest/all/V1/products/attributes/dropdown/options" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer abcd" -d "{ \"option\": { \"label\": \"whatever\" }}
Contribution checklist (*)