0

I am able to integrate swagger yaml file with QAF and able to make changes to xml and get the tests running.

But test step @QAFTestStep(description = "validate {requestCall} response with schema") I am verifying this for a Get request but this step gives me following error but for a POST method on a different endpoint.

Unable to load API spec from provided URL or payload:

  • attribute paths.'/differentendpoint'(post).responses.400.content.examples.Example name Invalid Request Body doesn't adhere to regular expression ^[a-zA-Z0-9.-_]+$

Any help will be appreciated.

Thanks, Rohini

user861594
  • 5,733
  • 3
  • 29
  • 45
  • can you share detailed request call and response log, it looks response is `400` (Bad Request) and trying to validate schema for successful response. – user861594 Aug 09 '22 at 19:34
  • This is not the response value i have got for my request. Also in the error its pointing to wrong endpoint. I suspect there is fomatting issue with yaml file hence its showing this. This error is pointing to lines from yaml file not from response. I am changing that and trying. Will post if any success. – Rohini gopal- Aug 10 '22 at 08:26

1 Answers1

0

It looks that the example(s) provided for response in specification document (yaml file) doesn't follows schema. You can just remove example(s) for the response from yaml file and give it try. It should work without any issue!

user861594
  • 5,733
  • 3
  • 29
  • 45