-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'creme332:main' into nestedcomments
- Loading branch information
Showing
28 changed files
with
945 additions
and
376 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"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" } | ||
}, | ||
"required": ["comment_id", "text", "created_date", "user_id"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Product", | ||
"description": "Schema for a product object", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the product", | ||
"minLength": 3, | ||
"maxLength": 255 | ||
}, | ||
"calories": { | ||
"type": "integer", | ||
"description": "The number of calories in the product", | ||
"minimum": 0 | ||
}, | ||
"img_url": { | ||
"type": "string", | ||
"format": "uri", | ||
"description": "The URL of the product image" | ||
}, | ||
"img_alt_text": { | ||
"type": "string", | ||
"description": "The alternate text for the product image", | ||
"minLength": 5, | ||
"maxLength": 150 | ||
}, | ||
"category": { | ||
"type": "string", | ||
"description": "The category of the product", | ||
"minLength": 3, | ||
"maxLength": 50 | ||
}, | ||
"price": { | ||
"type": "number", | ||
"description": "The price of the product", | ||
"minimum": 0 | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "Description of the product", | ||
"minLength": 1 | ||
}, | ||
"created_date": { | ||
"type": "string", | ||
"format": "date-time", | ||
"description": "The date and time when the product was created" | ||
} | ||
}, | ||
"required": ["name", "calories", "img_url", "img_alt_text", "category", "price", "description", "created_date"], | ||
"additionalProperties": false, | ||
"patternProperties": { | ||
"img_url": { | ||
"pattern": "^.+\\.(png|jpeg|avif|jpg|webp)$", | ||
"description": "The URL should end with one of the supported image formats: png, jpeg, avif, jpg, webp" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"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" } | ||
}, | ||
"required": ["review_id", "rating", "created_date", "text", "client_id", "product_id"] | ||
} |
Oops, something went wrong.