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
[API][ShippingMethod] Add contract test for available shipping methods endpoint #12716
[API][ShippingMethod] Add contract test for available shipping methods endpoint #12716
Conversation
GSadee
commented
Jun 17, 2021
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Related tickets | based on #12713 |
License | MIT |
120da15
to
55fa3c8
Compare
5193a32
to
d17f037
Compare
src/Sylius/Bundle/ApiBundle/Serializer/ShippingMethodNormalizer.php
Outdated
Show resolved
Hide resolved
d17f037
to
bffc4c6
Compare
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.
src/Sylius/Bundle/ApiBundle/spec/Serializer/ShippingMethodNormalizerSpec.php
Outdated
Show resolved
Hide resolved
bffc4c6
to
6ef6761
Compare
@SirDomin these files are not empty, just no changes were made to them except the filename |
; | ||
} | ||
|
||
private function isNotAdminGetOperation(array $context): bool |
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 second normalizer where we use such a function, maybe it would worth to extract it into some separate service in the future 🖖 💃
45978e5
to
f979c4d
Compare
f979c4d
to
dedad00
Compare
Thank you, Grzegorz! 🥇 |
{ | ||
"@id": "\/api\/v2\/shop\/shipping-methods\/UPS", | ||
"@type": "ShippingMethod", | ||
"id": @integer@, |
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.
"id": @integer@, | |
"id": "@integer@", |
From the matcher's point of view, such a notation would be equal to the current one. The change is, that GitHub nor phpstorm would complain about invalid json shema. On the other hand, it would look like there is a string at the integer field... Just a proposal. It is worth it to put all matchers into "
, but I would love to hear your opinion about it as well