Forum Discussion
I'll admit, I have not used swagger so I am not familiar with this particular method. Is it okay if I download the xml response and use that to fuel an XML datasource and write the script from there? I also do not see anything in the provided response that differentiates between cats and dogs
Digging a little deeper, it looks like there are three distinct ID values. 0, 5, and 55. I missed that at first, because the data I saw is mostly 0's so I lost the 5 and 55.
Hi groovyguy , these are great valid questions!
So, to tell cats from dogs, you can use Tags. Since this is an open database, a lot of pets added there have no Tags. So, you can go ahead and add a couple of pets with Tags to it to be sorted using the POST/ pet method (https://petstore.swagger.io/#/pet/addPet)
DataSink is supposed to work with DataSource, so the DataSource test step will use Petstore's response as a data source, while the DataSink script will handle each pet.
I hope this clarifies things a bit🙂 Let me know if more clarification is required🙂
- HimanshuTayal5 years agoCommunity Hero
sonya_m :
I was trying to access the above link posted in original question but it is showing me some error could you please check.
https://petstore.swagger.io/v2/pet/findByStatus?status=available
- sonya_m5 years agoSmartBear Alumni (Retired)
Hi HimanshuTayal ! I just checked this link: https://petstore.swagger.io/v2/pet/findByStatus?status=available
It is working for me in Chrome and Edge. Could it be a temporary issue?
Related Content
- 5 years ago
Recent Discussions
- 7 days ago