Skip to content

Commit 1cfa0a4

Browse files
committed
👔 Add validations to category standard format
1 parent 1ba7dcb commit 1cfa0a4

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

content/swagger/akeneo-web-api.json

+1-1
Large diffs are not rendered by default.

content/swagger/resources/categories/definitions/category_update.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,21 @@ properties:
4747
attribute_code:
4848
type: string
4949
description: The attribute code.
50+
validations:
51+
type: object
52+
description: Category validations
53+
x-validation-rules: Only applicable to root category
54+
default: {}
55+
properties:
56+
max_categories_per_product:
57+
type: string
58+
description: Set maximum number of categories per product
59+
only_leaves:
60+
type: string
61+
description: Restrict categorization to the lowest level
62+
is_mandatory:
63+
type: string
64+
description: Set category as mandatory for every product
5065
example:
5166
{
5267
"code": "winter_collection",
@@ -76,4 +91,9 @@ example:
7691
"attribute_code": "an_image_attribute",
7792
},
7893
],
94+
"validations": {
95+
"max_categories_per_product": 42,
96+
"only_leaves": false,
97+
"is_mandatory": true
98+
}
7999
}

0 commit comments

Comments
 (0)