joolfe / postman-to-openapi

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

x-www-form-urlencoded type bodies not converted to openAPI format #141

Closed Vibhav1999 closed 3 years ago

Vibhav1999 commented 3 years ago

Hello,

I noticed recently while trying to create documentation for a project of mine that any postman request bodies of the type 'x-www-form-urlencoded' are not listed in the request body of my API routes in the yml collection file. Normal form-data body types are getting converted and listed just fine.

As you can see here is the postman-collection.json file with the urlencoded body type specified

"body": { "mode": "urlencoded", "urlencoded": [ { "key": "couponTransactionId", "value": "24232", "type": "text" } ] }, But in the yml file generated there is no mention of the request body contents

requestBody: content: {}

Vibhav1999 commented 3 years ago

Sorry about the poor formatting of the json and yml objects, Im unfamiliar with github's comment functionality.

joolfe commented 3 years ago

Hi @Vibhav1999,

First of all please ensure you are using version 1.15.0 or higher, the type x-www-form-urlencoded is supported since version 1.15.0, you can see the test for collection version 2 and version 2.1 and here is the result of the parsing for both version and all test are passing correctly so maybe something else in your collection, if you attach the collection file we can debug the problem.

Best Regards

Vibhav1999 commented 3 years ago

Hi,

Thank you for your prompt response. I will check the version and see if there are any syntax issues on my end and let you know.

Thank you

Vibhav1999 commented 3 years ago

Hello,

Updating the library has solved the issue. I thought I was running the most current version but when I pulled code from a repository it must have hade an older version of your library. Thank you for your help.

Regards