Hi Sohani, This looks fine. +1 for this approach.
Thanks, Nuwan On Wed, May 18, 2016 at 9:49 AM, Sohani Weerasinghe <[email protected]> wrote: > > > > Sohani Weerasinghe > Software Engineer > WSO2, Inc: http://wso2.com > > Mobile : +94 716439774 > Blog :http://christinetechtips.blogspot.com/ > Twitter : https://twitter.com/sohanichristine > > On Wed, May 18, 2016 at 9:48 AM, Sohani Weerasinghe <[email protected]> > wrote: > >> Hi All, >> >> If we consider $subject, we need to wrap with a root element when >> generating the json schema for that json payload. >> >> { "tasklist_id": "12345" } >> >> Shall we wrap with an element called 'root' ? WDYT? >> >> If so, the generated tree and the schema will be as follows >> >> { >> "$schema" : "http://json-schema.org/draft-04/schema#", >> "id" : "http://wso2jsonschema.org", >> "title" : "*root*", >> "type" : "object", >> "properties" : { >> "tasklist_id" : { >> "id" : "http://wso2jsonschema.org/tasklist_id", >> "type" : "string" >> } >> } >> } >> >> >> >> >> Thanks, >> Sohani >> Sohani Weerasinghe >> Software Engineer >> WSO2, Inc: http://wso2.com >> >> Mobile : +94 716439774 >> Blog :http://christinetechtips.blogspot.com/ >> Twitter : https://twitter.com/sohanichristine >> > > -- ---------------------------------------------------------- *Nuwan Chamara Pallewela* *Software Engineer* *WSO2, Inc. *http://wso2.com *lean . enterprise . middleware* Email *[email protected] <[email protected]>* Mobile *+94719079739@*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
