Hi Sachithra, If I'm not mistaken, I don't think it is possible to add a comment in the template that will appear in the output. I myself tried several approaches but still didn't work. Might be able to add it programmatically.
Also what would be the use case for having a comment in template output ? Thanks, Viduranga. On Wed, Jun 13, 2018 at 2:39 PM Sachithra Dangalla <sachit...@wso2.com> wrote: > Hi all, > > Continuing on a similar question, is there a way to add visible comments > in the output of the velocity template? [1] denotes only the comments in > the velocity template. > > [1] - http://velocity.apache.org/engine/1.7/vtl-reference.html#comments > > Thanks, > Regards, > > On Wed, Jun 13, 2018 at 12:45 PM Sachithra Dangalla <sachit...@wso2.com> > wrote: > >> Thanks Rajith. >> >> Regards, >> >> On Wed, Jun 13, 2018 at 11:39 AM Rajith Roshan <raji...@wso2.com> wrote: >> >>> Hi >>> You can read the additional properties like in [1] >>> >>> [1] - $apiObj.additionalProperties.get('property_name') >>> >>> On Wed, Jun 13, 2018 at 10:47 AM Sachithra Dangalla <sachit...@wso2.com> >>> wrote: >>> >>>> Hi all, >>>> >>>> I'm trying to filter out handlers to be executed for an API based on a >>>> custom property which set during API publishing (when setting API >>>> properties in "Manage" section). In order to add a condition in the >>>> velocity template, I need to read the properties set for the API. Other >>>> variables could be read by using variables such as "$!apiVersion", >>>> "$isSoapToRestMode", "$resource.getUriTemplate()" etc. How can I read the >>>> list of properties from velocity template? >>>> >>>> Thanks, >>>> Regards, >>>> -- >>>> >>>> *Sachithra Dangalla* >>>> Software Engineer >>>> WSO2 Inc. http://wso2.com >>>> Blog: http://comexile.blogspot.com >>>> Mobile : +94 71 3700 656 >>>> _______________________________________________ >>>> Dev mailing list >>>> Dev@wso2.org >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>> >>> >>> -- >>> Rajith Roshan >>> Senior Software Engineer, WSO2 Inc. >>> Mobile: +94-717-064-214 >>> >> >> >> -- >> >> *Sachithra Dangalla* >> Software Engineer >> WSO2 Inc. http://wso2.com >> Blog: http://comexile.blogspot.com >> Mobile : +94 71 3700 656 >> > > > -- > > *Sachithra Dangalla* > Software Engineer > WSO2 Inc. http://wso2.com > Blog: http://comexile.blogspot.com > Mobile : +94 71 3700 656 > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > -- Regards*,* *Viduranga Gunarathne* *Software Engineer* *WSO2 (Pvt) Ltd.* *Mobile : *+94712437484 *Email : *vidura...@wso2.com *Web : *http://wso2.com *Blog : *http://medium.com/vlgunarathne <http://wso2.com/signature>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev