Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1255 Make fdc3.fileAttachment an independent type #1261

Merged
merged 4 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions schemas/context/fileAttachment.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/next/context/attachment.schema.json",
Yannick-Malins marked this conversation as resolved.
Show resolved Hide resolved
"type": "object",
"title": "File Attachment",
"description": "A File attachment encoded in the form of a data URI. Can be added to a Message.",
"allOf": [
{
"type": "object",
"properties": {
"type": {
"const": "fdc3.fileAttachment"
},
"data": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "File name",
"description": "The name of the attached file"
},
"dataUri": {
"type": "string",
"format": "uri",
"title": "",
"description": "A data URI encoding the content of the file to be attached"
}
},
"required": [
"name",
"dataUri"
]
}
},
"required": [
"type",
"data"
]
},
{
"$ref": "context.schema.json#/definitions/BaseContext"
}
],
"examples": [
{
"type": "fdc3.fileAttachment",
"data": {
"name": "myImage.png",
"dataUri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII"
}
}
]
}
33 changes: 1 addition & 32 deletions schemas/context/message.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,7 @@
"$ref": "action.schema.json#"
Yannick-Malins marked this conversation as resolved.
Show resolved Hide resolved
},
{
"type": "object",
"title": "File attachment",
"description": "A File attachment encoded in the form of a data URI",
"properties": {
"type": {
"const": "fdc3.entity.fileAttachment"
},
"data": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "File name",
"description": "The name of the attached file"
},
"dataUri": {
"type": "string",
"format": "uri",
"title": "",
"description": "A data URI encoding the content of the file to be attached"
}
},
"required": [
"name",
"dataUri"
]
}
},
"required": [
"type",
"data"
]
"$ref": "fileAttachment.schema.json#"
}
]
}
Expand Down