Add a thumbnail_info common schema, deduplicate m.room.avatar and m.room.message#m.image

pull/977/head
Mark Haines 8 years ago
parent 1b661b64dc
commit 2fdca5a995

@ -13,4 +13,13 @@ properties:
w: w:
description: The width of the image in pixels. description: The width of the image in pixels.
type: integer type: integer
thumbnail_url:
desciption: The URL to a thumbnail of the image.
type: string
thumbnail_info:
allOf:
- $ref: core-event-schema/msgtype_infos/thumbnail_info.yaml
description: Metadata about the image referred to in ``thumbnail_url``.
title: ThumbnailInfo
type: object
title: ImageInfo title: ImageInfo

@ -0,0 +1,16 @@
$schema: http://json-schema.org/draft-04/schema#
description: Metadata about a thumbnail image.
properties:
h:
description: The height of the image in pixels.
type: integer
mimetype:
description: The mimetype of the image, e.g. ``image/jpeg``.
type: string
size:
description: Size of the image in bytes.
type: integer
w:
description: The width of the image in pixels.
type: integer
title: ThumbnailInfo

@ -11,15 +11,6 @@ properties:
description: Metadata about the image referred to in ``url``. description: Metadata about the image referred to in ``url``.
title: ImageInfo title: ImageInfo
type: object type: object
thumbnail_info:
allOf:
- $ref: core-event-schema/msgtype_infos/image_info.yaml
description: Metadata about the image referred to in ``thumbnail_url``.
title: ImageInfo
type: object
thumbnail_url:
description: The URL to the thumbnail of the image.
type: string
url: url:
description: The URL to the image. description: The URL to the image.
type: string type: string

@ -22,9 +22,9 @@ properties:
type: integer type: integer
thumbnail_info: thumbnail_info:
allOf: allOf:
- $ref: core-event-schema/msgtype_infos/image_info.yaml - $ref: core-event-schema/msgtype_infos/thumbnail_info.yaml
description: Metadata about the image referred to in ``thumbnail_url``. description: Metadata about the image referred to in ``thumbnail_url``.
title: ImageInfo title: ThumbnailInfo
type: object type: object
thumbnail_url: thumbnail_url:
description: The URL to the thumbnail of the file. description: The URL to the thumbnail of the file.

@ -9,29 +9,9 @@ properties:
description: "A textual representation of the image. This could be the alt text of the image, the filename of the image, or some kind of content description for accessibility e.g. 'image attachment'." description: "A textual representation of the image. This could be the alt text of the image, the filename of the image, or some kind of content description for accessibility e.g. 'image attachment'."
type: string type: string
info: info:
allOf:
- $ref: core-event-schema/msgtype_infos/image_info.yaml
description: Metadata about the image referred to in ``url``. description: Metadata about the image referred to in ``url``.
properties:
h:
description: The height of the image in pixels.
type: integer
mimetype:
description: 'The mimetype of the image, e.g. ``image/jpeg``.'
type: string
size:
description: Size of the image in bytes.
type: integer
w:
description: The width of the image in pixels.
type: integer
thumbnail_info:
allOf:
- $ref: core-event-schema/msgtype_infos/image_info.yaml
description: Metadata about the image referred to in ``thumbnail_url``.
title: ImageInfo
type: object
thumbnail_url:
description: The URL to the thumbnail of the image.
type: string
title: ImageInfo title: ImageInfo
type: object type: object
msgtype: msgtype:

@ -20,8 +20,8 @@ properties:
properties: properties:
thumbnail_info: thumbnail_info:
allOf: allOf:
- $ref: core-event-schema/msgtype_infos/image_info.yaml - $ref: core-event-schema/msgtype_infos/thumbnail_info.yaml
title: ImageInfo title: ThumbnailInfo
type: object type: object
thumbnail_url: thumbnail_url:
description: The URL to a thumbnail of the location being represented. description: The URL to a thumbnail of the location being represented.

@ -25,8 +25,8 @@ properties:
type: integer type: integer
thumbnail_info: thumbnail_info:
allOf: allOf:
- $ref: core-event-schema/msgtype_infos/image_info.yaml - $ref: core-event-schema/msgtype_infos/thumbnail_info.yaml
title: ImageInfo title: ThumbnailInfo
type: object type: object
thumbnail_url: thumbnail_url:
description: The URL to a thumbnail of the video clip. description: The URL to a thumbnail of the video clip.

Loading…
Cancel
Save