You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've an openapi spec generated using Stoplight which i am not able to import in postman. I found out that Postman internally uses this library to convert openapi to postman representation.
Following error is obtained by using this library.
TypeError: Cannot read property 'hasOwnProperty' of undefined
at Object.getExampleData (/node_modules/openapi-to-postmanv2/lib/schemaUtils.js:782:17)
at Object.convertToPmBodyData (/node_modules/openapi-to-postmanv2/lib/schemaUtils.js:836:23)
at Object.convertToPmResponseBody (/node_modules/openapi-to-postmanv2/lib/schemaUtils.js:718:25)
at Object.convertToPmResponse (/node_modules/openapi-to-postmanv2/lib/schemaUtils.js:1336:32)
at _.forOwn (/node_modules/openapi-to-postmanv2/lib/schemaUtils.js:1635:34)
at /node_modules/openapi-to-postmanv2/node_modules/lodash/lodash.js:4905:15
at baseForOwn (/node_modules/openapi-to-postmanv2/node_modules/lodash/lodash.js:2990:24)
at Function.forOwn (/node_modules/openapi-to-postmanv2/node_modules/lodash/lodash.js:13014:24)
at Object.convertRequestToItem (/node_modules/openapi-to-postmanv2/lib/schemaUtils.js:1604:9)
at Object.convertChildToItemGroup (/node_modules/openapi-to-postmanv2/lib/schemaUtils.js:614:19)
It seems the issue is due to empty examples section which Stoplight produces.
get:
summary: Some API
responses:
'200':
description: Some description
content:
application/json:
schema:
type: array
items:
type: string
examples: { }
I was able to import the spec after i removed the empty examples section.
Anyway it should work with empty examples section, hence a bug.
The text was updated successfully, but these errors were encountered:
I've an openapi spec generated using Stoplight which i am not able to import in postman. I found out that Postman internally uses this library to convert openapi to postman representation.
Following error is obtained by using this library.
It seems the issue is due to empty examples section which Stoplight produces.
I was able to import the spec after i removed the empty examples section.
Anyway it should work with empty examples section, hence a bug.
The text was updated successfully, but these errors were encountered: