|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "title": "AddonCatalog", |
| 4 | + "description": "A catalog of addons indexed by addon ID. Each ID maps to a list of AddonCatalogEntry objects.", |
| 5 | + "type": "object", |
| 6 | + "patternProperties": { |
| 7 | + "^.+$": { |
| 8 | + "type": "array", |
| 9 | + "items": { |
| 10 | + "type": "object", |
| 11 | + "properties": { |
| 12 | + "freecad_min": { |
| 13 | + "type": "string", |
| 14 | + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-[\\da-zA-Z\\-.]+)?(?:\\+[\\da-zA-Z\\-.]+)?$", |
| 15 | + "description": "Minimum compatible FreeCAD version (inclusive, Semantic Versioning)" |
| 16 | + }, |
| 17 | + "freecad_max": { |
| 18 | + "type": "string", |
| 19 | + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-[\\da-zA-Z\\-.]+)?(?:\\+[\\da-zA-Z\\-.]+)?$", |
| 20 | + "description": "Maximum compatible FreeCAD version (inclusive, Semantic Versioning)" |
| 21 | + }, |
| 22 | + "repository": { |
| 23 | + "type": "string", |
| 24 | + "format": "uri", |
| 25 | + "description": "Git repository URL" |
| 26 | + }, |
| 27 | + "git_ref": { |
| 28 | + "type": "string", |
| 29 | + "description": "Git reference (e.g. SHA, branch, or tag)" |
| 30 | + }, |
| 31 | + "zip_url": { |
| 32 | + "type": "string", |
| 33 | + "format": "uri", |
| 34 | + "description": "Direct download link for a .zip file. If git information is also present, this should correspond to a ZIP download link that will result in the same code as a checkout of the given git repo and ref." |
| 35 | + }, |
| 36 | + "note": { |
| 37 | + "type": "string", |
| 38 | + "description": "Notes about this addon version. Not displayed, only for reference in the JSON catalog file." |
| 39 | + }, |
| 40 | + "branch_display_name": { |
| 41 | + "type": "string", |
| 42 | + "description": "Display name for the addon version branch. If omitted, the git ref is used." |
| 43 | + } |
| 44 | + }, |
| 45 | + "anyOf": [ |
| 46 | + { |
| 47 | + "required": ["repository", "git_ref"] |
| 48 | + }, |
| 49 | + { |
| 50 | + "required": ["zip_url"] |
| 51 | + } |
| 52 | + ], |
| 53 | + "if": { |
| 54 | + "not": { |
| 55 | + "required": ["git_ref"] |
| 56 | + } |
| 57 | + }, |
| 58 | + "then": { |
| 59 | + "required": ["branch_display_name"] |
| 60 | + }, |
| 61 | + "additionalProperties": false |
| 62 | + } |
| 63 | + } |
| 64 | + }, |
| 65 | + "additionalProperties": false |
| 66 | +} |
0 commit comments