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
Add "enabled" property to API serialization #12781
Add "enabled" property to API serialization #12781
Conversation
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.
absolutely useful, but we should add at least contract test for it
tests to extend can be found here: https://github.com/Sylius/Sylius/blob/1.13/tests/Api/Admin/ProductVariantsTest.php. This flag needs to be set in fixtures and exposed in json samples. Such tests have to be done for each resource that is tackled here. What is more, rebase is needed |
39c31f4
to
429c6b0
Compare
@lchrusciel updated 😊 |
Hi @Nek-! |
429c6b0
to
729a617
Compare
@jakubtobiasz done! |
Hi @Nek-! |
b324640
to
a9e20ef
Compare
@jakubtobiasz Sorry for the delay, it should be fine now. |
src/Sylius/Bundle/ApiBundle/Resources/config/serialization/ProductVariant.xml
Show resolved
Hide resolved
Knowing if an item is enable or not is a critical information while querying the API in admin mode. This feature ("enabled") has been introduced in Sylius 1.8 and is exposed thanks to this commit.
a9e20ef
to
53621c9
Compare
Thank you, @Nek-! |
This is a suggestion/feature. But it really makes sense to expose if an item is enabled or not in admin serialization, it's actually a piece of super-critical information for admin data results.
Sorry for the noise of fixing also copyright but my brain was not happy it was not heterogeneous. x) It's split into 2 proper commits if you want to review with ease.
Happy coding guys.