Skip to content

Commit 8dd4ad6

Browse files
committed
Merge branch 'main' into fdc3-for-web
2 parents 56932f9 + 9605b15 commit 8dd4ad6

11 files changed

Lines changed: 408 additions & 610 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3636

3737
### Fixed
3838

39+
* Spin off fileAttachment into its own schema, and correct related examples ([1255](https://github.com/finos/FDC3/issues/1255))
3940
* Added missing `desktopAgent` field to ImplementationMetadata objects returned for all agents connect to a DesktopAgent bridge in Connection Step 6 connectAgentsUpdate messages and refined the schema used to collect this info in step 3 handshake. ([#1177](https://github.com/finos/FDC3/pull/1177))
4041
* Removed the `version` field from `IntentResolution` as there are no version fields for intents in the FDC3 API definitions and hence the field has no purpose. ([#1170](https://github.com/finos/FDC3/pull/1170))
4142

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://fdc3.finos.org/schemas/next/context/fileAttachment.schema.json",
4+
"type": "object",
5+
"title": "File Attachment",
6+
"description": "A File attachment encoded in the form of a data URI. Can be added to a Message.",
7+
"allOf": [
8+
{
9+
"type": "object",
10+
"properties": {
11+
"type": {
12+
"const": "fdc3.fileAttachment"
13+
},
14+
"data": {
15+
"type": "object",
16+
"properties": {
17+
"name": {
18+
"type": "string",
19+
"title": "File name",
20+
"description": "The name of the attached file"
21+
},
22+
"dataUri": {
23+
"type": "string",
24+
"format": "uri",
25+
"title": "",
26+
"description": "A data URI encoding the content of the file to be attached"
27+
}
28+
},
29+
"required": [
30+
"name",
31+
"dataUri"
32+
]
33+
}
34+
},
35+
"required": [
36+
"type",
37+
"data"
38+
]
39+
},
40+
{
41+
"$ref": "context.schema.json#/definitions/BaseContext"
42+
}
43+
],
44+
"examples": [
45+
{
46+
"type": "fdc3.fileAttachment",
47+
"data": {
48+
"name": "myImage.png",
49+
"dataUri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII"
50+
}
51+
}
52+
]
53+
}

schemas/context/message.schema.json

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -33,43 +33,12 @@
3333
"title": "Message entities",
3434
"description": "A map of string IDs to entities that should be attached to the message, such as an action to perform, a file attachment, or other FDC3 context object.",
3535
"additionalProperties": {
36-
"anyOf": [
36+
"oneOf": [
3737
{
3838
"$ref": "action.schema.json#"
3939
},
4040
{
41-
"type": "object",
42-
"title": "File attachment",
43-
"description": "A File attachment encoded in the form of a data URI",
44-
"properties": {
45-
"type": {
46-
"const": "fdc3.entity.fileAttachment"
47-
},
48-
"data": {
49-
"type": "object",
50-
"properties": {
51-
"name": {
52-
"type": "string",
53-
"title": "File name",
54-
"description": "The name of the attached file"
55-
},
56-
"dataUri": {
57-
"type": "string",
58-
"format": "uri",
59-
"title": "",
60-
"description": "A data URI encoding the content of the file to be attached"
61-
}
62-
},
63-
"required": [
64-
"name",
65-
"dataUri"
66-
]
67-
}
68-
},
69-
"required": [
70-
"type",
71-
"data"
72-
]
41+
"$ref": "fileAttachment.schema.json#"
7342
}
7443
]
7544
}

0 commit comments

Comments
 (0)