mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
[API] [Product] Add path to default serialization
This commit is contained in:
parent
bbae298a97
commit
8915e056d1
6 changed files with 28 additions and 17 deletions
|
|
@ -14,7 +14,7 @@ Sylius\Component\Core\Model\Image:
|
|||
path:
|
||||
expose: true
|
||||
type: string
|
||||
groups: [Detailed]
|
||||
groups: [Default, Detailed]
|
||||
owner:
|
||||
expose: true
|
||||
groups: [Detailed]
|
||||
|
|
|
|||
|
|
@ -1,16 +1,3 @@
|
|||
Sylius\Component\Core\Model\ProductImage:
|
||||
exclusion_policy: ALL
|
||||
xml_root_name: product-image
|
||||
properties:
|
||||
id:
|
||||
expose: true
|
||||
type: integer
|
||||
xml_attribute: true
|
||||
groups: [Default, Detailed]
|
||||
type:
|
||||
expose: true
|
||||
type: string
|
||||
groups: [Default, Detailed]
|
||||
owner:
|
||||
expose: true
|
||||
groups: [Detailed]
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ Sylius\Component\Core\Model\Product:
|
|||
fallbackLocale: 'en_US'
|
||||
currentLocale: 'en_US'
|
||||
code: 'MUG_SW'
|
||||
images: ["@product_thumbnail"]
|
||||
translations:
|
||||
- "@productTranslation1"
|
||||
- "@productTranslation2"
|
||||
|
|
@ -42,3 +43,8 @@ Sylius\Component\Core\Model\Product:
|
|||
slug: 'mug-breaking-bad'
|
||||
name: 'Breaking bad mug'
|
||||
description: <paragraph(2)>
|
||||
|
||||
Sylius\Component\Core\Model\ProductImage:
|
||||
product_thumbnail:
|
||||
type: "thumbnail"
|
||||
path: "/uo/product.jpg"
|
||||
|
|
|
|||
|
|
@ -51,7 +51,13 @@
|
|||
"code": "MUG_SW",
|
||||
"options": [],
|
||||
"averageRating": 0,
|
||||
"images": [],
|
||||
"images": [
|
||||
{
|
||||
"id": @integer@,
|
||||
"type": "thumbnail",
|
||||
"path": "\/uo\/product.jpg"
|
||||
}
|
||||
],
|
||||
"_links": {
|
||||
"self": {
|
||||
"href": "\/api\/v1\/products\/MUG_SW"
|
||||
|
|
|
|||
|
|
@ -25,7 +25,13 @@
|
|||
"channels": [],
|
||||
"reviews": [],
|
||||
"averageRating": 0,
|
||||
"images": [],
|
||||
"images": [
|
||||
{
|
||||
"id": @integer@,
|
||||
"type": "thumbnail",
|
||||
"path": "\/uo\/product.jpg"
|
||||
}
|
||||
],
|
||||
"_links": {
|
||||
"self": {
|
||||
"href": "\/api\/v1\/products\/MUG_SW"
|
||||
|
|
|
|||
|
|
@ -51,7 +51,13 @@
|
|||
"code": "MUG_SW",
|
||||
"options": [],
|
||||
"averageRating": 0,
|
||||
"images": [],
|
||||
"images": [
|
||||
{
|
||||
"id": @integer@,
|
||||
"type": "thumbnail",
|
||||
"path": "\/uo\/product.jpg"
|
||||
}
|
||||
],
|
||||
"_links": {
|
||||
"self": {
|
||||
"href": "\/api\/v1\/products\/MUG_SW"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue