ldc-showroom/schemas/brand.schema.json

60 lines
1.4 KiB
JSON

{
"$id": "schemas/brand.schema.json",
"title": "Brand",
"description": "A brand from Showroom Bo",
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for a product",
"type": "integer",
"minimum": 1
},
"name": {
"description": "Nom de la marque",
"type": "string"
},
"slug": {
"description": "Slug de la marque",
"type": "string"
},
"color": {
"description": "Couleur de la marque",
"$ref": "#/$defs/hexcolor"
},
"picture": {
"description": "Logo de la marque, chemin tel que présent dans le zip",
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"ranges": {
"type": "array",
"items": {
"$ref": "range.schema.json"
}
}
},
"$defs": {
"hexcolor": {
"description": "HEX color",
"pattern": "^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$",
"type": "string"
}
},
"required": [
"id",
"name",
"slug",
"color",
"picture",
"created_at",
"updated_at",
"ranges"
]
}