Schema v2: Move annotation mappings out of legacyOptions (#114721)

* Add mappings property to v2(alpha/beta)1

* Mappings convetions

* OpenAPI spec

* fe annotaations mapping

* Update snapshots

* v2->v1 conversion

* fix tests

---------

Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
This commit is contained in:
Dominik Prokop
2025-12-03 10:19:21 +01:00
committed by GitHub
parent 3e50bfced8
commit bb787a2637
26 changed files with 1355 additions and 38 deletions
@@ -154,10 +154,22 @@
"exclude": true
},
"mappings": {
"title": "service",
"text": "description",
"time": "timestamp",
"tags": "labels"
"title": {
"source": "field",
"value": "service"
},
"text": {
"source": "field",
"value": "description"
},
"time": {
"source": "field",
"value": "timestamp"
},
"tags": {
"source": "field",
"value": "labels"
}
},
"builtIn": 0,
"type": "influxdb"
@@ -214,4 +226,4 @@
},
"links": []
}
}
}
@@ -151,10 +151,22 @@
"hide": false,
"iconColor": "#FF5722",
"mappings": {
"tags": "labels",
"text": "description",
"time": "timestamp",
"title": "service"
"tags": {
"source": "field",
"value": "labels"
},
"text": {
"source": "field",
"value": "description"
},
"time": {
"source": "field",
"value": "timestamp"
},
"title": {
"source": "field",
"value": "service"
}
},
"name": "Complex Filter Annotation",
"target": {
@@ -227,4 +239,4 @@
"storedVersion": "v1beta1"
}
}
}
}
@@ -215,13 +215,25 @@
3
]
},
"legacyOptions": {
"mappings": {
"tags": "labels",
"text": "description",
"time": "timestamp",
"title": "service"
"mappings": {
"tags": {
"source": "field",
"value": "labels"
},
"text": {
"source": "field",
"value": "description"
},
"time": {
"source": "field",
"value": "timestamp"
},
"title": {
"source": "field",
"value": "service"
}
},
"legacyOptions": {
"type": "influxdb"
}
}
@@ -224,13 +224,25 @@
3
]
},
"legacyOptions": {
"mappings": {
"tags": "labels",
"text": "description",
"time": "timestamp",
"title": "service"
"mappings": {
"tags": {
"source": "field",
"value": "labels"
},
"text": {
"source": "field",
"value": "description"
},
"time": {
"source": "field",
"value": "timestamp"
},
"title": {
"source": "field",
"value": "service"
}
},
"legacyOptions": {
"type": "influxdb"
}
}