Skip to main content

allOf with Properties in Array Item

GET 

/allof-with-properties-in-array-item

A list of books demonstrating allOf with properties in array item.

Schema:

type: array
items:
$ref: '#/components/schemas/Book'

Schema Components:

BookBase:
type: object
required:
- id
- title
- author
properties:
id:
type: integer
format: int64
description: Unique identifier for the book
title:
type: string
description: The title of the book
author:
type: string
description: The author of the book

AdditionalBookInfo:
type: object
properties:
publishedDate:
type: string
format: date
description: The date the book was published
genre:
type: string
description: The genre of the book
tags:
type: array
items:
type: string
description: Tags associated with the book

CategorizedBook:
allOf:
- $ref: '#/components/schemas/BookBase'
- $ref: '#/components/schemas/AdditionalBookInfo'
properties:
category:
type: string
description: The category of the book

Responses

A list of books