You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/schemas/category.json
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -14,18 +14,23 @@
14
14
"type": "string",
15
15
"title": "Slug",
16
16
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
17
-
"description": "URL-friendly identifier in kebab-case"
17
+
"description": "URL-friendly identifier in kebab-case. Should be unique per parent (parentId + slug enforced at the DB layer)."
18
18
},
19
19
"name": {
20
20
"type": "string",
21
21
"title": "Category Name",
22
-
"description": "The name of the category."
22
+
"description": "The name of the category. Should be unique per parent alongside slug (enforced at the DB layer)."
23
+
},
24
+
"description": {
25
+
"type": ["string", "null"],
26
+
"title": "Description",
27
+
"description": "Optional description for the category."
23
28
},
24
29
"parentId": {
25
30
"type": ["string", "null"],
26
31
"title": "Parent Category ID",
27
32
"format": "uuid",
28
-
"description": "The identifier of the parent category, if any. Null if the category is top-level."
33
+
"description": "The identifier of the parent category, if any. Null if the category is top-level. Parents must be top-level (no deeper than two levels; enforced outside JSON Schema)."
0 commit comments