Alerting: Align OpenAPI definition with notification settings header (#114363)

fix: Align OpenAPI definition with notification settings header

Signed-off-by: Alexander Soelberg Heidarsson <89837986+alex5517@users.noreply.github.com>
This commit is contained in:
Alexander Soelberg Heidarsson
2025-11-24 23:08:02 +01:00
committed by GitHub
parent 93362c9024
commit fe367b570b
7 changed files with 205 additions and 15 deletions
@@ -555,7 +555,7 @@ const injectedRtkApi = api
'x-grafana-alerting-alert-rules-paused': queryArg['x-grafana-alerting-alert-rules-paused'],
'x-grafana-alerting-target-datasource-uid': queryArg['x-grafana-alerting-target-datasource-uid'],
'x-grafana-alerting-folder-uid': queryArg['x-grafana-alerting-folder-uid'],
'x-grafana-alerting-notification-receiver': queryArg['x-grafana-alerting-notification-receiver'],
'x-grafana-alerting-notification-settings': queryArg['x-grafana-alerting-notification-settings'],
},
}),
invalidatesTags: ['convert_prometheus'],
@@ -622,7 +622,7 @@ const injectedRtkApi = api
'x-grafana-alerting-alert-rules-paused': queryArg['x-grafana-alerting-alert-rules-paused'],
'x-grafana-alerting-target-datasource-uid': queryArg['x-grafana-alerting-target-datasource-uid'],
'x-grafana-alerting-folder-uid': queryArg['x-grafana-alerting-folder-uid'],
'x-grafana-alerting-notification-receiver': queryArg['x-grafana-alerting-notification-receiver'],
'x-grafana-alerting-notification-settings': queryArg['x-grafana-alerting-notification-settings'],
},
}),
invalidatesTags: ['convert_prometheus'],
@@ -2498,7 +2498,7 @@ export type RouteConvertPrometheusCortexPostRuleGroupApiArg = {
'x-grafana-alerting-alert-rules-paused'?: boolean;
'x-grafana-alerting-target-datasource-uid'?: string;
'x-grafana-alerting-folder-uid'?: string;
'x-grafana-alerting-notification-receiver'?: string;
'x-grafana-alerting-notification-settings'?: string;
prometheusRuleGroup: PrometheusRuleGroup;
};
export type RouteConvertPrometheusCortexDeleteRuleGroupApiResponse =
@@ -2535,7 +2535,7 @@ export type RouteConvertPrometheusPostRuleGroupApiArg = {
'x-grafana-alerting-alert-rules-paused'?: boolean;
'x-grafana-alerting-target-datasource-uid'?: string;
'x-grafana-alerting-folder-uid'?: string;
'x-grafana-alerting-notification-receiver'?: string;
'x-grafana-alerting-notification-settings'?: string;
prometheusRuleGroup: PrometheusRuleGroup;
};
export type RouteConvertPrometheusDeleteRuleGroupApiResponse =
+40 -2
View File
@@ -1707,6 +1707,10 @@
"is_paused": {
"type": "boolean"
},
"message": {
"description": "Field is only populated when listing alert rule versions.",
"type": "string"
},
"metadata": {
"$ref": "#/definitions/AlertRuleMetadata"
},
@@ -2544,6 +2548,28 @@
"TLSConfig": {
"$ref": "#/definitions/TLSConfig"
},
"audience": {
"description": "Audience optionally specifies the intended audience of the\nrequest. If empty, the value of TokenURL is used as the\nintended audience. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "string"
},
"claims": {
"additionalProperties": {},
"description": "Claims is a map of claims to be added to the JWT token. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "object"
},
"client_certificate_key": {
"$ref": "#/definitions/Secret"
},
"client_certificate_key_file": {
"type": "string"
},
"client_certificate_key_id": {
"type": "string"
},
"client_certificate_key_ref": {
"description": "ClientCertificateKeyRef is the name of the secret within the secret manager to use as the client\nsecret.",
"type": "string"
},
"client_id": {
"type": "string"
},
@@ -2563,6 +2589,14 @@
},
"type": "object"
},
"grant_type": {
"description": "GrantType is the OAuth2 grant type to use. It can be one of\n\"client_credentials\" or \"urn:ietf:params:oauth:grant-type:jwt-bearer\" (RFC 7523).\nDefault value is \"client_credentials\"",
"type": "string"
},
"iss": {
"description": "Iss is the OAuth client identifier used when communicating with\nthe configured OAuth provider. Default value is client_id. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "string"
},
"no_proxy": {
"description": "NoProxy contains addresses that should not use a proxy.",
"type": "string"
@@ -2583,6 +2617,10 @@
},
"type": "array"
},
"signature_algorithm": {
"description": "SignatureAlgorithm is the RSA algorithm used to sign JWT token. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".\nDefault value is RS256 and valid values RS256, RS384, RS512",
"type": "string"
},
"token_url": {
"type": "string"
}
@@ -5781,7 +5819,7 @@
},
{
"in": "header",
"name": "x-grafana-alerting-notification-receiver",
"name": "x-grafana-alerting-notification-settings",
"type": "string"
},
{
@@ -6071,7 +6109,7 @@
},
{
"in": "header",
"name": "x-grafana-alerting-notification-receiver",
"name": "x-grafana-alerting-notification-settings",
"type": "string"
},
{
@@ -259,7 +259,7 @@ type RouteConvertPrometheusPostRuleGroupParams struct {
// in: header
FolderUID string `json:"x-grafana-alerting-folder-uid"`
// in: header
NotificationReceiver string `json:"x-grafana-alerting-notification-receiver"`
NotificationSettings string `json:"x-grafana-alerting-notification-settings"`
// in:body
Body PrometheusRuleGroup
}
+40 -2
View File
@@ -1707,6 +1707,10 @@
"is_paused": {
"type": "boolean"
},
"message": {
"description": "Field is only populated when listing alert rule versions.",
"type": "string"
},
"metadata": {
"$ref": "#/definitions/AlertRuleMetadata"
},
@@ -2544,6 +2548,28 @@
"TLSConfig": {
"$ref": "#/definitions/TLSConfig"
},
"audience": {
"description": "Audience optionally specifies the intended audience of the\nrequest. If empty, the value of TokenURL is used as the\nintended audience. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "string"
},
"claims": {
"additionalProperties": {},
"description": "Claims is a map of claims to be added to the JWT token. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "object"
},
"client_certificate_key": {
"$ref": "#/definitions/Secret"
},
"client_certificate_key_file": {
"type": "string"
},
"client_certificate_key_id": {
"type": "string"
},
"client_certificate_key_ref": {
"description": "ClientCertificateKeyRef is the name of the secret within the secret manager to use as the client\nsecret.",
"type": "string"
},
"client_id": {
"type": "string"
},
@@ -2563,6 +2589,14 @@
},
"type": "object"
},
"grant_type": {
"description": "GrantType is the OAuth2 grant type to use. It can be one of\n\"client_credentials\" or \"urn:ietf:params:oauth:grant-type:jwt-bearer\" (RFC 7523).\nDefault value is \"client_credentials\"",
"type": "string"
},
"iss": {
"description": "Iss is the OAuth client identifier used when communicating with\nthe configured OAuth provider. Default value is client_id. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "string"
},
"no_proxy": {
"description": "NoProxy contains addresses that should not use a proxy.",
"type": "string"
@@ -2583,6 +2617,10 @@
},
"type": "array"
},
"signature_algorithm": {
"description": "SignatureAlgorithm is the RSA algorithm used to sign JWT token. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".\nDefault value is RS256 and valid values RS256, RS384, RS512",
"type": "string"
},
"token_url": {
"type": "string"
}
@@ -6834,7 +6872,7 @@
},
{
"in": "header",
"name": "x-grafana-alerting-notification-receiver",
"name": "x-grafana-alerting-notification-settings",
"type": "string"
},
{
@@ -7241,7 +7279,7 @@
},
{
"in": "header",
"name": "x-grafana-alerting-notification-receiver",
"name": "x-grafana-alerting-notification-settings",
"type": "string"
},
{
+40 -2
View File
@@ -1220,7 +1220,7 @@
},
{
"type": "string",
"name": "x-grafana-alerting-notification-receiver",
"name": "x-grafana-alerting-notification-settings",
"in": "header"
},
{
@@ -1634,7 +1634,7 @@
},
{
"type": "string",
"name": "x-grafana-alerting-notification-receiver",
"name": "x-grafana-alerting-notification-settings",
"in": "header"
},
{
@@ -6124,6 +6124,10 @@
"is_paused": {
"type": "boolean"
},
"message": {
"description": "Field is only populated when listing alert rule versions.",
"type": "string"
},
"metadata": {
"$ref": "#/definitions/AlertRuleMetadata"
},
@@ -6963,6 +6967,28 @@
"TLSConfig": {
"$ref": "#/definitions/TLSConfig"
},
"audience": {
"description": "Audience optionally specifies the intended audience of the\nrequest. If empty, the value of TokenURL is used as the\nintended audience. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "string"
},
"claims": {
"description": "Claims is a map of claims to be added to the JWT token. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "object",
"additionalProperties": {}
},
"client_certificate_key": {
"$ref": "#/definitions/Secret"
},
"client_certificate_key_file": {
"type": "string"
},
"client_certificate_key_id": {
"type": "string"
},
"client_certificate_key_ref": {
"description": "ClientCertificateKeyRef is the name of the secret within the secret manager to use as the client\nsecret.",
"type": "string"
},
"client_id": {
"type": "string"
},
@@ -6982,6 +7008,14 @@
"type": "string"
}
},
"grant_type": {
"description": "GrantType is the OAuth2 grant type to use. It can be one of\n\"client_credentials\" or \"urn:ietf:params:oauth:grant-type:jwt-bearer\" (RFC 7523).\nDefault value is \"client_credentials\"",
"type": "string"
},
"iss": {
"description": "Iss is the OAuth client identifier used when communicating with\nthe configured OAuth provider. Default value is client_id. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "string"
},
"no_proxy": {
"description": "NoProxy contains addresses that should not use a proxy.",
"type": "string"
@@ -7002,6 +7036,10 @@
"type": "string"
}
},
"signature_algorithm": {
"description": "SignatureAlgorithm is the RSA algorithm used to sign JWT token. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".\nDefault value is RS256 and valid values RS256, RS384, RS512",
"type": "string"
},
"token_url": {
"type": "string"
}
+40 -2
View File
@@ -2885,7 +2885,7 @@
},
{
"type": "string",
"name": "x-grafana-alerting-notification-receiver",
"name": "x-grafana-alerting-notification-settings",
"in": "header"
},
{
@@ -3175,7 +3175,7 @@
},
{
"type": "string",
"name": "x-grafana-alerting-notification-receiver",
"name": "x-grafana-alerting-notification-settings",
"in": "header"
},
{
@@ -16720,6 +16720,10 @@
"is_paused": {
"type": "boolean"
},
"message": {
"description": "Field is only populated when listing alert rule versions.",
"type": "string"
},
"metadata": {
"$ref": "#/definitions/AlertRuleMetadata"
},
@@ -18273,6 +18277,28 @@
"TLSConfig": {
"$ref": "#/definitions/TLSConfig"
},
"audience": {
"description": "Audience optionally specifies the intended audience of the\nrequest. If empty, the value of TokenURL is used as the\nintended audience. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "string"
},
"claims": {
"description": "Claims is a map of claims to be added to the JWT token. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "object",
"additionalProperties": {}
},
"client_certificate_key": {
"$ref": "#/definitions/Secret"
},
"client_certificate_key_file": {
"type": "string"
},
"client_certificate_key_id": {
"type": "string"
},
"client_certificate_key_ref": {
"description": "ClientCertificateKeyRef is the name of the secret within the secret manager to use as the client\nsecret.",
"type": "string"
},
"client_id": {
"type": "string"
},
@@ -18292,6 +18318,14 @@
"type": "string"
}
},
"grant_type": {
"description": "GrantType is the OAuth2 grant type to use. It can be one of\n\"client_credentials\" or \"urn:ietf:params:oauth:grant-type:jwt-bearer\" (RFC 7523).\nDefault value is \"client_credentials\"",
"type": "string"
},
"iss": {
"description": "Iss is the OAuth client identifier used when communicating with\nthe configured OAuth provider. Default value is client_id. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "string"
},
"no_proxy": {
"description": "NoProxy contains addresses that should not use a proxy.",
"type": "string"
@@ -18312,6 +18346,10 @@
"type": "string"
}
},
"signature_algorithm": {
"description": "SignatureAlgorithm is the RSA algorithm used to sign JWT token. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".\nDefault value is RS256 and valid values RS256, RS384, RS512",
"type": "string"
},
"token_url": {
"type": "string"
}
+40 -2
View File
@@ -6207,6 +6207,10 @@
"is_paused": {
"type": "boolean"
},
"message": {
"description": "Field is only populated when listing alert rule versions.",
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/AlertRuleMetadata"
},
@@ -7759,6 +7763,28 @@
"TLSConfig": {
"$ref": "#/components/schemas/TLSConfig"
},
"audience": {
"description": "Audience optionally specifies the intended audience of the\nrequest. If empty, the value of TokenURL is used as the\nintended audience. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "string"
},
"claims": {
"additionalProperties": {},
"description": "Claims is a map of claims to be added to the JWT token. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "object"
},
"client_certificate_key": {
"$ref": "#/components/schemas/Secret"
},
"client_certificate_key_file": {
"type": "string"
},
"client_certificate_key_id": {
"type": "string"
},
"client_certificate_key_ref": {
"description": "ClientCertificateKeyRef is the name of the secret within the secret manager to use as the client\nsecret.",
"type": "string"
},
"client_id": {
"type": "string"
},
@@ -7778,6 +7804,14 @@
},
"type": "object"
},
"grant_type": {
"description": "GrantType is the OAuth2 grant type to use. It can be one of\n\"client_credentials\" or \"urn:ietf:params:oauth:grant-type:jwt-bearer\" (RFC 7523).\nDefault value is \"client_credentials\"",
"type": "string"
},
"iss": {
"description": "Iss is the OAuth client identifier used when communicating with\nthe configured OAuth provider. Default value is client_id. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".",
"type": "string"
},
"no_proxy": {
"description": "NoProxy contains addresses that should not use a proxy.",
"type": "string"
@@ -7798,6 +7832,10 @@
},
"type": "array"
},
"signature_algorithm": {
"description": "SignatureAlgorithm is the RSA algorithm used to sign JWT token. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".\nDefault value is RS256 and valid values RS256, RS384, RS512",
"type": "string"
},
"token_url": {
"type": "string"
}
@@ -17019,7 +17057,7 @@
},
{
"in": "header",
"name": "x-grafana-alerting-notification-receiver",
"name": "x-grafana-alerting-notification-settings",
"schema": {
"type": "string"
}
@@ -17378,7 +17416,7 @@
},
{
"in": "header",
"name": "x-grafana-alerting-notification-receiver",
"name": "x-grafana-alerting-notification-settings",
"schema": {
"type": "string"
}