Skip to content

define an array with allOf, list does not showing any items #598

@foway0

Description

@foway0

Describe the bug

When defining an array with allOf in the openapi spec, list does not showing any items

attach the screenshot, openapi spec, and server response data.

Screenshots

can get response from server, but nothing is displayed in the list.

image

image

Additional context

Here is the openapi spec and server response data I used when testing

openapi: 3.0.0
info:
  description: viron specification
  title: viron
  version: 1.0.0
  x-pages:
    - id: shops
      group: shops
      title: shop list
      description: |
        shopの設定を行います
      contents:
        - title: stop一覧
          type: table
          operationId: shops#list
          pagination: true
          resourceId: shops
  x-table:
    responseListKey: list
    pager:
      requestPageKey: page
      requestSizeKey: size
      responseMaxpageKey: maxPage
      responsePageKey: currentPage
    sort:
      requestKey: sort
servers:
  - url: /
tags:
  - description: shop API
    name: shops
paths:
  /shops:
    get:
      description: shop一覧取得をします。
      operationId: shops#list
      parameters:
        - in: query
          name: size
          schema:
            maximum: 99
            minimum: 1
            type: integer
        - in: query
          name: page
          schema:
            minimum: 1
            type: integer
        - in: query
          name: order
          schema:
            type: string
      responses:
        200:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopList'
          description: OK
      security:
        - jwt: []
      summary: shop一覧取得
      tags:
        - shop
      x-exegesis-controller: shops
components:
  schemas:
    Shop:
      allOf:
        - $ref: '#/components/schemas/Name'
        - $ref: '#/components/schemas/LinkUrl'
        - $ref: '#/components/schemas/Priority'
      required:
        - linkUrl
        - name
        - priority
    LinkUrl:
      properties:
        linkUrl:
          type: string
      type: object
    ShopList:
      allOf:
        - $ref: '#/components/schemas/Pager'
        - properties:
            list:
              items:
                $ref: '#/components/schemas/Shop'
              type: array
          required:
            - list
          type: object
    CurrentPage:
      properties:
        currentPage:
          format: int32
          type: integer
      type: object
    MaxPage:
      properties:
        maxPage:
          format: int32
          type: integer
      type: object
    Priority:
      properties:
        priority:
          example: 999
          format: int32
          type: integer
      type: object
    Pager:
      allOf:
        - $ref: '#/components/schemas/CurrentPage'
        - $ref: '#/components/schemas/MaxPage'
      required:
        - currentPage
        - maxPage
    Name:
      properties:
        name:
          type: string
      type: object
  securitySchemes:
    jwt:
      flows:
        implicit:
          authorizationUrl: https://localhost:3000/signin
          scopes:
            api:access: API access
      type: oauth2
{
  "currentPage": 1,
  "maxPage": 1,
  "list": [
    {
      "name": "hoge",
      "linkUrl": "https://example.com",
      "priority": 1
    },
    {
      "name": "qwerty",
      "linkUrl": "https://example.com",
      "priority": 2
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions