-
Notifications
You must be signed in to change notification settings - Fork 137
/
Copy pathtransactionresult.schema.json
57 lines (57 loc) · 1.82 KB
/
transactionresult.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/next/context/transactionresult.schema.json",
"type": "object",
"title": "TransactionResult",
"description": "A context type representing the result of a transaction initiated via FDC3, which SHOULD be returned as an `IntentResult` by intents that create, retrieve, update or delete content or records in another application. Its purpose is to provide a status and message (where needed) for the transaction and MAY wrap a returned context object.",
"allOf": [
{
"type": "object",
"properties": {
"type": {
"const": "fdc3.transactionResult"
},
"status": {
"type": "string",
"enum": [
"Created",
"Deleted",
"Updated",
"Failed"
],
"title": "Transaction Status",
"description": "The status of the transaction being reported."
},
"context": {
"$ref": "context.schema.json#",
"title": "Transaction Result Context",
"description": "A context object returned by the transaction, possibly with updated data."
}
},
"message": {
"type": "string",
"title": "Transaction Message",
"description": "A human readable message describing the outcome of the transaction."
},
"required": [
"type",
"status"
]
},
{ "$ref": "context.schema.json#/definitions/BaseContext" }
],
"examples": [
{
"type": "fdc3.transactionResult",
"status": "Updated",
"context": {
"type": "fdc3.contact",
"name": "Jane Doe",
"id": {
"email": "jane.doe@mail.com"
}
},
"message": "record with id 'jane.doe@mail.com' was updated"
}
]
}