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:
description: The width of the image in pixels.
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

@ -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``.
title: ImageInfo
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:
description: The URL to the image.
type: string

@ -22,9 +22,9 @@ properties:
type: integer
thumbnail_info:
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``.
title: ImageInfo
title: ThumbnailInfo
type: object
thumbnail_url:
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'."
type: string
info:
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
description: Metadata about the image referred to in ``url``.
title: ImageInfo
type: object
msgtype:

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

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

Loading…
Cancel
Save