{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://github.com/microsoft/BCQuality/schemas/development-guidance-report.schema.json", "title": "BCQuality development-guidance report", "type": "object", "additionalProperties": false, "required": [ "skill", "outcome", "summary", "context", "knowledge", "validation-considerations", "suppressed", "unresolved" ], "properties": { "skill": { "type": "object", "additionalProperties": false, "required": ["id", "version"], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" }, "version": { "type": "integer", "minimum": 1 } } }, "outcome": { "enum": ["completed", "not-applicable", "no-knowledge", "partial", "failed"] }, "outcome-reason": { "type": "string", "minLength": 1 }, "summary": { "type": "object", "additionalProperties": false, "required": ["request", "kind", "candidates", "selected"], "properties": { "request": { "type": "string", "minLength": 1 }, "kind": { "enum": ["feature", "bug", "refactor", "upgrade", "maintenance"] }, "candidates": { "type": "integer", "minimum": 0 }, "selected": { "type": "integer", "minimum": 0 } } }, "context": { "type": "object", "additionalProperties": false, "required": [ "bc-version", "technologies", "countries", "application-area", "unknown" ], "properties": { "bc-version": { "type": "string", "minLength": 1 }, "technologies": { "$ref": "#/definitions/stringArray" }, "countries": { "$ref": "#/definitions/stringArray" }, "application-area": { "$ref": "#/definitions/stringArray" }, "unknown": { "type": "array", "uniqueItems": true, "items": { "enum": ["bc-version", "technologies", "countries", "application-area"] } } } }, "knowledge": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/definitions/knowledge" } }, "validation-considerations": { "type": "array", "uniqueItems": true, "items": { "type": "object", "additionalProperties": false, "required": ["id", "reason", "evidence"], "properties": { "id": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" }, "reason": { "type": "string", "minLength": 1 }, "evidence": { "type": "string", "minLength": 1 } } } }, "suppressed": { "type": "array", "uniqueItems": true, "items": { "type": "object", "additionalProperties": false, "required": ["reference", "reason"], "properties": { "reference": { "$ref": "#/definitions/reference" }, "reason": { "enum": ["layer-precedence", "configuration"] } } } }, "unresolved": { "$ref": "#/definitions/stringArray" } }, "allOf": [ { "if": { "properties": { "outcome": { "enum": ["partial", "failed"] } }, "required": ["outcome"] }, "then": { "required": ["outcome-reason"] } }, { "if": { "properties": { "outcome": { "const": "completed" } }, "required": ["outcome"] }, "then": { "properties": { "knowledge": { "minItems": 1 } } } }, { "if": { "properties": { "outcome": { "enum": ["not-applicable", "no-knowledge", "failed"] } }, "required": ["outcome"] }, "then": { "properties": { "knowledge": { "maxItems": 0 } } } } ], "definitions": { "stringArray": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }, "reference": { "type": "object", "additionalProperties": false, "required": ["path"], "properties": { "path": { "type": "string", "pattern": "^(microsoft|community|custom)/knowledge/[a-z0-9-]+/[a-z0-9-]+\\.md$" }, "sha": { "type": "string", "pattern": "^([0-9a-fA-F]{40}|[0-9a-fA-F]{64})$" } } }, "knowledge": { "type": "object", "additionalProperties": false, "required": ["path", "used-for", "constraints", "sample-paths"], "properties": { "path": { "type": "string", "pattern": "^(microsoft|community|custom)/knowledge/[a-z0-9-]+/[a-z0-9-]+\\.md$" }, "sha": { "type": "string", "pattern": "^([0-9a-fA-F]{40}|[0-9a-fA-F]{64})$" }, "used-for": { "type": "string", "minLength": 1 }, "constraints": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }, "sample-paths": { "type": "array", "uniqueItems": true, "items": { "type": "string", "pattern": "^(microsoft|community|custom)/knowledge/[a-z0-9-]+/[a-z0-9-]+\\.(good|bad)\\.[a-zA-Z0-9]+$" } } } } } }