Re: Validating Inputs to REST API

2014-05-06 Thread Nirmal Fernando
Hi Pradeep, XSD schema seems validating only few levels of the policy files. Is there any reason for not validating full config? On Tue, Apr 29, 2014 at 10:47 AM, Pradeep Fernando wrote: > Hi Akila, > > > On Mon, Apr 28, 2014 at 1:24 PM, Akila Ravihansa Perera < > raviha...@wso2.com> wrote: > >

Re: Validating Inputs to REST API

2014-04-28 Thread Pradeep Fernando
Hi Akila, On Mon, Apr 28, 2014 at 1:24 PM, Akila Ravihansa Perera wrote: > Hi Pradeep, > > I have some concerns regarding the schema. > > 1. In partition deployment, do we really need to make it mandatory to > include partitionMin and partitionMax? > IMO, minOccurs should be 0 for these two prop

Re: Validating Inputs to REST API

2014-04-28 Thread Akila Ravihansa Perera
Hi Pradeep, I have some concerns regarding the schema. 1. In partition deployment, do we really need to make it mandatory to include partitionMin and partitionMax? IMO, minOccurs should be 0 for these two properties since this can be overridden in the deployment definition 2. What is the need fo

Re: Validating Inputs to REST API

2014-04-23 Thread Pradeep Fernando
Hi devs, Now the API spits error messages irrespective of the backend exception. It sends the JSON error message even if there is an Nullpointer in our backend. Writing a exception mapper for throwable did the trick. Here is the schema I came up with for validating input. I derived it from the sa

Validating Inputs to REST API

2014-04-17 Thread Pradeep Fernando
Hi Devs, I started on the $subject, since there was a issue marked as critical. https://issues.apache.org/jira/browse/STRATOS-466 (patch attached) I was able to provide a fix. Now the incoming messages (JSON) are validated against xmlSchema file that we provide and if there is an exception while