You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by "Martin Eppel (meppel)" <me...@cisco.com> on 2014/09/10 00:06:51 UTC

StratosAdmin.java / json schema validation

I am testing some new json definitions to StratosAdmin (for grouping) but it seems that any json input in the Rest APi (StratosAdmin.java) is validated against schema.xsd (see exception below) , my question is if there is


1.      A way to temporarily turn the validation off (for some testing purpose)

2.      In order to validate the new json definitions do they  have to be added manually to schema.xsd or is there a way to auto generate them ?

Thanks

Martin

RE: StratosAdmin.java / json schema validation

Posted by "Martin Eppel (meppel)" <me...@cisco.com>.
Ok,

Thanks 

Martin

-----Original Message-----
From: Akila Ravihansa Perera [mailto:ravihansa@wso2.com] 
Sent: Tuesday, September 09, 2014 6:32 PM
To: dev
Subject: Re: StratosAdmin.java / json schema validation

Hi Martin,

REST API schema validation was introduced with STRATOS-466. You can track the JIRA at [1]. I'm working on auto generating the schema from bean classes. But for now you can temporarily disable this by commenting out "schemaHandler" properties of beans defined in cxf-servlet.xml file at [2].


[1] https://issues.apache.org/jira/browse/STRATOS-466

[2] https://github.com/apache/stratos/blob/master/components/org.apache.stratos.rest.endpoint/src/main/webapp/stratos/WEB-INF/cxf-servlet.xml

Thanks.

On Wed, Sep 10, 2014 at 3:36 AM, Martin Eppel (meppel) <me...@cisco.com> wrote:
> I am testing some new json definitions to StratosAdmin (for grouping) 
> but it seems that any json input in the Rest APi (StratosAdmin.java) 
> is validated against schema.xsd (see exception below) , my question is 
> if there is
>
>
>
> 1.      A way to temporarily turn the validation off (for some testing
> purpose)
>
> 2.      In order to validate the new json definitions do they  have to be
> added manually to schema.xsd or is there a way to auto generate them ?
>
>
>
> Thanks
>
>
>
> Martin



--
Akila Ravihansa Perera
Software Engineer, WSO2
Committer & PMC Member, Apache Stratos

Blog: http://ravihansa3000.blogspot.com

Re: StratosAdmin.java / json schema validation

Posted by Akila Ravihansa Perera <ra...@wso2.com>.
Hi Martin,

REST API schema validation was introduced with STRATOS-466. You can
track the JIRA at [1]. I'm working on auto generating the schema from
bean classes. But for now you can temporarily disable this by
commenting out "schemaHandler" properties of beans defined in
cxf-servlet.xml file at [2].


[1] https://issues.apache.org/jira/browse/STRATOS-466

[2] https://github.com/apache/stratos/blob/master/components/org.apache.stratos.rest.endpoint/src/main/webapp/stratos/WEB-INF/cxf-servlet.xml

Thanks.

On Wed, Sep 10, 2014 at 3:36 AM, Martin Eppel (meppel) <me...@cisco.com> wrote:
> I am testing some new json definitions to StratosAdmin (for grouping) but it
> seems that any json input in the Rest APi (StratosAdmin.java) is validated
> against schema.xsd (see exception below) , my question is if there is
>
>
>
> 1.      A way to temporarily turn the validation off (for some testing
> purpose)
>
> 2.      In order to validate the new json definitions do they  have to be
> added manually to schema.xsd or is there a way to auto generate them ?
>
>
>
> Thanks
>
>
>
> Martin



-- 
Akila Ravihansa Perera
Software Engineer, WSO2
Committer & PMC Member, Apache Stratos

Blog: http://ravihansa3000.blogspot.com