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

Array of models not showing expansion in UI #2044

Closed
stephenliberty opened this issue Jun 7, 2022 · 3 comments
Closed

Array of models not showing expansion in UI #2044

stephenliberty opened this issue Jun 7, 2022 · 3 comments

Comments

@stephenliberty
Copy link

stephenliberty commented Jun 7, 2022

Describe the bug

When an model property is array of models, the documentation doesn't expand to show the model

Expected behavior

I would expect that the documentation generated would treat the array of models in the same way as other singular models.

Minimal reproducible OpenAPI snippet(if possible)

I tried to trim this out of a much, much larger yaml doc

components:
  schemas:
    BasicPaginated:
      properties:
        nextPage:
          type: string
        previousPage:
          type: string
    SalesOrderResponse:
      allOf:
        - $ref: '#/components/schemas/BasicPaginated'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/SalesOrderModel'
    SalesOrderModel:
      properties:
        order:
          $ref: '#/components/schemas/SalesOrder'
    SalesOrder:
      properties:
         salesOrderLines:
          items:
            $ref: '#/components/schemas/SalesOrderLine'
          type: array
          x-go-name: SalesOrderLines
    SalesOrderLine:
      properties:
        unitPrice:
          format: double
          type: number
          x-go-name: UnitPrice

The entire document is, per https://editor.swagger.io/, valid openapi 3.0.0, and the UI there DOES show the 'sales order line' as an array of sales order line

Screenshots
image

image

Additional context

@AlexVarchuk
Copy link
Collaborator

Hi @stephenliberty, what version of Redoc do you use?

@AlexVarchuk
Copy link
Collaborator

We had something similar at #2034.
I cannot reproduce it now. Please, make sure you are using the latest version of Redoc.
If the bug is still produced, provide a more extended OpenApi snippet for reproducing.

@stephenliberty
Copy link
Author

Confirmed fixed with latest version. Thank you @AlexVarchuk .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants