Forum Discussion

Razshaz's avatar
Razshaz
New Contributor
4 years ago

Rest API response different for same Get request in swagger and SOAP UI

When I do a Get response in Swagger and SOAP UI the responses are different. The JSON response for SOAPI UI is:

"value": {
"@type": [
"GeographicAddress",
"GeographicAddress"
],
"atType": "GeographicAddress",

Swagger :

"value": {
"@type": "GeographicAddress",
"atType": "GeographicAddress",

 

End points used are same in both the cases and apart from Basic authentication no other parameter used.

2 Replies

  • Razshaz :

     

    I suppose the response which is displaying via soapui is correct because if @type contains more than 1 value than it should be inside square bracket('[ ]') which denotes that it is a Array.

    Don't know about Swagger as it majorly used for API Documentation, you can check in Postman or other API Testing tool for more clarity.

     

    • Razshaz's avatar
      Razshaz
      New Contributor

      HimanshuTayal Thanks for quick reply.

      I am getting the same response in my automation script(RobotFramework) as SOAP UI. But the expected output is the one shown in Swagger.