{
    "apiVersion": "apps.grafana.app/v1alpha1",
    "kind": "AppManifest",
    "metadata": {
        "name": "custom-app"
    },
    "spec": {
        "appName": "custom-app",
        "appDisplayName": "custom-app",
        "group": "customapp.ext.grafana.app",
        "versions": [
            {
                "name": "v0-0",
                "served": true,
                "kinds": [
                    {
                        "kind": "CustomKind",
                        "plural": "CustomKinds",
                        "scope": "Namespaced",
                        "schema": {
                            "spec": {
                                "properties": {
                                    "deprecatedField": {
                                        "type": "string"
                                    },
                                    "field1": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "field1",
                                    "deprecatedField"
                                ],
                                "type": "object"
                            },
                            "status": {
                                "properties": {
                                    "additionalFields": {
                                        "description": "additionalFields is reserved for future use",
                                        "type": "object",
                                        "x-kubernetes-preserve-unknown-fields": true
                                    },
                                    "operatorStates": {
                                        "additionalProperties": {
                                            "properties": {
                                                "descriptiveState": {
                                                    "description": "descriptiveState is an optional more descriptive state field which has no requirements on format",
                                                    "type": "string"
                                                },
                                                "details": {
                                                    "description": "details contains any extra information that is operator-specific",
                                                    "type": "object",
                                                    "x-kubernetes-preserve-unknown-fields": true
                                                },
                                                "lastEvaluation": {
                                                    "description": "lastEvaluation is the ResourceVersion last evaluated",
                                                    "type": "string"
                                                },
                                                "state": {
                                                    "description": "state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.",
                                                    "enum": [
                                                        "success",
                                                        "in_progress",
                                                        "failed"
                                                    ],
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "lastEvaluation",
                                                "state"
                                            ],
                                            "type": "object"
                                        },
                                        "description": "operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.",
                                        "type": "object"
                                    }
                                },
                                "type": "object"
                            }
                        },
                        "conversion": false
                    }
                ]
            },
            {
                "name": "v1-0",
                "served": true,
                "kinds": [
                    {
                        "kind": "CustomKind",
                        "plural": "CustomKinds",
                        "scope": "Namespaced",
                        "schema": {
                            "spec": {
                                "properties": {
                                    "boolField": {
                                        "default": false,
                                        "type": "boolean"
                                    },
                                    "enum": {
                                        "default": "default",
                                        "enum": [
                                            "val1",
                                            "val2",
                                            "val3",
                                            "val4",
                                            "default"
                                        ],
                                        "type": "string"
                                    },
                                    "exclusiveInt": {
                                        "exclusiveMaximum": true,
                                        "exclusiveMinimum": true,
                                        "maximum": 100,
                                        "minimum": 10,
                                        "type": "integer"
                                    },
                                    "field1": {
                                        "type": "string"
                                    },
                                    "floatField": {
                                        "type": "number"
                                    },
                                    "i32": {
                                        "maximum": 123456,
                                        "type": "integer"
                                    },
                                    "i64": {
                                        "minimum": 123456,
                                        "type": "integer"
                                    },
                                    "inner": {
                                        "properties": {
                                            "innerField1": {
                                                "type": "string"
                                            },
                                            "innerField2": {
                                                "items": {
                                                    "type": "string"
                                                },
                                                "type": "array"
                                            },
                                            "innerField3": {
                                                "items": {
                                                    "properties": {
                                                        "details": {
                                                            "type": "object",
                                                            "x-kubernetes-preserve-unknown-fields": true
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "details"
                                                    ],
                                                    "type": "object"
                                                },
                                                "type": "array"
                                            },
                                            "innerField4": {
                                                "items": {
                                                    "type": "object",
                                                    "x-kubernetes-preserve-unknown-fields": true
                                                },
                                                "type": "array"
                                            }
                                        },
                                        "required": [
                                            "innerField1",
                                            "innerField2",
                                            "innerField3",
                                            "innerField4"
                                        ],
                                        "type": "object"
                                    },
                                    "linkedList": {
                                        "properties": {
                                            "next": {
                                                "type": "object",
                                                "x-kubernetes-preserve-unknown-fields": true
                                            },
                                            "val": {
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "val"
                                        ],
                                        "type": "object"
                                    },
                                    "map": {
                                        "additionalProperties": {
                                            "properties": {
                                                "details": {
                                                    "type": "object",
                                                    "x-kubernetes-preserve-unknown-fields": true
                                                },
                                                "group": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "group",
                                                "details"
                                            ],
                                            "type": "object"
                                        },
                                        "type": "object"
                                    },
                                    "timestamp": {
                                        "format": "date-time",
                                        "type": "string"
                                    },
                                    "union": {
                                        "oneOf": [
                                            {
                                                "not": {
                                                    "anyOf": [
                                                        {
                                                            "required": [
                                                                "details"
                                                            ]
                                                        }
                                                    ]
                                                },
                                                "required": [
                                                    "group"
                                                ]
                                            },
                                            {
                                                "required": [
                                                    "group",
                                                    "details"
                                                ]
                                            }
                                        ],
                                        "properties": {
                                            "details": {
                                                "type": "object",
                                                "x-kubernetes-preserve-unknown-fields": true
                                            },
                                            "group": {
                                                "type": "string"
                                            },
                                            "options": {
                                                "items": {
                                                    "type": "string"
                                                },
                                                "type": "array"
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "required": [
                                    "field1",
                                    "inner",
                                    "union",
                                    "map",
                                    "timestamp",
                                    "enum",
                                    "i32",
                                    "i64",
                                    "boolField",
                                    "floatField",
                                    "linkedList",
                                    "exclusiveInt"
                                ],
                                "type": "object"
                            },
                            "status": {
                                "properties": {
                                    "additionalFields": {
                                        "description": "additionalFields is reserved for future use",
                                        "type": "object",
                                        "x-kubernetes-preserve-unknown-fields": true
                                    },
                                    "operatorStates": {
                                        "additionalProperties": {
                                            "properties": {
                                                "descriptiveState": {
                                                    "description": "descriptiveState is an optional more descriptive state field which has no requirements on format",
                                                    "type": "string"
                                                },
                                                "details": {
                                                    "description": "details contains any extra information that is operator-specific",
                                                    "type": "object",
                                                    "x-kubernetes-preserve-unknown-fields": true
                                                },
                                                "lastEvaluation": {
                                                    "description": "lastEvaluation is the ResourceVersion last evaluated",
                                                    "type": "string"
                                                },
                                                "state": {
                                                    "description": "state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.",
                                                    "enum": [
                                                        "success",
                                                        "in_progress",
                                                        "failed"
                                                    ],
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "lastEvaluation",
                                                "state"
                                            ],
                                            "type": "object"
                                        },
                                        "description": "operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.",
                                        "type": "object"
                                    },
                                    "statusField1": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "statusField1"
                                ],
                                "type": "object",
                                "x-kubernetes-preserve-unknown-fields": true
                            }
                        },
                        "conversion": false
                    }
                ]
            }
        ],
        "preferredVersion": "v1-0",
        "roles": {
            "custom-app:admin": {
                "title": "custom-app Admin",
                "description": "Allows all actions on CustomKinds",
                "kinds": [
                    {
                        "kind": "CustomKind",
                        "permissionSet": "admin"
                    },
                    {
                        "kind": "CustomKind/status",
                        "permissionSet": "admin"
                    }
                ]
            },
            "custom-app:editor": {
                "title": "custom-app Editor",
                "description": "Create, Read, Update, and Delete CustomKinds",
                "kinds": [
                    {
                        "kind": "CustomKind",
                        "permissionSet": "editor"
                    }
                ]
            },
            "custom-app:reader": {
                "title": "custom-app Reader",
                "description": "Read CustomKinds",
                "kinds": [
                    {
                        "kind": "CustomKind",
                        "permissionSet": "viewer"
                    }
                ]
            }
        },
        "roleBindings": {
            "viewer": [
                "custom-app:reader"
            ],
            "editor": [
                "custom-app:editor"
            ],
            "admin": [
                "custom-app:admin"
            ]
        }
    }
}