Forum Discussion
richie : Thanks for your reply. Again I will try to explain. it seems that when I try to take the ID(property) from post method then only I am getting the error if I am just passing the ID directly hardcoded I am not getting the error.
Let me write my workflow
step1: I called my POST method with some data to upload that return successfully with no error.
Step2: I tried to GET that data based on the unique Id which is generated by the POST method as suggested by you I used the value POST response Id in GET method.
Error in the step: Swagger Compliance Assertion -> No resource that matches the OpenAPI definition.
Same with the DELETE as I explained in previous comments I am getting 405 when choosing the ID from response of post otherwise if we are passing the ID directly we are not getting 405.
I am also attaching screenshots so that you have a better understanding.
Regards
Asad
No updates on my previous reply yet. If someone has any idea please reply.
- ChrisAdams4 years agoChampion Level 3
Hi,
If it works when you 'hard-code' the id but does not when you 'pull' the value in from a different step, then I can only think something about the second way is wrong.
richie mentioned that the error number looked odd, e.g. you usually expect a 500 if you pass in an invalid value/payload. The error is actually a Swagger error. Now, I have haven't used Swagger beyond creating an account, but it's Swagger saying "No resource that matches the OpenAPI definition". In other words, it looks like your request is malformed, incorrect, or calling the wrong method etc. when you pull the value in.
Did you try what I suggested above? SoapUI request steps have a 'raw' tab which shows exactly what SoapUI sent to the API. Compare what is in the raw tab after sending hard-coded value against what is in the raw tab when you automate.
- AsadGilani4 years agoOccasional Contributor
ChrisAdams: Thanks for your time. Yes, I looked into the raw request. You were right the value in the URL is not passing correctly but the question is why it is not passing correctly?
I am attaching the raw request with hardcoded and with the selecting property both.
So, now our aim is why it is not sending the correct values when we are selecting from the post method.- ChrisAdams4 years agoChampion Level 3
Hi,
Without access as to you test or API, it's really difficult now to help further, sorry. But, at least you now know why you're getting the Swagger error.
Related Content
- 6 years ago