{
	"$schema": "http://json-schema.org/draft-07/schema",
	"type": "object",
	"title": "CommandFailed schema",
	"description": "The commandfailed schema comprises the commandfailed event related information",
	"required": [
		"specversion",
		"type",
		"source",
		"subject",
		"id",
		"data"
	],
	"properties": {
		"specversion": {
			"type": "string"
		},
		"type": {
			"type": "string"
		},
		"subject": {
			"type": "string"
		},
		"source": {
			"type": "string"
		},
		"id": {
			"type": "string"
		},
		"time": {
			"type": "string",
			"format": "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
		},
		"correlationid": {
			"type": "string"
		},
		"serviceid": {
			"type": "string"
		},
		"channelid": {
			"type": "string"
		},
		"organizationid": {
			"type": "string"
		},
		"tenantid": {
			"type": "string"
		},
		"businesskey": {
			"type": "string"
		},
		"sequenceno": {
			"type": "integer"
		},
		"extension-mscontext": {
			"type": "object",
			"properties": {
				"authorization": {
					"type": "string"
				},
				"customfilterid": {
					"type": "string"
				},
				"operationinstanceid": {
					"type": "string"
				},
				"sequenceinstanceid": {
					"type": "string"
				},
				"priority": {
					"type": "integer"
				}
			}
		},
		"datacontenttype": {
			"type": "string"
		},
		"data": {
			"type": "object",
			"properties": {
				"commandId": {
					"type": "string"
				},
				"operationInstanceId": {
					"type": "string"
				},
				"sequenceInstanceId": {
					"type": "string"
				},
				"eventType": {
					"type": "string"
				},
				"status": {
					"type": "string"
				},
				"businessObject": {
					"type": "object",
					"properties": {
						"status": {
							"type": "integer"
						},
						"failureMessages": {
							"type": "array",
							"items": [{
								"type": "object",
								"properties": {
									"message": {
										"type": "string"
									},
									"code": {
										"type": "string"
									}
								},
								"required": [
									"message",
									"code"
								]
							}]
						},
						"body": {
							"type": "string"
						},
						"success": {
							"type": "boolean"
						}
					},
					"required": [
						"status",
						"failureMessages",
						"body",
						"success"
					]
				}
			},
			"required": [
				"commandId",
				"operationInstanceId",
				"sequenceInstanceId",
				"eventType",
				"status",
				"businessObject"
			]
		}
	}
}
