VMware Networking Community
vPackets
Contributor
Contributor

Import NSX-T 2.5 API Collection into Postman doesn't work

Hi Guys.

With VMware 2.4 we were able to import the API collection into postman but it looks like it doesn't work "out of the box" with NSX-T 2.5

When we import the yaml file from the NSX-T manager into Postman, it complains that there is a problem importing Swagger.

"Error while importing Swagger 2.0: Could not import"

Rutger suggested to fix the YAML file using his custom script and import it back into postman but I am still running into issues.

nsx-t/fix_oas.py at master · rutgerblom/nsx-t · GitHub

Can you guys have a look and let us know ?

Looking forward to getting this resolved as this will help a lot of people automating their deployment/operations/day to day job .

Nicolas

0 Kudos
4 Replies
daphnissov
Immortal
Immortal

Since he's the one who made that Python script, why don't you just open an incident on his GitHub repo and ask?

0 Kudos
vPackets
Contributor
Contributor

I am not looking at VMware to fix the script. I am just looking for them to fix their YAML file so that it's fully compatible with one of the mostly used Collaboration Platform for API Development.

What do you think ? Is that a fair statement ?

0 Kudos
mauricioamorim
VMware Employee
VMware Employee

It is not about fixing the YAML file, as the YAML file just describes the APIs implemented. So a fix would require changing APIs, which is not something simple. As Rutger pointed out in his blog: "This is due to NSX-T OpenAPI specification not being totally compliant with the OpenAPI specification and Postman becoming less forgiving about this in newer versions."

The script that was shared removed the portions of the API not fully compliant with OpenAPI so that Postman could import it. I haven't tested it with 2.5 yet, but there might be some adjustments to be done on the script. One other way is to use an older version of Postman (only newer versions have a stricter check for this compliance) or just another API Client.

I know Postman is probably the most popular one and this has been reported so that this somehow gets fixed in the future, but it's just not that simple.

0 Kudos
DaleCoghlan
VMware Employee
VMware Employee

There is now a KB article about this

VMware Knowledge Base