joolfe / postman-to-openapi

🛸 Convert postman collection to OpenAPI
MIT License
596 stars 104 forks source link

Cannot read property 'entries' of undefined #150

Closed d3ep4k closed 2 years ago

d3ep4k commented 2 years ago

Cannot read property 'entries' of undefined at postmanToOpenApi (/node_modules/postman-to-openapi/lib/index.js:26:34)

Used the below collection https://github.com/api-evangelist/swagger/blob/master/swagger-petstore-v2-postman-collection.json

I'm getting this error in some of the files I tested. Thanks for making this tool. :) Hope this helps.

joolfe commented 2 years ago

HI @d3ep4k,

This collection is in format "Collection v1" that is deprecated by postman and not supported by postman-to-openapi. You can import the collection into postman and save as a v2 or v2.1 (recommended) to make it works.

Best Regards,