<#ftl output_format="JSON"> <#-- newGroup: The macro for generating view and template metadata for a new Interface --> <#macro newInterface request uuid name description formTitle ruleFolderUuid cdt showNonGeneratedPk> { <#-- recipe section --> "objectStatus": "NEW", "replaceable": true, "recipeObjectId": "INTERFACE-0", "templateForCreate": "createInterface.ftlx", <#-- bindings section --> "uuid": "${uuid}", "versionUuids": ["${request.generateUuid("INTERFACE_VERSION")}"], "parentUuid": "${ruleFolderUuid}", "cdtName": "${cdt.name}", "namespace": "${cdt.typeNamespace}", "fields": [ <#list request.getTargetObject().fields.recordSourceFields as field> <#if !field.properties.isPrimaryKey || (showNonGeneratedPk && !field.properties.generated)> { "name": "${field.name?json_string}", "friendlyName": "${field.properties.friendlyName?json_string}", "required": ${field.properties.nillable?string('false', 'true')}, <#if field.properties.lengthLimit?has_content> "lengthLimit": ${field.properties.lengthLimit}, "type": { "xsdType": "${field.properties.type.xsdType}" } <#if field?has_next> }, <#else> } ], <#-- i18n section --> "name": "${name?json_string}", "description": "${description?json_string}", "formTitle": "${formTitle?json_string}", "interfaceSubmitButtonLabel": "${request.getTextWithKey("recordActionTemplateRecipe.object.interface.submit.button")?json_string}", "interfaceCancelButtonLabel": "${request.getTextWithKey("recordActionTemplateRecipe.object.interface.cancel.button")?json_string}" }