mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Rename scope.name to scope.title since name exists in metadata. (#83172)
name is part of metadata which is confusing Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
parent
2258e6bd16
commit
028d0d0c2c
@ -391,6 +391,14 @@ func schema_pkg_apis_featuretoggle_v0alpha1_ToggleStatus(ref common.ReferenceCal
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"stage": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "The feature toggle stage",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"enabled": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Is the flag enabled",
|
||||
@ -421,7 +429,7 @@ func schema_pkg_apis_featuretoggle_v0alpha1_ToggleStatus(ref common.ReferenceCal
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"name", "enabled", "writeable"},
|
||||
Required: []string{"name", "stage", "enabled", "writeable"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
|
@ -28,6 +28,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
|
||||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.Target": schema_apis_query_v0alpha1_template_Target(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.TemplateVariable": schema_apis_query_v0alpha1_template_TemplateVariable(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.VariableReplacement": schema_apis_query_v0alpha1_template_VariableReplacement(ref),
|
||||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.replacement": schema_apis_query_v0alpha1_template_replacement(ref),
|
||||
}
|
||||
}
|
||||
|
||||
@ -584,3 +585,37 @@ func schema_apis_query_v0alpha1_template_VariableReplacement(ref common.Referenc
|
||||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.Position"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_apis_query_v0alpha1_template_replacement(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"Position": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.Position"),
|
||||
},
|
||||
},
|
||||
"TemplateVariable": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.TemplateVariable"),
|
||||
},
|
||||
},
|
||||
"format": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Possible enum values:\n - `\"csv\"` Formats variables with multiple values as a comma-separated string.\n - `\"doublequote\"` Formats single- and multi-valued variables into a comma-separated string\n - `\"json\"` Formats variables with multiple values as a comma-separated string.\n - `\"pipe\"` Formats variables with multiple values into a pipe-separated string.\n - `\"raw\"` Formats variables with multiple values into comma-separated string. This is the default behavior when no format is specified\n - `\"singlequote\"` Formats single- and multi-valued variables into a comma-separated string",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
Enum: []interface{}{"csv", "doublequote", "json", "pipe", "raw", "singlequote"},
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"Position", "TemplateVariable", "format"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.Position", "github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.TemplateVariable"},
|
||||
}
|
||||
}
|
||||
|
@ -4,3 +4,6 @@ API rule violation: names_match,github.com/grafana/grafana/pkg/apis/query/v0alph
|
||||
API rule violation: names_match,github.com/grafana/grafana/pkg/apis/query/v0alpha1,GenericDataQuery,RefID
|
||||
API rule violation: names_match,github.com/grafana/grafana/pkg/apis/query/v0alpha1,QueryDataResponse,QueryDataResponse
|
||||
API rule violation: names_match,github.com/grafana/grafana/pkg/apis/query/v0alpha1/template,QueryTemplate,Variables
|
||||
API rule violation: names_match,github.com/grafana/grafana/pkg/apis/query/v0alpha1/template,replacement,Position
|
||||
API rule violation: names_match,github.com/grafana/grafana/pkg/apis/query/v0alpha1/template,replacement,TemplateVariable
|
||||
API rule violation: names_match,github.com/grafana/grafana/pkg/apis/query/v0alpha1/template,replacement,format
|
||||
|
@ -13,7 +13,7 @@ type Scope struct {
|
||||
}
|
||||
|
||||
type ScopeSpec struct {
|
||||
Name string `json:"name"`
|
||||
Title string `json:"title"`
|
||||
Type string `json:"type"`
|
||||
Description string `json:"description"`
|
||||
Category string `json:"category"`
|
||||
|
@ -178,7 +178,7 @@ func schema_pkg_apis_scope_v0alpha1_ScopeSpec(ref common.ReferenceCallback) comm
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"name": {
|
||||
"title": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
@ -220,7 +220,7 @@ func schema_pkg_apis_scope_v0alpha1_ScopeSpec(ref common.ReferenceCallback) comm
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"name", "type", "description", "category", "filters"},
|
||||
Required: []string{"title", "type", "description", "category", "filters"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
|
Loading…
Reference in New Issue
Block a user