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

TypeError: Cannot read properties of undefined (reading 'reduce') #217

Closed
Mehrdad-Dadkhah opened this issue Sep 17, 2022 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@Mehrdad-Dadkhah
Copy link

Hi

npm i postman-to-openapi -g

changed 7 packages, and audited 8 packages in 15s

found 0 vulnerabilities
npm notice 
npm notice New minor version of npm available! 8.3.1 -> 8.19.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.19.2

p2o postman_collection.json -f result.json

TypeError: Cannot read properties of undefined (reading 'reduce')

this is my "postman_collection.json" (rename ext to txt only)
postman_collection.txt

@joolfe
Copy link
Owner

joolfe commented Sep 17, 2022

Hi @Mehrdad-Dadkhah,

The problems is because some of the request doesn´t have the header parameter, reviewing the schema https://schema.postman.com/collection/json/v2.1.0/draft-04/collection.json seems like header is not mandatory so I have add the support for that in version 2.6.2

@joolfe joolfe closed this as completed Sep 17, 2022
@joolfe joolfe self-assigned this Sep 17, 2022
@joolfe joolfe added the bug Something isn't working label Sep 17, 2022
@Mehrdad-Dadkhah
Copy link
Author

Hi @joolfe Thanks for answer

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants