joolfe / postman-to-openapi

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

Parsing non-json raw body results in a syntax error #153

Closed MilyMilo closed 2 years ago

MilyMilo commented 2 years ago

Hey, thanks for the work on this tool - it looks like it will save us a lot of time.

When parsing one of our collections I've encountered a Syntax Error - where it could not parse JSON. After investigating I found that if there's request body, it is assumed to be JSON, where it could also be a raw text value. JSON parsing fails for that reason.

I've developed a fix which I will PR in a moment.

joolfe commented 2 years ago

Already merged