Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

TypeError: Cannot read property 'entries' of undefined #120

Closed
justinyoo opened this issue Jul 13, 2021 · 4 comments
Closed

TypeError: Cannot read property 'entries' of undefined #120

justinyoo opened this issue Jul 13, 2021 · 4 comments

Comments

@justinyoo
Copy link

Possibly related to #61

When I'm running the p2o CLI to convert a Postman collection to OpenAPI document, it throws an error:

TypeError: Cannot read property 'entries' of undefined

I'm using the latest version, 1.12.1 and Notion's Postman collection.

As I'm new to the Postman collection, I have no idea where to look for. I just assume that the collection itself should be working.

@joolfe
Copy link
Owner

joolfe commented Jul 14, 2021

HI @justinyoo,

I have test downloading the collection from the URL that you provide https://www.postman.com/notionhq/workspace/notion-s-public-api-workspace/overview and works fine for me using 1.12.1, could you attach here in github the collection that you are using, just to test exactly what you are doing?

Best Regards.

@joolfe
Copy link
Owner

joolfe commented Jul 14, 2021

p2oTestNotionAPI2.mp4

Here you see the step that I follow to try to reproduce, but no error.

@joolfe
Copy link
Owner

joolfe commented Jul 15, 2021

HI @joolfe closed due to inactivity

@joolfe joolfe closed this as completed Jul 15, 2021
@justinyoo
Copy link
Author

@joolfe Oops! I've been further digging down what has caused this error.

I was able to convert the Postman collection when download it directly from the web UI.

However, if I use the curl command, it has caused the error.

curl "https://api.getpostman.com/collections/<collection-id>?apikey=<api-key>" > notionapi.json 

When I downloaded the collection through the API, the collection has another wrapper attribute called collection. I suspect this causes the error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants