joolfe / postman-to-openapi

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

auth object not being parsed #264

Open guyappy opened 10 months ago

guyappy commented 10 months ago

Hi, I'm trying to run the following command: p2o postman_collection.json -f result.yml -o options.json

It's parsing everything correctly, including for example the 'servers' configuration. However the 'auth' object is not being parsed I think because I don't see anything for that in the result.yml . Did I misconfigure it?

My options.json file looks as follows:

{
  "info": {
    "title":  API",
    "version": "1.0",
    "description": "Description for the API Here"
  },
  "servers": [
    {
      "url": "https://redacted",
      "description": "Prod environment server"
    },
  ],
  "myCustomAuth": {
    "type": "http",
    "scheme": "basic",
    "description": "api key"
  },
  "myCustomAuth1": {
    "type": "http",
    "scheme": "basic",
    "description": "clientid"
  }
}
Valijonzoda commented 8 months ago

Remove the extra comma after the last element of the array "servers". A comma at the end of the array is not required