openapi: 3.0.0 info: title: Media API description: Hypermedia API used to demonstrate several new constructs in the OpenAPI set. version: 1.0.0 termsOfService: none paths: /hypermedia/{title}: get: summary: Get hypermedia information about a specific title description: get information about a media, including metadata, reviews, images, editor's cut and trailers, etc. operationId: getHypermedia parameters: - name: title in: path required: true description: the unique title of the media. schema: type: string responses: 200: description: the media title has been found content: application/json: schema: # Strategy that references a composite schema indirectly #$ref: '#/components/schemas/Hypermedia' # Strategy that defines a composite schema in-line allOf: - $ref: '#/components/schemas/MediaMetadata' - $ref: '#/components/schemas/Thing' - $ref: '#/components/schemas/Images' #- $ref: '#/components/schemas/Video' #- $ref: '#/components/schemas/Reviews' #- $ref: '#/components/schemas/Tags' example: components: schemas: MediaMetadata: title: mediaMetadata type: object properties: name: description: The media title. type: string Thing: title: thing type: object properties: field: description: An example field. type: string Images: title: images type: object properties: images: type: array items: $ref: '#/components/schemas/Image' additionalProperties: false Video: title: video type: array items: type: string format: binary Reviews: title: reviews type: array items: type: string Tags: title: tags type: array items: type: string Hypermedia: title: hypermedia type: object allOf: - $ref: '#/components/schemas/MediaMetadata' - $ref: '#/components/schemas/Thing' - $ref: '#/components/schemas/Images' #- $ref: '#/components/schemas/Video' #- $ref: '#/components/schemas/Tags' #- $ref: '#/components/schemas/Reviews' Image: title: image type: object properties: size: type: integer dimensions: type: object properties: width: type: integer height: type: integer image: type: string format: binary