It’s actually quite common to use Swagger JSON v2 declarations to import REST services and start interacting with them.
For example to start testing Oracle Commerce Cloud v16.1 REST services, you just have to download this JSON from the public documentation and start playing with your OCC instance.
Unfortunately for WebSphere Commerce is not so easy.
You can use the standard Swagger interface available with WebSphere Commerce developer (remember to access it on http only and pushing the Explore button – Thanks Kevin Dillard for helping me)
to download JSON declarations for every service one by one (not so friendly).
A quick tip about Swagger UI: if you want to get Search API declarations instead of Commerce runtime API, please change the base URL to http://localhost/search/resources/api and press Explore
If you’re just specifying Swagger UI URL and hit Enter, a https redirection will be forced and Swagger UI cannot be accessed with recent Chrome or Firefox versions because of a missing CORS configuration on WebSphere Commerce (CORS issues will be solved soon with JR55289 fix, a back port for v7 of v8 CORS mentioned by Bob Balfe in his post)
In summary there isn’t a swagger.json file publicly available for download and the Swagger version used by WebSphere Commerce v7 is still 1.2 (please vote for my RFE to upgrade it to v2).
Then I had to open a PMR (25672,756,000: thank you Steve Boggs) and ask to the support for the procedure to create a Swagger file and upgrade it to v2. After some back and forth where our Commerce Technology Advocate helped too, we finally generated a valid v2 Swagger JSON file for runtime and search server
Swagger.json for WebSphere Commerce v7 FEP8 runtime
Swagger.json for WebSphere Commerce v7 FEP8 search
You just have load it on your preferred tool and start testing WebSphere Commerce REST interface
“we finally generated a valid v2 Swagger JSON file for runtime and search server”
But how you did it? Can you decribe process or made tutorial. It is a very actual problem. Even for WebSphere Commerce v8.
Would you be able to share the steps followed to generate a valid v2 swagger json file from the swagger UI version 1.2?