Tuesday, 10 September 2013

Are separate request and response XSDs required for an XML rest API?

Are separate request and response XSDs required for an XML rest API?

We are building a rest api that can support requests in both json or xml.
We are also asked to build XSDs to validate the xml. Are we supposed to
write two different XSDs, one for the request XML and the second for the
response XML?
Assuming I have the following resource with GET and POST methods on it:
/questions/
The GET will return all the questions while a POST will create a question.
Do I need 4 XSDs for the above case?
XSD for GET request
XSD for GET response
XSD for POST request
XSD for POST response

No comments:

Post a Comment