[API][Address] Update mapping

This commit is contained in:
Jan Goralski 2022-11-25 12:33:18 +01:00
parent 6ae227a129
commit c2f83dcffa
No known key found for this signature in database
GPG key ID: 95D91BA380F31EDD
2 changed files with 9 additions and 1 deletions

View file

@ -26,9 +26,12 @@
<collectionOperation name="shop_post">
<attribute name="method">POST</attribute>
<attribute name="path">/shop/addresses</attribute>
<attribute name="normalization_context">
<attribute name="denormalization_context">
<attribute name="groups">shop:address:create</attribute>
</attribute>
<attribute name="normalization_context">
<attribute name="groups">shop:address:read</attribute>
</attribute>
</collectionOperation>
</collectionOperations>
@ -62,6 +65,9 @@
<attribute name="denormalization_context">
<attribute name="groups">shop:address:update</attribute>
</attribute>
<attribute name="normalization_context">
<attribute name="groups">shop:address:read</attribute>
</attribute>
</itemOperation>
</itemOperations>
@ -72,6 +78,7 @@
<property name="street" writable="true" />
<property name="postcode" writable="true" />
<property name="countryCode" writable="true" />
<property name="provinceCode" writable="true" />
<property name="provinceName" writable="true" />
</resource>
</resources>

View file

@ -2,6 +2,7 @@
"@context": "\/api\/v2\/contexts\/Address",
"@id": "\/api\/v2\/shop\/addresses\/@integer@",
"@type": "Address",
"id": "@integer@",
"firstName":"TEST",
"lastName":"TEST",
"phoneNumber":"666111333",