cancel
Showing results for 
Search instead for 
Did you mean: 

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

Highlighted
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
Community Leader

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

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors