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

[BUG] Nested containers in response not supported #2284

Open
5 of 6 tasks
etherealjoy opened this issue Mar 3, 2019 · 0 comments
Open
5 of 6 tasks

[BUG] Nested containers in response not supported #2284

etherealjoy opened this issue Mar 3, 2019 · 0 comments

Comments

@etherealjoy
Copy link
Contributor

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

Issue is because the CodegenResponse has no way of specifying the nested type when the response from the operation is being parsed. This means mustache templates cannot have a way to detect that the response is actually nested container because the item type of the root container are not currently specified.

openapi-generator version

4.0.0

OpenAPI declaration file content or url
  '/products/names':
    get:
      tags:
        - Debug
      summary: Retrieves list of names 
      description: ''
      operationId: getProductNames
      produces:
        - application/json
      responses:
        '200':
          description: successful operation
          schema:
            type: array
            items:
              type: array
              items:
                type: object
        '400':
          description: not initialized
        '500':
          description: Internal error
Suggest a fix

CodegenResponse should have additional fields or extension of current fields indicating the items of the container when the flag isContainer is set.

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

1 participant