Ask a Question

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

Razshaz
New Contributor

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 2
HimanshuTayal
Community Hero

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

@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.

 


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
Razshaz
New Contributor

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

@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. 

cancel
Showing results for 
Search instead for 
Did you mean: