Files
GEWU/schema/v1/records/ProposalStatus.schema.json
T

257 lines
5.4 KiB
JSON
Raw Normal View History

{
"$defs": {
"Finding": {
"additionalProperties": false,
"properties": {
"code": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Code",
"type": "string"
},
"message": {
"maxLength": 1000,
"minLength": 1,
"title": "Message",
"type": "string"
},
"path": {
"anyOf": [
{
"maxLength": 256,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
}
},
"required": [
"code",
"message"
],
"title": "Finding",
"type": "object"
},
"ProposalReceipt": {
"additionalProperties": false,
"properties": {
"accepted_node_ids": {
"default": [],
"items": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"type": "string"
},
"title": "Accepted Node Ids",
"type": "array"
},
"commit_id": {
"anyOf": [
{
"pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Commit Id"
},
"decided_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Decided At"
},
"findings": {
"default": [],
"items": {
"$ref": "#/$defs/Finding"
},
"title": "Findings",
"type": "array"
},
"outcome": {
"enum": [
"accepted",
"held",
"rejected",
"validation-failed"
],
"title": "Outcome",
"type": "string"
},
"payload_digest": {
"pattern": "^[a-f0-9]{64}$",
"title": "Payload Digest",
"type": "string"
},
"proposal_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Proposal Id",
"type": "string"
},
"revision": {
"minimum": 1,
"title": "Revision",
"type": "integer"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
},
"state": {
"$ref": "#/$defs/ProposalState"
}
},
"required": [
"proposal_id",
"revision",
"payload_digest",
"state",
"outcome"
],
"title": "ProposalReceipt",
"type": "object"
},
"ProposalState": {
"enum": [
"staged",
"validating",
"needs-review",
"accepted",
"rejected",
"withdrawn"
],
"title": "ProposalState",
"type": "string"
}
},
"additionalProperties": false,
"properties": {
"canonical_revision": {
"anyOf": [
{
"pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Canonical Revision"
},
"eligible_for_auto_accept": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Eligible For Auto Accept"
},
"findings": {
"default": [],
"items": {
"$ref": "#/$defs/Finding"
},
"maxItems": 200,
"title": "Findings",
"type": "array"
},
"lifecycle": {
"enum": [
"staged",
"evaluated",
"publishing",
"published-unreconciled",
"accepted",
"withdrawn"
],
"title": "Lifecycle",
"type": "string"
},
"proposal_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Proposal Id",
"type": "string"
},
"receipt": {
"anyOf": [
{
"$ref": "#/$defs/ProposalReceipt"
},
{
"type": "null"
}
],
"default": null
},
"revision": {
"minimum": 1,
"title": "Revision",
"type": "integer"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
},
"validation_status": {
"anyOf": [
{
"enum": [
"eligible",
"needs-review",
"invalid",
"conflict"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Validation Status"
}
},
"required": [
"proposal_id",
"revision",
"lifecycle"
],
"title": "ProposalStatus",
"type": "object"
}