243 lines
4.6 KiB
JSON
243 lines
4.6 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://git.ddr4.net/dragon757/RoundCount-Catalog/raw/branch/main/schema/product.schema.json",
|
|
"title": "RoundCount Ammunition Product",
|
|
"description": "Schema for an ammunition product in the RoundCount Catalog.",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"catalog_version",
|
|
"record_uuid",
|
|
"manufacturer",
|
|
"product_name",
|
|
"caliber",
|
|
"status",
|
|
"last_updated"
|
|
],
|
|
"properties": {
|
|
"catalog_version": {
|
|
"type": "integer",
|
|
"const": 1
|
|
},
|
|
"record_uuid": {
|
|
"type": "string",
|
|
"format": "uuid"
|
|
},
|
|
"upc": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"pattern": "^[0-9]{8,14}$"
|
|
},
|
|
"sku": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"maxLength": 100
|
|
},
|
|
"manufacturer": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 150
|
|
},
|
|
"brand": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"maxLength": 150
|
|
},
|
|
"product_name": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 200
|
|
},
|
|
"caliber": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 100
|
|
},
|
|
"bullet": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"weight_gr": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
],
|
|
"minimum": 0
|
|
},
|
|
"type": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"maxLength": 100
|
|
},
|
|
"material": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"maxLength": 100
|
|
}
|
|
}
|
|
},
|
|
"case": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"material": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"maxLength": 100
|
|
},
|
|
"reloadable": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"primer": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"maxLength": 100
|
|
},
|
|
"sealed": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"package": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"rounds_per_box": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"minimum": 1
|
|
},
|
|
"boxes_per_case": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"minimum": 1
|
|
}
|
|
}
|
|
},
|
|
"ballistics": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"muzzle_velocity_fps": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"minimum": 0
|
|
},
|
|
"muzzle_energy_ft_lbs": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"minimum": 0
|
|
},
|
|
"test_barrel_length_in": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
],
|
|
"minimum": 0
|
|
}
|
|
}
|
|
},
|
|
"image": {
|
|
"type": [
|
|
"object",
|
|
"null"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"path": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"sha256": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"pattern": "^[a-fA-F0-9]{64}$"
|
|
}
|
|
}
|
|
},
|
|
"sources": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"url",
|
|
"type",
|
|
"verified_at"
|
|
],
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"manufacturer",
|
|
"distributor",
|
|
"retailer",
|
|
"packaging",
|
|
"other"
|
|
]
|
|
},
|
|
"verified_at": {
|
|
"type": "string",
|
|
"format": "date"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"draft",
|
|
"unverified",
|
|
"verified",
|
|
"discontinued",
|
|
"duplicate"
|
|
]
|
|
},
|
|
"last_updated": {
|
|
"type": "string",
|
|
"format": "date"
|
|
}
|
|
}
|
|
} |