<#ftl output_format="JSON"> <#-- newRecordViewInterface: The macro for generating view and template metadata for a new Record View Interface --> <#macro newRecordViewInterface request uuid name description ruleFolderUuid> { <#-- recipe section --> "objectType": "INTERFACE", "objectStatus": "NEW", "replaceable": false, "recipeObjectId": "INTERFACE-0", "templateForCreate": "createRecordViewInterface.ftlx", <#-- bindings section --> "uuid": "${uuid}", "versionUuids": ["${request.generateUuid("INTERFACE_VERSION")}"], "parentUuid": "${ruleFolderUuid}", "recordUuid": "${request.getTargetObject().uuid}", "recordName": "${request.getTargetObjectNameWithoutPrefix()?json_string}", "fields": [ <#assign nonPKFields=request.getTargetObject().fields.recordSourceFields?filter(f->!f.properties.isPrimaryKey)> <#list nonPKFields as field> { "name": "${field.name?json_string}", "friendlyName": "${field.properties.friendlyName?json_string}", "type": "${field.type.type}", "uuid": "${field.uuid}" <#if field?has_next> }, <#else> } ], <#-- i18n section --> "name": "${name?json_string}", "description": "${description?json_string}", "i18n": { "booleanYes": "${request.getTextWithKey("recordViewTemplateRecipe.object.interface.booleanField.yes")?json_string}", "booleanNo": "${request.getTextWithKey("recordViewTemplateRecipe.object.interface.booleanField.no")?json_string}" } }