wiki.techinc.nl/includes/Rest/Handler/Schema/MediaFile.json
Wendy Quarshie 87b34ec850 REST: JSON schema definitions for additional response bodies
Bug: T376603
Depends-On: I4193b9be4516717c7ce423131370a7d0b6ea8962
Change-Id: Ic2d9471ad446eb5f9d5e7072f1ef93f7196a20f8
2025-07-15 11:40:08 +01:00

165 lines
4.6 KiB
JSON

{
"description": "Information about the file",
"required": [
"title",
"file_description_url",
"latest",
"preferred",
"original",
"thumbnail"
],
"properties": {
"title": {
"type": "string",
"description": "File title"
},
"file_description_url": {
"type": "string",
"description": "URL for the page describing the file, including license information and other metadata"
},
"latest": {
"type": "object",
"nullable": true,
"description": "Information about the latest revision to the file",
"properties": {
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Last modified timestamp in ISO 8601 format"
},
"user": {
"type": "object",
"description": "Information about the user who uploaded the file",
"properties": {
"id": {
"type": "integer",
"nullable": true,
"description": "User identifier"
},
"name": {
"type": "string",
"nullable": true,
"description": "Username"
}
},
"required": [ "id", "name" ]
}
},
"required": [ "timestamp", "user" ]
},
"preferred": {
"type": "object",
"nullable": true,
"description": "Information about the file's preferred preview format, original format, and thumbnail format",
"properties": {
"mediatype": {
"type": "string",
"enum": [ "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "UNKNOWN", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ],
"description": "The file type"
},
"size": {
"type": "integer",
"nullable": true,
"description": "File size in bytes or null if not available"
},
"width": {
"type": "integer",
"nullable": true,
"description": "Maximum recommended image width in pixels or null if not available"
},
"height": {
"type": "integer",
"nullable": true,
"description": "Maximum recommended image height in pixels or null if not available"
},
"duration": {
"type": "number",
"nullable": true,
"description": "The length of the video, audio, or multimedia file or null for other media types"
},
"url": {
"type": "string",
"format": "uri",
"description": "URL to download the file"
}
},
"required": [ "mediatype", "size", "width", "height", "duration", "url" ]
},
"original": {
"type": "object",
"nullable": true,
"description": "Original file details",
"properties": {
"mediatype": {
"type": "string",
"enum": [ "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "UNKNOWN", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ],
"description": "The file type"
},
"size": {
"type": "integer",
"nullable": true,
"description": "File size in bytes or null if not available"
},
"width": {
"type": "integer",
"nullable": true,
"description": "Maximum recommended image width in pixels or null if not available"
},
"height": {
"type": "integer",
"nullable": true,
"description": "Maximum recommended image height in pixels or null if not available"
},
"duration": {
"type": "number",
"nullable": true,
"description": "The length of the video, audio, or multimedia file or null for other media types"
},
"url": {
"type": "string",
"format": "url",
"description": "URL to download the file"
}
},
"required": [ "mediatype", "size", "width", "height", "duration", "url" ]
},
"thumbnail": {
"type": "object",
"nullable": true,
"description": "Thumbnail information",
"properties": {
"mediatype": {
"type": "string",
"enum": [ "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "UNKNOWN", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ],
"description": "The file type"
},
"size": {
"type": "integer",
"nullable": true,
"description": "File size in bytes or null if not available"
},
"width": {
"type": "integer",
"nullable": true,
"description": "Maximum recommended image width in pixels or null if not available"
},
"height": {
"type": "integer",
"nullable": true,
"description": "Maximum recommended image height in pixels or null if not available"
},
"duration": {
"type": "number",
"nullable": true,
"description": "The length of the video, audio, or multimedia file or null for other media types"
},
"url": {
"type": "string",
"format": "uri",
"description": "URL to download the file"
}
},
"required": [ "mediatype", "size", "width", "height", "duration", "url" ]
}
}
}