Skip to content

Descriptor Schemas

Application descriptor

Schema

URL: https://docs.enhanced-mule.com/schemas/emule-application-1.0.schema.json

{
  "$schema": "https://json-schema.org/draft/2019-09/schema#",
  "$id": "https://docs.enhanced-mule.com/schemas/emule-application-1.0.schema.json",
  "title": "Enhanced Mule Application",
  "description": "Application deployment and provisioning data",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/definitions/application"
    }
  ],
  "definitions": {
    "application": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Application id (defaults to maven artifact id)"
        },
        "version": {
          "type": "string",
          "description": "Application version (defaults to maven artifact id)"
        },
        "name": {
          "type": "string",
          "description": "Application name (defaults to maven artifact name)"
        },
        "description": {
          "type": "string",
          "description": "Application description (defaults to maven artifact description)"
        },
        "api": {
          "$ref": "#/definitions/api"
        },
        "client": {
          "type": "object",
          "description": "API Client application (will be auto-created if this object exists)",
          "properties": {
            "name": {
              "type": "string",
              "description": "Client application name (defaults to "
            },
            "description": {
              "type": "string",
              "description": "Client application description"
            },
            "url": {
              "type": "string",
              "description": "Client application URL"
            },
            "clientIdProperty": {
              "type": "string",
              "description": "Name of property that will be injected with client id",
              "default": "anypoint.api.client.id"
            },
            "clientSecretProperty": {
              "type": "string",
              "description": "Name of property that will be injected with client secret",
              "default": "anypoint.api.client.secret"
            },
            "injectClientIdSec": {
              "type": "boolean",
              "description": "Indicates if client id and secret properties should be injected",
              "default": true
            },
            "access": {
              "type": "array",
              "description": "API this client application should be granted access to",
              "items": {
                "type": "object",
                "properties": {
                  "assetId": {
                    "type": "string",
                    "description": "API asset id"
                  },
                  "groupId": {
                    "type": "string",
                    "description": "API asset group id"
                  },
                  "orgId": {
                    "type": "string",
                    "description": "API asset org id"
                  },
                  "env": {
                    "type": "string",
                    "description": "Environment name or id"
                  },
                  "assetVersion": {
                    "type": "string",
                    "description": "API asset version"
                  },
                  "label": {
                    "type": "string",
                    "description": "API label"
                  },
                  "slaTier": {
                    "type": "string",
                    "description": "SLA tier"
                  }
                },
                "required": [
                  "assetId"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [],
          "unevaluatedProperties": false
        },
        "deploymentParams": {
          "$ref": "#/definitions/deploymentParams"
        },
        "overrides": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "Indicate if the override applies to a specific environment or an environment type",
                "enum": ["env","envType"]
              },
              "value": {
                "type": "string",
                "description": "Environment name or type"
              },
              "override": {
                "$ref": "#/definitions/application"
              }
            },
            "required": ["type","value","override"]
          }
        }
      },
      "required": [],
      "unevaluatedProperties": false
    },
    "api": {
      "properties": {
        "asset": {
          "type": "object",
          "properties": {
            "groupId": {
              "type": "string",
              "description": "API specification exchange group id (defaults to org id)"
            },
            "id": {
              "type": "string",
              "description": "API specification exchange artifact id (defaults to application artifact id + '-spec')"
            },
            "version": {
              "type": "string",
              "description": "API specification exchange artifact version",
              "default": "1.0.0"
            },
            "apiVersion": {
              "type": "string",
              "description": "API specification version"
            },
            "name": {
              "type": "string",
              "description": "API specification asset name (defaults to application name)"
            },
            "description": {
              "type": "string",
              "description": "API specification asset name (defaults to application description)"
            },
            "tags": {
              "type": "array",
              "description": "Arrays of exchange asset tags",
              "items": {
                "type": "string"
              }
            },
            "portal": {
              "type": "object",
              "properties": {
                "pages": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "allOf": [
                      {
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Portal page name"
                          }
                        },
                        "required": [
                          "name"
                        ]
                      },
                      {
                        "oneOf": [
                          {
                            "properties": {
                              "path": {
                                "type": "string",
                                "description": "Portal page name"
                              }
                            },
                            "required": [
                              "path"
                            ]
                          },
                          {
                            "properties": {
                              "content": {
                                "type": "string",
                                "description": "Portal page content"
                              }
                            },
                            "required": [
                              "content"
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  "required": [],
                  "unevaluatedProperties": false
                }
              },
              "required": [],
              "unevaluatedProperties": false
            },
            "categories": {
              "type": "object",
              "description": "Categories",
              "patternProperties": {
                ".*": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "List of category value"
                }
              }
            },
            "fields": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Field key"
                  },
                  "value": {
                    "type": "string",
                    "description": "Field key"
                  },
                  "required": {
                    "type": "boolean",
                    "description": "Field required",
                    "default": false
                  }
                },
                "required": [
                  "key",
                  "value"
                ],
                "unevaluatedProperties": false
              }
            },
            "icon": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "Icon path"
                },
                "content": {
                  "type": "string",
                  "description": "Icon content"
                },
                "mimeType": {
                  "type": "string",
                  "description": "Icon mimeType"
                }
              },
              "required": [],
              "unevaluatedProperties": false
            },
            "create": {
              "type": "boolean",
              "description": "Indicates if the asset should be created/updated in exchange",
              "default": false
            },
            "type": {
              "type": "string",
              "enum": [
                "REST",
                "HTTP"
              ],
              "default": "REST"
            },
            "assetMainFile": {
              "type": "string",
              "description": "API descriptor main file (only used when publishing spec from application)"
            }
          },
          "required": [],
          "unevaluatedProperties": false
        },
        "implementationUrl": {
          "type": "string",
          "description": "Implementation URL ( application direct endpoint rather than load balancer )"
        },
        "consumerUrl": {
          "type": "string",
          "description": "Consumer URL which is used by clients to invoke the API (typically the load balancer)"
        },
        "implementationUrlJson": {
          "type": "object",
          "description": "This can be used to set the implementation URL json payload ( needed for proxies )"
        },
        "tags": {
          "description": "API tags",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "addAutoDiscovery": {
          "type": "boolean",
          "description": "If set to true, auto-discovery will be automatically added to the application"
        },
        "autoDiscoveryFlow": {
          "type": "string",
          "description": "If addAutoDiscovery is used, this is the flow name for the api",
          "default": "api-main"
        },
        "policies": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "pointcutData": {
                "description": "Policy pointcuts",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "methodRegex": {
                      "type": "string"
                    },
                    "uriTemplateRegex": {
                      "type": "string"
                    }
                  }
                }
              },
              "policyTemplateId": {
                "type": "string",
                "description": "Policy template id"
              },
              "groupId": {
                "type": "string",
                "description": "Policy exchange group id"
              },
              "assetId": {
                "type": "string",
                "description": "Policy exchange asset id"
              },
              "assetVersion": {
                "type": "string",
                "description": "Policy exchange asset version"
              },
              "configurationData": {
                "type": "object"
              }
            },
            "required": [
              "groupId",
              "assetId",
              "assetVersion"
            ],
            "unevaluatedProperties": false
          }
        },
        "accessedBy": {
          "description": "List of client applications which should be granted access to this API",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "label": {
          "type": "string",
          "description": "API label"
        },
        "slaTiers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "SLA Tier type"
              },
              "description": {
                "type": "string",
                "description": "SLA Tier description"
              },
              "autoApprove": {
                "type": "boolean",
                "description": "SLA Tier auto-approve",
                "default": false
              },
              "limits": {
                "type": "array",
                "description": "Rate limits",
                "minItems": 1,
                "items": {
                  "type": "object",
                  "properties": {
                    "visible": {
                      "type": "boolean",
                      "description": "If the rate limitation is visible to requesters",
                      "default": false
                    },
                    "timePeriodInMilliseconds": {
                      "type": "integer",
                      "description": "Time period in milliseconds"
                    },
                    "maximumRequests": {
                      "type": "integer",
                      "description": "Maximum requests per time period"
                    }
                  },
                  "required": [
                    "timePeriodInMilliseconds",
                    "maximumRequests"
                  ],
                  "unevaluatedProperties": false
                }
              }
            },
            "required": [
              "name",
              "limits"
            ],
            "unevaluatedProperties": false
          }
        },
        "apiIdProperty": {
          "type": "string",
          "description": "Name of the property that will be injected containing the API id",
          "default": "anypoint.api.id"
        },
        "injectApiId": {
          "type": "boolean",
          "description": "Indicates the a property with the api id should be injected or not",
          "default": true
        }
      },
      "required": [],
      "unevaluatedProperties": false
    },
    "deploymentParams": {
      "type": "object",
      "properties": {
        "target": {
          "type": "string",
          "description": "Deployment target"
        },
        "deployTimeout": {
          "type": "string",
          "description": "Deployment timeout in ISO 8601 duration format"
        },
        "deployRetryDelay": {
          "type": "string",
          "description": "Deployment deployment retry delay in ISO 8601 duration format"
        },
        "mergeExistingProperties": {
          "type": "boolean",
          "description": "Indicates if existing properties should be merged",
          "default": true
        },
        "mergeExistingPropertiesOverride": {
          "type": "boolean",
          "description": "Indicates if existing properties should override those from the application",
          "default": false
        },
        "extMonitoring": {
          "type": "boolean",
          "description": "Indicates if extended monitoring should be enabled"
        },
        "autoApproveAccess": {
          "type": "boolean",
          "description": "Indicates if API accesses should be automatically approved"
        },
        "cloudhub": {
          "type": "object",
          "description": "Cloudhub-specific deployment parameters",
          "properties": {
            "appNameSuffix": {
              "type": "string",
              "description": "cloudhub application name suffix"
            },
            "appNameSuffixNPOnly": {
              "type": "boolean",
              "description": "if true the cloudhub application name suffix will not be for production environments"
            },
            "appNamePrefix": {
              "type": "string",
              "description": "Application name prefix"
            },
            "muleVersion": {
              "type": "string",
              "description": "Mule runtime version"
            },
            "persistentQueues": {
              "type": "boolean",
              "description": "Enabled persistent queues"
            },
            "persistentQueuesEncrypted": {
              "type": "boolean",
              "description": "encrypt persistent queues"
            },
            "objectStoreV1": {
              "type": "boolean",
              "description": "Use ObjectStore V1 instead of V2",
              "default": false
            },
            "customlog4j": {
              "type": "boolean",
              "description": "Enable custom log4j configuration",
              "default": false
            },
            "staticIPs": {
              "type": "boolean",
              "description": "Enable static ips"
            },
            "region": {
              "type": "string",
              "description": "Deployment region"
            },
            "workerType": {
              "type": "string",
              "description": "Worker type"
            },
            "workerCount": {
              "type": "integer",
              "description": "Worker count"
            }
          },
          "required": [],
          "unevaluatedProperties": false
        },
        "cloudhub2": {
          "properties": {
            "clustered": {
              "type": "boolean",
              "description": "Application cluster enable flag",
              "default": false
            },
            "enforceDeployingReplicasAcrossNodes": {
              "type": "boolean",
              "description": "Enforces the deployment of replicas across different nodes",
              "default": false
            },
            "publicUrl": {
              "type": "string",
              "description": "URL of the deployed application"
            },
            "pathRewrite": {
              "type": "string",
              "description": "Base path rewrite"
            },
            "lastMileSecurity": {
              "type": "boolean",
              "description": "Enable last mile security"
            },
            "forwardSslSession": {
              "type": "boolean",
              "description": "Forward SSL session information",
              "default": false
            },
            "runtimeVersion": {
              "type": "string",
              "description": "Runtime version"
            },
            "updateStrategy": {
              "type": "string",
              "enum": [
                "rolling",
                "recreate"
              ],
              "description": "Update strategy"
            },
            "disableAmLogForwarding": {
              "type": "boolean",
              "description": "Disable Anypoint Monitoring log forwarding",
              "default": false
            },
            "generateDefaultPublicUrl": {
              "type": "boolean",
              "description": "Generate default public URL",
              "default": false
            },
            "replicas": {
              "type": "number",
              "description": "Number of replicas",
              "default": 1
            },
            "desiredState": {
              "type": "string",
              "description": "Desired state",
              "default": "STARTED"
            },
            "objectStoreV2Enabled": {
              "type": "boolean",
              "description": "Enabled object store V2",
              "default": false
            },
            "vCores": {
              "type": "string",
              "description": "vcore size per replica",
              "default": "0.1"
            }
          }
        },
        "rtf": {
          "type": "object",
          "description": "RTF specific deployment parameters",
          "properties": {
            "cpuReserved": {
              "type": "string",
              "description": "Reserved CPU capacity"
            },
            "cpuLimit": {
              "type": "string",
              "description": "Maximum CPU capacity"
            },
            "memoryReserved": {
              "type": "string",
              "description": "Reserved memory"
            },
            "memoryLimit": {
              "type": "string",
              "description": "Maximum memory"
            },
            "clustered": {
              "type": "boolean",
              "description": "If the application should be deployed as a clustered application"
            },
            "httpInboundPublicUrl": {
              "type": "string",
              "description": "HTTP inbound public URL"
            },
            "jvmArgs": {
              "type": "string",
              "description": "JVM arguments"
            },
            "runtimeVersion": {
              "type": "string",
              "description": "Runtime version"
            },
            "lastMileSecurity": {
              "type": "boolean",
              "description": "If last mile security must be enabled"
            },
            "forwardSslSession": {
              "type": "boolean",
              "description": "forward SSL session"
            },
            "updateStrategy": {
              "type": "string",
              "description": "Application update strategy",
              "enum": ["ROLLING","RECREATE"]
            },
            "replicas": {
              "type": "integer",
              "description": "Number of replicas"
            }
          },
          "required": [],
          "unevaluatedProperties": false
        }
      },
      "required": [],
      "unevaluatedProperties": false
    }
  },
  "required": [],
  "unevaluatedProperties": false
}

Example

{
  "$schema": "https://docs.enhanced-mule.com/schemas/emule-application-1.0.schema.json",
  "id": "my-app",
  "version": "1.0.0",
  "description": "My App",
  "api": {
    "asset": {
      "id": "my-app-spec",
      "version": "1.0.0",
      "apiVersion": "v1",
      "name": "My App",
      "description": "App that does stuff",
      "tags": [
        "foo",
        "bar"
      ],
      "portal": {
        "pages": [
          {
            "name": "home",
            "content": "# Hello"
          }
        ]
      },
      "categories": {
        "color": [
          "blue",
          "red"
        ]
      },
      "fields": [
        {
          "key": "author",
          "value": "me",
          "required": false
        }
      ],
      "icon": {
        "path": "icon.svg",
        "mimeType": "application/svn"
      },
      "create": true,
      "type": "REST",
      "assetMainFile": "swagger.json"
    },
    "implementationUrl": "https://apiserver:8081",
    "consumerUrl": "https://api.myorg.com/myapi",
    "tags": [
      "foo",
      "bar"
    ],
    "addAutoDiscovery": true,
    "autoDiscoveryFlow": "api-main",
    "policies": [
      {
        "policyTemplateId": "fadsfdsfds",
        "groupId": "423324342342",
        "assetId": "somepolicy",
        "assetVersion": "1.1",
        "configurationData": {
          "foo": "bar"
        }
      }
    ],
    "accessedBy": [
      "adminclient"
    ],
    "label": "foo",
    "slaTiers": [
      {
        "name": "MyTier",
        "description": "My SLA Tier",
        "autoApprove": true,
        "limits": [
          {
            "visible": true,
            "timePeriodInMilliseconds": 1,
            "maximumRequests": 1
          }
        ]
      }
    ],
    "apiIdProperty": "anypoint.api.id"
  },
  "client": {
    "name": "my-app",
    "description": "My app",
    "url": "http://foo",
    "access": [
      {
        "assetId": "other-api",
        "orgId": "324342432",
        "groupId": "324342432",
        "assetVersion": "1.0",
        "label": "foo",
        "slaTier": "gold",
        "env": "prod"
      }
    ]
  },
  "deploymentParams": {
    "cloudhub": {
      "workerCount": 1
    },
    "rtf": {
      "replicas": 3
    }
  }
}