Forum Discussion

intouch-jamesc's avatar
6 years ago

JSON QName/namespace issues, leading to inferred schema creating one giant schema

I've been working on a test suite against a set of APIs (returning JSON), and the representation QNames don't match the URI of the endpoints (and all point to the app login page...)


The process that appears to have caused this, as far as I can tell:

  • Created a set of test cases
  • Tested without auth set up, so first calls redirected to the login page by mistake, this set up the QNames / Namespaces?
  • Fixed auth, no longer redirected
  • Attempting to infer a schema results for multiple endpoints results in one combined schema with all possible attributes (with a namespace pointing to the login page...)


Frustratingly, the Requests behave as expected (ie: the namespace changes based on the endpoint URL) and thus I can author the relevant schemas, but the test cases are stuck with the old redirect as a URL (which persists when cloning to try and fix it...). Any idea if there's a way to clear this cached information and fix the cases?


From some searching, this might be related to this old case?


1 Reply

  • Hello,


    This is the current by-design ReadyAPI behavior: the original URI, used when the request is submitted for the first time, is saved and used as the namespace for all the JSON->XML conversions, even if the URI of the request is changed later. 


    Please submit a ticket - the Support team will investigate the issue with inferred schemas, which the described behavior causes for you: