microsoft/hve-core
Publicmirrored from https://github.com/microsoft/hve-coreAvailable
scripts/linting/schemas/ai-artifact-config.schema.json
96lines · modecode
| 1 | { |
| 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | "$id": "https://github.com/microsoft/hve-core/schemas/ai-artifact-config.schema.json", |
| 4 | "title": "Footer Configuration Schema", |
| 5 | "description": "Validates footer-with-review.yml and disclaimers.yml config files", |
| 6 | "type": "object", |
| 7 | "definitions": { |
| 8 | "footerConfig": { |
| 9 | "type": "object", |
| 10 | "required": ["version", "footers", "artifact-classification"], |
| 11 | "additionalProperties": false, |
| 12 | "properties": { |
| 13 | "version": { |
| 14 | "type": "string", |
| 15 | "pattern": "^\\d+\\.\\d+$" |
| 16 | }, |
| 17 | "footers": { |
| 18 | "type": "object", |
| 19 | "minProperties": 1, |
| 20 | "additionalProperties": { |
| 21 | "type": "object", |
| 22 | "required": ["id", "label", "text"], |
| 23 | "additionalProperties": false, |
| 24 | "properties": { |
| 25 | "id": { "type": "string", "minLength": 1 }, |
| 26 | "label": { "type": "string", "minLength": 1 }, |
| 27 | "text": { "type": "string", "minLength": 1 } |
| 28 | } |
| 29 | } |
| 30 | }, |
| 31 | "artifact-classification": { |
| 32 | "type": "object", |
| 33 | "minProperties": 1, |
| 34 | "additionalProperties": { |
| 35 | "type": "object", |
| 36 | "required": ["required-footers", "artifacts"], |
| 37 | "additionalProperties": false, |
| 38 | "properties": { |
| 39 | "scope": { |
| 40 | "type": "array", |
| 41 | "items": { "type": "string", "minLength": 1 }, |
| 42 | "description": "Glob patterns limiting which files this tier applies to" |
| 43 | }, |
| 44 | "required-footers": { |
| 45 | "type": "array", |
| 46 | "items": { "type": "string", "minLength": 1 }, |
| 47 | "minItems": 1 |
| 48 | }, |
| 49 | "artifacts": { |
| 50 | "type": "array", |
| 51 | "items": { "type": "string", "minLength": 1 }, |
| 52 | "minItems": 1 |
| 53 | }, |
| 54 | "requires-disclaimer": { "type": "boolean" }, |
| 55 | "disclaimer-ref": { "type": "string", "minLength": 1 } |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | }, |
| 61 | "disclaimerConfig": { |
| 62 | "type": "object", |
| 63 | "required": ["version", "disclaimers"], |
| 64 | "additionalProperties": false, |
| 65 | "properties": { |
| 66 | "version": { |
| 67 | "type": "string", |
| 68 | "pattern": "^\\d+\\.\\d+$" |
| 69 | }, |
| 70 | "disclaimers": { |
| 71 | "type": "object", |
| 72 | "minProperties": 1, |
| 73 | "additionalProperties": { |
| 74 | "type": "object", |
| 75 | "required": ["id", "label", "applies-to", "text"], |
| 76 | "additionalProperties": false, |
| 77 | "properties": { |
| 78 | "id": { "type": "string", "minLength": 1 }, |
| 79 | "label": { "type": "string", "minLength": 1 }, |
| 80 | "applies-to": { |
| 81 | "type": "array", |
| 82 | "items": { "type": "string", "minLength": 1 }, |
| 83 | "minItems": 1 |
| 84 | }, |
| 85 | "text": { "type": "string", "minLength": 1 } |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | }, |
| 92 | "oneOf": [ |
| 93 | { "$ref": "#/definitions/footerConfig" }, |
| 94 | { "$ref": "#/definitions/disclaimerConfig" } |
| 95 | ] |
| 96 | } |
| 97 | |