mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* refactory to move trim/apply default into schema.go * fix comments * move schema test outside of load folder
35 lines
560 B
Plaintext
35 lines
560 B
Plaintext
Verifies common usecases for trimdefault/applydefault functions:
|
|
* Basic cases
|
|
* Real dashboard
|
|
|
|
-- CUE --
|
|
{
|
|
id?: number
|
|
uid: string
|
|
gnetId?: string
|
|
style: *"light" | "dark"
|
|
timezone?: *"browser" | "utc"
|
|
editable: bool | *true
|
|
schemaVersion: number | *25
|
|
version?: number
|
|
graphTooltip: >=0 & <=2 | *0
|
|
}
|
|
|
|
-- Full --
|
|
{
|
|
"id": 42,
|
|
"uid": "emal8gQMz",
|
|
"style": "light",
|
|
"editable": true,
|
|
"schemaVersion": 27,
|
|
"version": 2,
|
|
"graphTooltip": 0
|
|
}
|
|
|
|
-- Trimed --
|
|
{
|
|
"id": 42,
|
|
"uid": "emal8gQMz",
|
|
"schemaVersion": 27,
|
|
"version": 2
|
|
} |