{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
        "AppSchema": {
            "additionalProperties": false,
            "properties": {
                "description": {
                    "description": "The app's description.",
                    "title": "description",
                    "type": "string",
                    "maxLength": 1000
                },
                "id": {
                    "description": "A unique Atlassian Resource Identifier (ari) assigned to your app.",
                    "pattern": "ari:cloud:ecosystem::app/[^\\s]+",
                    "title": "id",
                    "type": "string"
                },
                "runtime": {
                    "additionalProperties": false,
                    "description": "Options related to the Forge Javascript runtime.",
                    "properties": {
                        "name": {
                            "description": "Name of the runtime to use for app execution.",
                            "title": "name",
                            "type": "string",
                            "enum": [
                                "nodejs20.x",
                                "nodejs22.x",
                                "nodejs24.x"
                            ]
                        },
                        "architecture": {
                            "description": "Lambda architecture, its value can be either 'x86_64' or 'arm64'. Default value is 'x86_64'.",
                            "title": "architecture",
                            "type": "string",
                            "enum": [
                                "x86_64",
                                "arm64"
                            ]
                        },
                        "memoryMB": {
                            "description": "The default amount of memory available to all functions at runtime. Increasing the function memory also increases its CPU allocation. You can configure memory between 128 MB and 1024 MB in 1-MB increments. The default value is 512 MB.",
                            "title": "memoryMB",
                            "type": "number"
                        }
                    },
                    "title": "runtime",
                    "type": "object",
                    "required": [
                        "name"
                    ]
                },
                "compatibility": {
                    "type": "object",
                    "title": "compatibility",
                    "description": "The app compatibility configuration. If not set, app is not a cross-context or global app.",
                    "additionalProperties": false,
                    "minProperties": 1,
                    "properties": {
                        "confluence": {
                            "type": "object",
                            "properties": {
                                "required": {
                                    "enum": [
                                        true,
                                        false
                                    ]
                                }
                            },
                            "additionalProperties": false
                        },
                        "jira": {
                            "type": "object",
                            "properties": {
                                "required": {
                                    "enum": [
                                        true,
                                        false
                                    ]
                                }
                            },
                            "additionalProperties": false
                        },
                        "compass": {
                            "type": "object",
                            "properties": {
                                "required": {
                                    "enum": [
                                        true,
                                        false
                                    ]
                                }
                            },
                            "additionalProperties": false
                        }
                    }
                },
                "access": {
                    "additionalProperties": false,
                    "required": [
                        "userAccess"
                    ],
                    "type": "object",
                    "title": "access",
                    "description": "Options related to app access control",
                    "properties": {
                        "userAccess": {
                            "type": "boolean",
                            "default": false,
                            "title": "userAccess",
                            "description": "Whether to enable user access control for this app. Default value of false."
                        }
                    }
                },
                "licensing": {
                    "additionalProperties": false,
                    "required": [
                        "enabled"
                    ],
                    "type": "object",
                    "title": "licensing",
                    "description": "Options related to paid app licensing",
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "default": false,
                            "title": "enabled",
                            "description": "Whether to enable paid app licensing for production installations of this app. Default value of false."
                        },
                        "editionsEnabled": {
                            "type": "boolean",
                            "default": false,
                            "title": "editionsEnabled",
                            "description": "Whether to enable editions for this app. Default value of false."
                        },
                        "modes": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "user-access"
                                ]
                            },
                            "title": "modes",
                            "description": "Declares the licensing modes supported by this app. One of the declared modes may be selected as the active mode when the app is listed on the Marketplace. If no value is specified, the legacy coupled licensing mode is assumed by default."
                        }
                    }
                },
                "features": {
                    "additionalProperties": false,
                    "type": "object",
                    "title": "features",
                    "description": "Features related to app",
                    "properties": {
                        "autoUserConsent": {
                            "type": "boolean",
                            "default": false,
                            "title": "autoUserConsent",
                            "description": "This property is deprecated and no longer required to use simplified user consent. Please remove it from your manifest as in a future release this will become an error."
                        }
                    }
                },
                "connect": {
                    "additionalProperties": false,
                    "required": [
                        "key"
                    ],
                    "type": "object",
                    "title": "connect",
                    "description": "Connect Configuration for the forge app.",
                    "properties": {
                        "key": {
                            "type": "string",
                            "description": "The app's connect key",
                            "minLength": 1,
                            "maxLength": 90,
                            "pattern": "^[a-zA-Z0-9-._]+$",
                            "title": "key"
                        },
                        "remote": {
                            "type": "string",
                            "description": "A key for the remote, which other modules can refer to. Must be unique within the manifest and have a maximum of 23 characters.",
                            "pattern": "^[a-zA-Z0-9_-]+$",
                            "maxLength": 23
                        },
                        "authentication": {
                            "description": "The type of authentication used to communicate with tenant APIs",
                            "type": "string",
                            "default": "jwt",
                            "enum": [
                                "jwt"
                            ]
                        }
                    }
                },
                "storage": {
                    "type": "object",
                    "description": "Options related to hosted storage",
                    "additionalProperties": false,
                    "properties": {
                        "classifications": {
                            "description": "Labels to classify the type of data stored",
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "ugc",
                                    "pii",
                                    "other"
                                ]
                            },
                            "minItems": 1
                        },
                        "entities": {
                            "description": "Custom schemas for app stored entities.",
                            "type": "array",
                            "items": {
                                "type": "object",
                                "required": [
                                    "name",
                                    "attributes"
                                ],
                                "additionalProperties": false,
                                "properties": {
                                    "name": {
                                        "description": "A name for the entity. Must be unique within the manifest and have a maximum of 60 characters.",
                                        "type": "string",
                                        "pattern": "^(?![_\\.-])(?!.*\\.{2})[a-z0-9:\\-_.]*(?<![.])$",
                                        "minLength": 3,
                                        "maxLength": 60
                                    },
                                    "attributes": {
                                        "description": "Attributes of the entity.",
                                        "type": "object",
                                        "patternProperties": {
                                            "^[a-zA-Z][a-zA-Z0-9_]*$": {
                                                "description": "An attribute of the entity. Must be unique within the entity and have a maximum of 30 characters.",
                                                "type": "object",
                                                "required": [
                                                    "type"
                                                ],
                                                "additionalProperties": false,
                                                "properties": {
                                                    "type": {
                                                        "description": "The data type for the given attribute.",
                                                        "type": "string",
                                                        "enum": [
                                                            "string",
                                                            "boolean",
                                                            "float",
                                                            "integer",
                                                            "any"
                                                        ]
                                                    }
                                                }
                                            }
                                        },
                                        "additionalProperties": false
                                    },
                                    "indexes": {
                                        "description": "Indexes on attributes of the schema.",
                                        "type": "array",
                                        "items": {
                                            "oneOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "name",
                                                        "range"
                                                    ],
                                                    "additionalProperties": false,
                                                    "properties": {
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "range": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "minItems": 1
                                                        },
                                                        "partition": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "minItems": 1
                                                        }
                                                    }
                                                }
                                            ]
                                        },
                                        "minItems": 1
                                    }
                                }
                            },
                            "minItems": 1
                        }
                    }
                },
                "package": {
                    "additionalProperties": false,
                    "description": "Options for packaging the Forge app.",
                    "properties": {
                        "bundler": {
                            "description": "Bundler to use for packaging the runtime code.",
                            "type": "string",
                            "enum": [
                                "webpack",
                                "typescript",
                                "manual@2026"
                            ]
                        },
                        "path": {
                            "description": "For manual packaging, path where the packaged runtime code is located.",
                            "type": "string"
                        },
                        "extraFiles": {
                            "description": "A list of files to include in the Forge app package.",
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    "title": "package",
                    "type": "object"
                }
            },
            "required": [
                "id",
                "runtime"
            ],
            "title": "AppSchema",
            "type": "object"
        }
    },
    "additionalProperties": true,
    "type": "object",
    "properties": {
        "app": {
            "$ref": "#/definitions/AppSchema",
            "title": "app"
        }
    },
    "required": [
        "app"
    ]
}
