joolfe / postman-to-openapi

🛸 Convert postman collection to OpenAPI
MIT License
577 stars 99 forks source link

Error parsing response example "200 OK" #260

Closed jheyer159 closed 11 months ago

jheyer159 commented 1 year ago

Tried converting this api: https://api.iqm.com/

exported it from postman as v2.1

ran this: p2o ./IQM\ APIs.postman_collection.json

and got this back: Error: Error parsing response example "200 OK"

joolfe commented 11 months ago

Hi @jheyer159,

After debug indeed there is an error in the JSON example of request "Get Contextual Audience Details", the json response is this one:

{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample audience name",
        "status": "Pending",
        "type": 5,
        "includedCount": 0,
        "excludedCount": 0,
        "createdOn": 1640694104,
        "organizationName": "Sample organization name"
        "owId": 1,
        "createdByUowId": 2,
        "createdByUser": "Sample username",
        "uniques": 0,
        "keywords": "vaccine mandate, fauci, make mandate, delta variant, COVIDIOT, covid vaccine booster",
        "urls": null,
        "startDate": 1639872000,
        "endDate": 1640085173,
        "editAccess": true
    }
}

If you see there are a missing comma after this line "organizationName": "Sample organization name" that's why the parsing is failing.

Best Regards