# --- The image and media type and it's components --------------- _types: !import base/types.yml # ! internal type for use in media and image objects. Do not use directly _mediaproperties: &mediaproperties title: !ref _types.simpletext description: !ref &: _types.simplehtml copyright: !ref &: _types.simpletext required: false # TODO: Find out if we need this as required alt: !ref &: _types.simpletext default: false link: filter: Url options: {type: absolute} required: false custom: !ref &: _types.custom # ! internal type for use in media and image objects. Do not use directly _imagevariants: &imagevariants listing: min: 1 max: 25 key: filter: Plain value: properties: url: filter: Url options: {type: absolute} required: true width: filter: Number options: {min: 100, max: 10000, decimals: 0, round: false, adjust: false} required: true height: filter: Number options: {min: 100, max: 10000, decimals: 0, round: false, adjust: false} required: true aspectRatio: filter: Number options: {min: 0.1, max: 10, decimals: 3, round: round, adjust: false} required: true updateDate: !ref &: _types.datetime default: null required: false # media object - fixed to type image image: properties: <<: *mediaproperties image: <<: *imagevariants required: true # media object (currently only supporting images, but this can change to more formats) media: properties: <<: *mediaproperties type: filter: Enum options: {values: [image]} image: <<: *imagevariants required: true