<#ftl output_format="JSON"> <#-- The macro for generating template metadata for a new webapi --> <#macro newWebApi request recipeObjectId uuid name description urlAlias httpMethod queryparameters body adminGroupUuid viewerGroupUuid ruleContentsTemplateFile recordUuid triggers=""> { <#-- recipe section --> "version": 2, "objectType": "WEB_API", "replaceable": false, "recipeObjectId": "${recipeObjectId}", "objectStatus": "NEW", "templateForCreate": "/ix/v2/createWebApi_v2.ftlx", "selectedObjectIndex": 0, "isVisible": true, <#if triggers?has_content> "triggers": ${triggers}, <#-- the set of new and reused objects --> "objects": [ { "objectStatus": "NEW", "templateObjectId": "${recipeObjectId}-0", "objectIndex": 0, <#-- bindings section --> "uuid":"${uuid}", "versionUuids":["${uuid}"], "queryparameters": [ <#list queryparameters as queryparameter> "${queryparameter}" <#if queryparameter?has_next> , ], "body": "${body}", "urlAlias": "${urlAlias}", "httpMethod": "${httpMethod}", "adminGroupUuid": "${adminGroupUuid}", "viewerGroupUuid": "${viewerGroupUuid}", "ruleContentsTemplateFile": "${ruleContentsTemplateFile}", <#-- i18n section --> "name": "${name}", "description": "${description?json_string}", "recordUuid": "${recordUuid}", "httpResponseComment": "${request.getTextWithKey("recordTypePartialSyncWebApiTemplateRecipe.codeComments.httpResponse")?json_string}", "httpHeaderComment": "${request.getTextWithKey("recordTypePartialSyncWebApiTemplateRecipe.codeComments.httpHeaderComment")?json_string}", "responseBodyComment": "${request.getTextWithKey("recordTypePartialSyncWebApiTemplateRecipe.codeComments.responseBodyComment")?json_string}", "updatedOrInserted": "${request.getTextWithKey("recordTypePartialSyncWebApiTemplateRecipe.codeComments.updatedOrInserted")?json_string}", "defaultErrorResponse": "${request.getTextWithKey("recordTypePartialSyncWebApiTemplateRecipe.codeComments.defaultErrorResponse")?json_string}" } ] }