{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://influence.observer/data/schemas/platform.schema.json","title":"Influence Observer platform assessment","oneOf":[{"type":"object","additionalProperties":false,"required":["id","kind","version","asOf","title","description","scope","method","grades","principles","nextPlatforms","history"],"properties":{"id":{"const":"platform-framework"},"kind":{"const":"framework"},"version":{"type":"string","minLength":1},"asOf":{"type":"string","format":"date"},"title":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"scope":{"type":"string","minLength":1},"method":{"type":"string","minLength":1},"grades":{"type":"array","minItems":4,"items":{"type":"object","additionalProperties":false,"required":["id","label","shortLabel","description"],"properties":{"id":{"enum":["A","B","C","U"]},"label":{"type":"string","minLength":1},"shortLabel":{"type":"string","minLength":1},"description":{"type":"string","minLength":1}}}},"principles":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["title","text"],"properties":{"title":{"type":"string","minLength":1},"text":{"type":"string","minLength":1}}}},"nextPlatforms":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true},"history":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["date","title","text"],"properties":{"date":{"type":"string","format":"date"},"title":{"type":"string","minLength":1},"text":{"type":"string","minLength":1}}}}}},{"type":"object","additionalProperties":false,"required":["id","kind","name","operator","order","summary","architecture","scope","reviewedAt","assessments","outcomes","rights","gaps"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"kind":{"const":"platform"},"name":{"type":"string","minLength":1},"operator":{"type":"string","minLength":1},"order":{"type":"number"},"summary":{"type":"string","minLength":1},"architecture":{"type":"string","minLength":1},"scope":{"type":"string","minLength":1},"reviewedAt":{"type":"string","format":"date"},"assessments":{"type":"array","minItems":6,"items":{"type":"object","additionalProperties":false,"required":["vectorId","grade","headline","control","gradeReason","basis","period","scope","outcome","benefitStatus","limitation","nextCheck","sourceIds","evidence"],"properties":{"vectorId":{"type":"string","minLength":1},"grade":{"enum":["A","B","C","U"]},"headline":{"type":"string","minLength":1},"control":{"type":"string","minLength":1},"gradeReason":{"type":"string","minLength":1},"basis":{"type":"array","uniqueItems":true,"items":{"enum":["company-statement","independent-research","regulator-record","independent-reporting","review-gap","institutional-record"]}},"period":{"type":"string","minLength":1},"scope":{"type":"string","minLength":1},"outcome":{"type":"string","minLength":1},"benefitStatus":{"enum":["not-established","mixed","scoped-reduction"]},"limitation":{"type":"string","minLength":1},"nextCheck":{"type":"string","minLength":1},"sourceIds":{"type":"array","uniqueItems":true,"items":{"type":"string","minLength":1}},"evidence":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["sourceId","locator","interpretation","role"],"properties":{"sourceId":{"type":"string","minLength":1},"locator":{"type":"string","minLength":1},"interpretation":{"type":"string","minLength":1},"role":{"enum":["control","implementation","outcome","limitation"]}}}}}}},"outcomes":{"type":"object","additionalProperties":false,"required":["text","sourceIds"],"properties":{"text":{"type":"string","minLength":1},"sourceIds":{"type":"array","uniqueItems":true,"items":{"type":"string","minLength":1}}}},"rights":{"type":"object","additionalProperties":false,"required":["text","sourceIds"],"properties":{"text":{"type":"string","minLength":1},"sourceIds":{"type":"array","uniqueItems":true,"items":{"type":"string","minLength":1}}}},"gaps":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","minLength":1}}}}]}