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

Misusing openApi spec for generic pagination #111

Open
MogensFogh opened this issue Jun 10, 2021 · 0 comments
Open

Misusing openApi spec for generic pagination #111

MogensFogh opened this issue Jun 10, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@MogensFogh
Copy link

Describe the bug
This is the recommendation from the demo project for adding pagination.

                allOf:
                  - $ref: '#/components/schemas/Pagination'
                  - $ref: '#/components/schemas/Orders'

Where Orders is an array with ref to the Order class.
It generates a return value of Pagination and not a combination of Pagination and Orders.

Spec should specify property items:

                allOf:
                  - $ref: '#/components/schemas/Pagination'
                  - type: object
                    required:
                      - items
                    properties:
                      items:
                        type: array
                        items:
                          - $ref: '#/components/schemas/Order'

To Reproduce
Steps to reproduce the behavior:

  1. Add Pagination to yaml spec
  2. Use other tool to generate client

Expected behavior
Expect that the spec represent the generated api.

@MogensFogh MogensFogh added the bug Something isn't working label Jun 10, 2021
@MogensFogh MogensFogh self-assigned this Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant