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

Schema without type array is ignoring items in Responses #1636

Closed
SCSreekanth opened this issue Jan 4, 2022 · 7 comments
Closed

Schema without type array is ignoring items in Responses #1636

SCSreekanth opened this issue Jan 4, 2022 · 7 comments
Assignees

Comments

@SCSreekanth
Copy link

SCSreekanth commented Jan 4, 2022

Hi Team,

Please find below the swagger content in which for a response of the operation, the schema is set as items but without type array. The parser doesn't throw any error here but the response model that is generated has ignored the items. Please correct this.

swagger: '2.0'
info:
  description: 'This is a TEST.'
  version: 1.0.0
  title: Test
host: www.abc.com
basePath: /api
schemes:
  - http
paths:
  /test:
    get:
      summary: Test
      description: 'test'
      operationId: test
      responses:
        '200':
          schema:
            items:
              $ref: '#/definitions/myResponse'
          description: myResponse
definitions:
  myResponse:
    type: object
    properties:
      id:
        type: integer
        format: `int64'

Thanks,
Sree

@choiks14
Copy link

choiks14 commented Jan 4, 2022

same here

@gracekarina
Copy link
Contributor

this issue was addressed in this two prs: Branchs affected:
core 1.5: swagger-api/swagger-core#4109
parser v1: #1642

@SCSreekanth
Copy link
Author

@gracekarina - Now that this issue is closed, could you please let me know the parser version in which this issue will be fixed? Thanks
Sree

@gracekarina
Copy link
Contributor

@SCSreekanth we have a release scheduled in a couple of weeks.

@SCSreekanth
Copy link
Author

Any update on the jar release and its version.?

@gracekarina
Copy link
Contributor

gracekarina commented Feb 21, 2022

Hi @SCSreekanth parser was release last week, this fix is include in the last version 1.0.57 Swagger-parser 1.0.57 released!

@SCSreekanth
Copy link
Author

Thank you @gracekarina i’ll give it a try and let you know. Thanks for the quick turnaround on the issue. Much appreciated!! Cheers

  • Sree

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

3 participants