K8s: use +enum tag in playlist and unstructured dummy (#82022)

This commit is contained in:
Ryan McKinley
2024-02-06 16:10:32 -08:00
committed by GitHub
parent 83ea51f241
commit 40a08a7720
10 changed files with 27 additions and 16 deletions
+5 -4
View File
@@ -36,12 +36,16 @@ type Spec struct {
Items []Item `json:"items,omitempty"`
}
// Type of the item.
// +enum
type ItemType string
// Defines values for ItemType.
const (
ItemTypeDashboardByTag ItemType = "dashboard_by_tag"
ItemTypeDashboardByUid ItemType = "dashboard_by_uid"
// deprecated -- should use UID
// Deprecated -- should use UID
ItemTypeDashboardById ItemType = "dashboard_by_id"
)
@@ -60,6 +64,3 @@ type Item struct {
// - dashboard_by_uid: The value is the dashboard UID
Value string `json:"value"`
}
// Type of the item.
type ItemType string
@@ -32,10 +32,11 @@ func schema_pkg_apis_playlist_v0alpha1_Item(ref common.ReferenceCallback) common
Properties: map[string]spec.Schema{
"type": {
SchemaProps: spec.SchemaProps{
Description: "Type of the item.",
Description: "Type of the item.\n\nPossible enum values:\n - `\"dashboard_by_id\"` Deprecated -- should use UID\n - `\"dashboard_by_tag\"`\n - `\"dashboard_by_uid\"`",
Default: "",
Type: []string{"string"},
Format: "",
Enum: []interface{}{"dashboard_by_id", "dashboard_by_tag", "dashboard_by_uid"},
},
},
"value": {