From b14f26f641f260d16541fef4df6c110bd5a62c34 Mon Sep 17 00:00:00 2001 From: creme332 <65414576+creme332@users.noreply.github.com> Date: Sat, 18 May 2024 13:39:00 +0400 Subject: [PATCH] format files --- resources/schema/Administrator.json | 4 ++- resources/schema/Client.json | 6 ++++- resources/schema/Comment.json | 34 ++++++++++++++++++++------ resources/schema/Product.json | 11 ++++++++- resources/schema/Review.json | 38 +++++++++++++++++++++++------ resources/schema/User.json | 8 +++++- 6 files changed, 83 insertions(+), 18 deletions(-) diff --git a/resources/schema/Administrator.json b/resources/schema/Administrator.json index 3cf54e96..c91b4d93 100644 --- a/resources/schema/Administrator.json +++ b/resources/schema/Administrator.json @@ -15,7 +15,9 @@ "type": "boolean" } }, - "required": ["job_title"] + "required": [ + "job_title" + ] } ] } diff --git a/resources/schema/Client.json b/resources/schema/Client.json index 9532fe0d..8b23aae5 100644 --- a/resources/schema/Client.json +++ b/resources/schema/Client.json @@ -20,7 +20,11 @@ "minimum": 1 } }, - "required": ["street", "city", "district_id"] + "required": [ + "street", + "city", + "district_id" + ] } ] } diff --git a/resources/schema/Comment.json b/resources/schema/Comment.json index 155d450f..a6ed716d 100644 --- a/resources/schema/Comment.json +++ b/resources/schema/Comment.json @@ -3,12 +3,32 @@ "title": "Comment", "type": "object", "properties": { - "comment_id": { "type": "integer" }, - "text": { "type": "string", "minLength": 1, "maxLength": 2000 }, - "created_date": { "type": "string", "format": "date-time" }, - "parent_comment_id": { "type": "integer" }, - "user_id": { "type": "integer" }, - "review_id": { "type": "integer" } + "comment_id": { + "type": "integer" + }, + "text": { + "type": "string", + "minLength": 1, + "maxLength": 2000 + }, + "created_date": { + "type": "string", + "format": "date-time" + }, + "parent_comment_id": { + "type": "integer" + }, + "user_id": { + "type": "integer" + }, + "review_id": { + "type": "integer" + } }, - "required": ["comment_id", "text", "created_date", "user_id"] + "required": [ + "comment_id", + "text", + "created_date", + "user_id" + ] } diff --git a/resources/schema/Product.json b/resources/schema/Product.json index d1b0bfde..3c6f3dff 100644 --- a/resources/schema/Product.json +++ b/resources/schema/Product.json @@ -48,7 +48,16 @@ "description": "The date and time when the product was created" } }, - "required": ["name", "calories", "img_url", "img_alt_text", "category", "price", "description", "created_date"], + "required": [ + "name", + "calories", + "img_url", + "img_alt_text", + "category", + "price", + "description", + "created_date" + ], "additionalProperties": false, "patternProperties": { "img_url": { diff --git a/resources/schema/Review.json b/resources/schema/Review.json index c5e2863a..04657aa2 100644 --- a/resources/schema/Review.json +++ b/resources/schema/Review.json @@ -3,12 +3,36 @@ "title": "Review", "type": "object", "properties": { - "review_id": { "type": "integer" }, - "rating": { "type": "integer", "minimum": 1, "maximum": 5 }, - "created_date": { "type": "string", "format": "date-time" }, - "text": { "type": "string", "minLength": 2, "maxLength": 2000 }, - "client_id": { "type": "integer" }, - "product_id": { "type": "integer" } + "review_id": { + "type": "integer" + }, + "rating": { + "type": "integer", + "minimum": 1, + "maximum": 5 + }, + "created_date": { + "type": "string", + "format": "date-time" + }, + "text": { + "type": "string", + "minLength": 2, + "maxLength": 2000 + }, + "client_id": { + "type": "integer" + }, + "product_id": { + "type": "integer" + } }, - "required": ["review_id", "rating", "created_date", "text", "client_id", "product_id"] + "required": [ + "review_id", + "rating", + "created_date", + "text", + "client_id", + "product_id" + ] } diff --git a/resources/schema/User.json b/resources/schema/User.json index 5eef3d3a..b1c3ac74 100644 --- a/resources/schema/User.json +++ b/resources/schema/User.json @@ -29,7 +29,13 @@ "minLength": 3 } }, - "required": ["user_id", "email", "first_name", "password", "phone_no"] + "required": [ + "user_id", + "email", + "first_name", + "password", + "phone_no" + ] } } } \ No newline at end of file