mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
622 lines
24 KiB
Go
622 lines
24 KiB
Go
//go:build !ignore_autogenerated
|
||
// +build !ignore_autogenerated
|
||
|
||
// SPDX-License-Identifier: AGPL-3.0-only
|
||
|
||
// Code generated by openapi-gen. DO NOT EDIT.
|
||
|
||
// This file was autogenerated by openapi-gen. Do not edit it manually!
|
||
|
||
package v0alpha1
|
||
|
||
import (
|
||
common "k8s.io/kube-openapi/pkg/common"
|
||
spec "k8s.io/kube-openapi/pkg/validation/spec"
|
||
)
|
||
|
||
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition {
|
||
return map[string]common.OpenAPIDefinition{
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.DataSourceApiServer": schema_pkg_apis_query_v0alpha1_DataSourceApiServer(ref),
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.DataSourceApiServerList": schema_pkg_apis_query_v0alpha1_DataSourceApiServerList(ref),
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.DataSourceRef": schema_pkg_apis_query_v0alpha1_DataSourceRef(ref),
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.GenericDataQuery": schema_pkg_apis_query_v0alpha1_GenericDataQuery(ref),
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.GenericQueryRequest": schema_pkg_apis_query_v0alpha1_GenericQueryRequest(ref),
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.QueryDataResponse": QueryDataResponse{}.OpenAPIDefinition(),
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.TimeRange": schema_pkg_apis_query_v0alpha1_TimeRange(ref),
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.Position": schema_apis_query_v0alpha1_template_Position(ref),
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.QueryTemplate": schema_apis_query_v0alpha1_template_QueryTemplate(ref),
|
||
"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),
|
||
}
|
||
}
|
||
|
||
func schema_pkg_apis_query_v0alpha1_DataSourceApiServer(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||
return common.OpenAPIDefinition{
|
||
Schema: spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "The data source resource is a reflection of the individual datasource instances that are exposed in the groups: {datasource}.datasource.grafana.app The status is updated periodically. The name is the plugin id",
|
||
Type: []string{"object"},
|
||
Properties: map[string]spec.Schema{
|
||
"kind": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"apiVersion": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"metadata": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Default: map[string]interface{}{},
|
||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
|
||
},
|
||
},
|
||
"title": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "The display name",
|
||
Default: "",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"description": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Describe the plugin",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"groupVersion": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "The group + preferred version",
|
||
Default: "",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"aliasIDs": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Possible alternative plugin IDs",
|
||
Type: []string{"array"},
|
||
Items: &spec.SchemaOrArray{
|
||
Schema: &spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Default: "",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
Required: []string{"title", "groupVersion"},
|
||
},
|
||
},
|
||
Dependencies: []string{
|
||
"k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||
}
|
||
}
|
||
|
||
func schema_pkg_apis_query_v0alpha1_DataSourceApiServerList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||
return common.OpenAPIDefinition{
|
||
Schema: spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "List of datasource plugins",
|
||
Type: []string{"object"},
|
||
Properties: map[string]spec.Schema{
|
||
"kind": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"apiVersion": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"metadata": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Default: map[string]interface{}{},
|
||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
|
||
},
|
||
},
|
||
"items": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Type: []string{"array"},
|
||
Items: &spec.SchemaOrArray{
|
||
Schema: &spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Default: map[string]interface{}{},
|
||
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1.DataSourceApiServer"),
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
Dependencies: []string{
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.DataSourceApiServer", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
|
||
}
|
||
}
|
||
|
||
func schema_pkg_apis_query_v0alpha1_DataSourceRef(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||
return common.OpenAPIDefinition{
|
||
Schema: spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Type: []string{"object"},
|
||
Properties: map[string]spec.Schema{
|
||
"type": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "The datasource plugin type",
|
||
Default: "",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"uid": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Datasource UID",
|
||
Default: "",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
},
|
||
Required: []string{"type", "uid"},
|
||
},
|
||
},
|
||
}
|
||
}
|
||
|
||
func schema_pkg_apis_query_v0alpha1_GenericDataQuery(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||
return common.OpenAPIDefinition{
|
||
Schema: spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "GenericDataQuery is a replacement for `dtos.MetricRequest` that provides more explicit types",
|
||
Type: []string{"object"},
|
||
Properties: map[string]spec.Schema{
|
||
"refId": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "RefID is the unique identifier of the query, set by the frontend call.",
|
||
Default: "",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"timeRange": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "TimeRange represents the query range NOTE: unlike generic /ds/query, we can now send explicit time values in each query",
|
||
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1.TimeRange"),
|
||
},
|
||
},
|
||
"datasource": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "The datasource",
|
||
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1.DataSourceRef"),
|
||
},
|
||
},
|
||
"datasourceId": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Deprecated -- use datasource ref instead",
|
||
Type: []string{"integer"},
|
||
Format: "int64",
|
||
},
|
||
},
|
||
"queryType": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "QueryType is an optional identifier for the type of query. It can be used to distinguish different types of queries.",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"maxDataPoints": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "MaxDataPoints is the maximum number of data points that should be returned from a time series query.",
|
||
Type: []string{"integer"},
|
||
Format: "int64",
|
||
},
|
||
},
|
||
"intervalMs": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Interval is the suggested duration between time points in a time series query.",
|
||
Type: []string{"number"},
|
||
Format: "double",
|
||
},
|
||
},
|
||
"hide": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "true if query is disabled (ie should not be returned to the dashboard) Note this does not always imply that the query should not be executed since the results from a hidden query may be used as the input to other queries (SSE etc)",
|
||
Type: []string{"boolean"},
|
||
Format: "",
|
||
},
|
||
},
|
||
},
|
||
Required: []string{"refId"},
|
||
},
|
||
},
|
||
Dependencies: []string{
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.DataSourceRef", "github.com/grafana/grafana/pkg/apis/query/v0alpha1.TimeRange"},
|
||
}
|
||
}
|
||
|
||
func schema_pkg_apis_query_v0alpha1_GenericQueryRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||
return common.OpenAPIDefinition{
|
||
Schema: spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Generic query request with shared time across all values Copied from: https://github.com/grafana/grafana/blob/main/pkg/api/dtos/models.go#L62",
|
||
Type: []string{"object"},
|
||
Properties: map[string]spec.Schema{
|
||
"kind": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"apiVersion": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"from": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "From Start time in epoch timestamps in milliseconds or relative using Grafana time units. example: now-1h",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"to": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "To End time in epoch timestamps in milliseconds or relative using Grafana time units. example: now",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"queries": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "queries.refId – Specifies an identifier of the query. Is optional and default to “A”. queries.datasourceId – Specifies the data source to be queried. Each query in the request must have an unique datasourceId. queries.maxDataPoints - Species maximum amount of data points that dashboard panel can render. Is optional and default to 100. queries.intervalMs - Specifies the time interval in milliseconds of time series. Is optional and defaults to 1000. required: true example: [ { \"refId\": \"A\", \"intervalMs\": 86400000, \"maxDataPoints\": 1092, \"datasource\":{ \"uid\":\"PD8C576611E62080A\" }, \"rawSql\": \"SELECT 1 as valueOne, 2 as valueTwo\", \"format\": \"table\" } ]",
|
||
Type: []string{"array"},
|
||
Items: &spec.SchemaOrArray{
|
||
Schema: &spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1.GenericDataQuery"),
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
"debug": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "required: false",
|
||
Type: []string{"boolean"},
|
||
Format: "",
|
||
},
|
||
},
|
||
},
|
||
Required: []string{"queries"},
|
||
},
|
||
},
|
||
Dependencies: []string{
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.GenericDataQuery"},
|
||
}
|
||
}
|
||
|
||
func schema_pkg_apis_query_v0alpha1_TimeRange(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||
return common.OpenAPIDefinition{
|
||
Schema: spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "TimeRange represents a time range for a query and is a property of DataQuery.",
|
||
Type: []string{"object"},
|
||
Properties: map[string]spec.Schema{
|
||
"from": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "From is the start time of the query.",
|
||
Default: "",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"to": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "To is the end time of the query.",
|
||
Default: "",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
},
|
||
Required: []string{"from", "to"},
|
||
},
|
||
},
|
||
}
|
||
}
|
||
|
||
func schema_apis_query_v0alpha1_template_Position(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||
return common.OpenAPIDefinition{
|
||
Schema: spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Position is where to do replacement in the targets during render.",
|
||
Type: []string{"object"},
|
||
Properties: map[string]spec.Schema{
|
||
"start": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Start is the byte offset within TargetKey's property of the variable. It is the start location for replacements).",
|
||
Default: 0,
|
||
Type: []string{"integer"},
|
||
Format: "int64",
|
||
},
|
||
},
|
||
"end": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "End is the byte offset of the end of the variable.",
|
||
Default: 0,
|
||
Type: []string{"integer"},
|
||
Format: "int64",
|
||
},
|
||
},
|
||
},
|
||
Required: []string{"start", "end"},
|
||
},
|
||
},
|
||
}
|
||
}
|
||
|
||
func schema_apis_query_v0alpha1_template_QueryTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||
return common.OpenAPIDefinition{
|
||
Schema: spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Type: []string{"object"},
|
||
Properties: map[string]spec.Schema{
|
||
"title": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "A display name",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"description": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Longer description for why it is interesting",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"vars": {
|
||
VendorExtensible: spec.VendorExtensible{
|
||
Extensions: spec.Extensions{
|
||
"x-kubernetes-list-map-keys": []interface{}{
|
||
"key",
|
||
},
|
||
"x-kubernetes-list-type": "map",
|
||
},
|
||
},
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "The variables that can be used to render",
|
||
Type: []string{"array"},
|
||
Items: &spec.SchemaOrArray{
|
||
Schema: &spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Default: map[string]interface{}{},
|
||
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.TemplateVariable"),
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
"targets": {
|
||
VendorExtensible: spec.VendorExtensible{
|
||
Extensions: spec.Extensions{
|
||
"x-kubernetes-list-type": "set",
|
||
},
|
||
},
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Output variables",
|
||
Type: []string{"array"},
|
||
Items: &spec.SchemaOrArray{
|
||
Schema: &spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Default: map[string]interface{}{},
|
||
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.Target"),
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
Required: []string{"targets"},
|
||
},
|
||
},
|
||
Dependencies: []string{
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.Target", "github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.TemplateVariable"},
|
||
}
|
||
}
|
||
|
||
func schema_apis_query_v0alpha1_template_Target(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||
return common.OpenAPIDefinition{
|
||
Schema: spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Type: []string{"object"},
|
||
Properties: map[string]spec.Schema{
|
||
"dataType": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "DataType is the returned Dataplane type from the query.",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"variables": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Variables that will be replaced in the query",
|
||
Type: []string{"object"},
|
||
AdditionalProperties: &spec.SchemaOrBool{
|
||
Allows: true,
|
||
Schema: &spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Type: []string{"array"},
|
||
Items: &spec.SchemaOrArray{
|
||
Schema: &spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Default: map[string]interface{}{},
|
||
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.VariableReplacement"),
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
"properties": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Query target",
|
||
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1.GenericDataQuery"),
|
||
},
|
||
},
|
||
},
|
||
Required: []string{"variables", "properties"},
|
||
},
|
||
},
|
||
Dependencies: []string{
|
||
"github.com/grafana/grafana/pkg/apis/query/v0alpha1.GenericDataQuery", "github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.VariableReplacement"},
|
||
}
|
||
}
|
||
|
||
func schema_apis_query_v0alpha1_template_TemplateVariable(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||
return common.OpenAPIDefinition{
|
||
Schema: spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "TemplateVariable is the definition of a variable that will be interpolated in targets.",
|
||
Type: []string{"object"},
|
||
Properties: map[string]spec.Schema{
|
||
"key": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Key is the name of the variable.",
|
||
Default: "",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"defaultValues": {
|
||
VendorExtensible: spec.VendorExtensible{
|
||
Extensions: spec.Extensions{
|
||
"x-kubernetes-list-type": "atomic",
|
||
},
|
||
},
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "DefaultValue is the value to be used when there is no selected value during render.",
|
||
Type: []string{"array"},
|
||
Items: &spec.SchemaOrArray{
|
||
Schema: &spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Default: "",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
"valueListDefinition": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "ValueListDefinition is the object definition used by the FE to get a list of possible values to select for render.",
|
||
Ref: ref("github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured"),
|
||
},
|
||
},
|
||
},
|
||
Required: []string{"key"},
|
||
},
|
||
},
|
||
Dependencies: []string{
|
||
"github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured"},
|
||
}
|
||
}
|
||
|
||
func schema_apis_query_v0alpha1_template_VariableReplacement(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||
return common.OpenAPIDefinition{
|
||
Schema: spec.Schema{
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "QueryVariable is the definition of a variable that will be interpolated in targets.",
|
||
Type: []string{"object"},
|
||
Properties: map[string]spec.Schema{
|
||
"path": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Path is the location of the property within a target. The format for this is not figured out yet (Maybe JSONPath?). Idea: [\"string\", int, \"string\"] where int indicates array offset",
|
||
Default: "",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
},
|
||
},
|
||
"position": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "Positions is a list of where to perform the interpolation within targets during render. The first string is the Idx of the target as a string, since openAPI does not support ints as map keys",
|
||
Ref: ref("github.com/grafana/grafana/pkg/apis/query/v0alpha1/template.Position"),
|
||
},
|
||
},
|
||
"format": {
|
||
SchemaProps: spec.SchemaProps{
|
||
Description: "How values should be interpolated\n\nPossible 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",
|
||
Type: []string{"string"},
|
||
Format: "",
|
||
Enum: []interface{}{"csv", "doublequote", "json", "pipe", "raw", "singlequote"},
|
||
},
|
||
},
|
||
},
|
||
Required: []string{"path"},
|
||
},
|
||
},
|
||
Dependencies: []string{
|
||
"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"},
|
||
}
|
||
}
|