Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
foway0 opened this issue Apr 19, 2022 · 0 comments
Open

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

foway0 opened this issue Apr 19, 2022 · 0 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@foway0
Copy link

foway0 commented Apr 19, 2022

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
    }
  ]
}
@foway0 foway0 added the bug Indicates an unexpected problem or unintended behavior label Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant