postman-to-openapi
postman-to-openapi copied to clipboard
feature: transformation for array in the response
Hello!
I'm trying to convert a postman collection to an openapi file and I have seen the following mistake.
I have the following request/response:

The response body is an array but when I convert this collection to an openapi, I see the following code:
/students:
get:
tags:
- default
summary: GET /students
parameters:
- name: Content-Type
in: header
schema:
type: string
example: application/json
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
examples:
example-0:
summary: GET /students
value:
- id: 808508
name: test
studentNumber: 597928475
email: [email protected]
example-1:
summary: GET /students (no students)
value: []
I think that the schema of this response should be of array type, right?
Thanks
Hi @sarajcarbajal,
That's not supported by the library in this moment, only detect that the response is JSON and set object as type. Could be a feature request ;-)
Best regards