Dashboard: Schema V2 - Fix annotations losing queries (#102951)

* Fix annotations losing queries when saving v1 with dynamic dashboards enabled

* Add extra options property to the DashboardAnnotationQuerySpec to catch all field datasource-specific properties

* Add options to the v2Alpha1 schema and run make gen-apps

* Add unit test and clean up console.logs

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
This commit is contained in:
Alexa V
2025-04-09 18:51:51 +02:00
committed by GitHub
co-authored by Ivan Ortega Alba
parent d9dc93c4a6
commit 2f60d54648
13 changed files with 576 additions and 12 deletions
@@ -1273,6 +1273,13 @@
"type": "string",
"default": ""
},
"options": {
"description": "Catch-all field for datasource-specific properties",
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"query": {
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v2alpha1.DashboardDataQueryKind"
}