From de218166c9bfe93b9ad1496bf4d033df04239c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Wed, 31 Jan 2024 12:59:01 +0100 Subject: [PATCH] Schemas update from Showroom-bo 1.1.0 --- public/schemas/brand.schema.json | 36 +++++++++++++++++++++-- public/schemas/product.schema.json | 41 +++++++++++++++++++++++++-- public/schemas/range.schema.json | 37 ++++++++++++++++++++++-- public/schemas/settings.schema.json | 44 +++++++++++++++++++++-------- 4 files changed, 140 insertions(+), 18 deletions(-) diff --git a/public/schemas/brand.schema.json b/public/schemas/brand.schema.json index b96f04f..28a747b 100644 --- a/public/schemas/brand.schema.json +++ b/public/schemas/brand.schema.json @@ -11,16 +11,46 @@ }, "name": { "description": "Nom de la marque", - "type": "object" + "type": "object", + "properties": { + "fr": { + "type": "string", + "minLength": 2, + "maxLength": 60 + } + }, + "additionalProperties": { + "type": "string", + "minLength": 2, + "maxLength": 60 + } }, "slug": { "description": "Slug de la marque", - "type": "object" + "type": "object", + "properties": { + "fr": { + "type": "string", + "maxLength": 255 + } + }, + "additionalProperties": { + "type": "string", + "maxLength": 255 + } }, "color": { "description": "Couleur de la marque", "$ref": "#/$defs/hexcolor" }, + "shelf": { + "description": "Les enfant sont rendus sur un étagere.", + "type": "boolean" + }, + "status": { + "description": "Visible ? (présent dans l'export).", + "type": "boolean" + }, "picture": { "description": "Logo de la marque, chemin tel que présent dans le zip", "type": "string" @@ -52,6 +82,8 @@ "name", "slug", "color", + "shelf", + "status", "picture", "created_at", "updated_at", diff --git a/public/schemas/product.schema.json b/public/schemas/product.schema.json index 77022f3..ae0f733 100644 --- a/public/schemas/product.schema.json +++ b/public/schemas/product.schema.json @@ -11,20 +11,54 @@ }, "name": { "description": "Nom du produit", - "type": "object" + "type": "object", + "properties": { + "fr": { + "type": "string", + "minLength": 2, + "maxLength": 130 + } + }, + "additionalProperties": { + "type": "string", + "minLength": 2, + "maxLength": 130 + } }, "slug": { "description": "Slug du produit", - "type": "object" + "type": "object", + "properties": { + "fr": { + "type": "string", + "maxLength": 255 + } + }, + "additionalProperties": { + "type": "string", + "maxLength": 255 + } }, "description": { "description": "Description du produit, texte WYSYWYG", - "type": "object" + "type": "object", + "properties": { + "fr": { + "type": "string" + } + }, + "additionalProperties": { + "type": "string" + } }, "picture": { "description": "Logo du produit, chemin tel que présent dans le zip", "type": "string" }, + "status": { + "description": "Visible ? (présent dans l'export).", + "type": "boolean" + }, "range_id": { "description": "Clé étrangère de la gamme", "type": "integer", @@ -45,6 +79,7 @@ "slug", "description", "picture", + "status", "range_id", "created_at", "updated_at" diff --git a/public/schemas/range.schema.json b/public/schemas/range.schema.json index f49837e..1c56ccb 100644 --- a/public/schemas/range.schema.json +++ b/public/schemas/range.schema.json @@ -11,11 +11,33 @@ }, "name": { "description": "Nom de la gamme", - "type": "object" + "type": "object", + "properties": { + "fr": { + "type": "string", + "minLength": 2, + "maxLength": 90 + } + }, + "additionalProperties": { + "type": "string", + "minLength": 2, + "maxLength": 90 + } }, "slug": { "description": "Slug de la gamme", - "type": "object" + "type": "object", + "properties": { + "fr": { + "type": "string", + "maxLength": 255 + } + }, + "additionalProperties": { + "type": "string", + "maxLength": 255 + } }, "picture": { "description": "Logo de la gamme, chemin tel que présent dans le zip", @@ -36,6 +58,14 @@ "type": "integer", "minimum": 1 }, + "shelf": { + "description": "Les enfant sont rendus sur un étagere.", + "type": "boolean" + }, + "status": { + "description": "Visible ? (présent dans l'export).", + "type": "boolean" + }, "brand_id": { "description": "Clé étrangère de la marque", "type": "integer", @@ -73,6 +103,9 @@ "name", "slug", "picture", + "order", + "shelf", + "status", "brand_id", "font_id", "created_at", diff --git a/public/schemas/settings.schema.json b/public/schemas/settings.schema.json index f5abaa6..eaf75cc 100644 --- a/public/schemas/settings.schema.json +++ b/public/schemas/settings.schema.json @@ -4,9 +4,37 @@ "description": "Settings from Showroom Bo", "type": "object", "properties": { - "title": { - "description": "Titre de l'application", - "type": "string" + "sub_title": { + "description": "Sous-titre de l'application", + "type": "object", + "properties": { + "fr": { + "type": "string", + "minLength": 2, + "maxLength": 110 + } + }, + "additionalProperties": { + "type": "string", + "minLength": 2, + "maxLength": 110 + } + }, + "footer_phrase": { + "description": "Texte en bas de page", + "type": "object", + "properties": { + "fr": { + "type": "string", + "minLength": 2, + "maxLength": 110 + } + }, + "additionalProperties": { + "type": "string", + "minLength": 2, + "maxLength": 110 + } }, "logo": { "description": "Logo de l'application, chemin tel que présent dans le zip", @@ -16,12 +44,6 @@ "description": "Couleur de l'application", "$ref": "#/$defs/hexcolor" }, - "items_by_line": { - "description": "Éléments par ligne", - "type": "integer", - "minimum": 3, - "maximum": 6 - }, "home_timeout": { "description": "Temps en secondes avant retour sur la page home lorsque inactif", "type": "integer", @@ -37,10 +59,10 @@ } }, "required": [ - "title", + "sub_title", + "footer_phrase", "logo", "color", - "items_by_line", "home_timeout" ] }