Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions demo/examples/tests/allOf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,96 @@ paths:
required:
- pet

/allof-nested-array-items:
get:
tags:
- allOf
summary: allOf with Nested Array Items
description: |
A list of books demonstrating allOf with nested items as children.
Schema:
```yaml
type: array
items:
type: object
properties:
books:
type: array
items:
$ref: '#/components/schemas/Book'
pagination:
type: object
properties:
page_number:
type: integer
page_size:
type: integer
```
responses:
"200":
description: A list of books with pagination
content:
application/json:
schema:
type: object
properties:
books:
type: array
items:
$ref: "#/components/schemas/Book"
pagination:
type: object
properties:
page_number:
type: integer
page_size:
type: integer

/allof-nested-array-with-properties:
get:
tags:
- allOf
summary: allOf in Nested Array with Properties
description: |
A list of books demonstrating allOf with nested array with properties.
Schema:
```yaml
type: array
items:
type: object
properties:
books:
type: array
items:
$ref: '#/components/schemas/CategorizedBook'
pagination:
type: object
properties:
page_number:
type: integer
page_size:
type: integer
```
responses:
"200":
description: A list of books
content:
application/json:
schema:
type: object
properties:
books:
type: array
items:
$ref: "#/components/schemas/CategorizedBook"
pagination:
type: object
properties:
page_number:
type: integer
page_size:
type: integer

components:
schemas:
# Your existing schemas are integrated here.
Expand Down