-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1261 from Yannick-Malins/Issue-1255
1255 Make fdc3.fileAttachment an independent type
- Loading branch information
Showing
4 changed files
with
122 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/fileAttachment.schema.json", | ||
"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" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.