From d7ea4c96686413276a310f1689abe95b34af8782 Mon Sep 17 00:00:00 2001 From: "takaoka.daisuke" Date: Mon, 13 Oct 2025 11:58:45 +0900 Subject: [PATCH] add allof-nested-array-items test case --- demo/examples/tests/allOf.yaml | 90 ++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/demo/examples/tests/allOf.yaml b/demo/examples/tests/allOf.yaml index 309a95905..3a987752b 100644 --- a/demo/examples/tests/allOf.yaml +++ b/demo/examples/tests/allOf.yaml @@ -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.