Skip to content

Commit

Permalink
Merge pull request #5 from InfluxCommunity/update-alerting-swagger-spec
Browse files Browse the repository at this point in the history
Alerting: Update Swagger spec
  • Loading branch information
Jayclifford345 authored Oct 20, 2023
2 parents 29509cb + 04934df commit 36ae086
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 13 deletions.
11 changes: 10 additions & 1 deletion pkg/services/ngalert/api/tooling/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,9 @@
"description": "Error is a property to be set if the corresponding DataQuery has an error.",
"type": "string"
},
"ErrorSource": {
"$ref": "#/definitions/ErrorSource"
},
"Frames": {
"$ref": "#/definitions/Frames"
},
Expand Down Expand Up @@ -813,6 +816,10 @@
},
"type": "object"
},
"ErrorSource": {
"description": "ErrorSource type defines the source of the error",
"type": "string"
},
"ErrorType": {
"title": "ErrorType models the different API error types.",
"type": "string"
Expand Down Expand Up @@ -4124,6 +4131,7 @@
"type": "object"
},
"alertGroup": {
"description": "AlertGroup alert group",
"properties": {
"alerts": {
"description": "alerts",
Expand Down Expand Up @@ -4252,7 +4260,6 @@
"type": "object"
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"properties": {
"annotations": {
"$ref": "#/definitions/labelSet"
Expand Down Expand Up @@ -4314,6 +4321,7 @@
"type": "array"
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"properties": {
"comment": {
"description": "comment",
Expand Down Expand Up @@ -4368,6 +4376,7 @@
"type": "array"
},
"integration": {
"description": "Integration integration",
"properties": {
"lastNotifyAttempt": {
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
Expand Down
17 changes: 11 additions & 6 deletions pkg/services/ngalert/api/tooling/post.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,9 @@
"description": "Error is a property to be set if the corresponding DataQuery has an error.",
"type": "string"
},
"ErrorSource": {
"$ref": "#/definitions/ErrorSource"
},
"Frames": {
"$ref": "#/definitions/Frames"
},
Expand Down Expand Up @@ -813,6 +816,10 @@
},
"type": "object"
},
"ErrorSource": {
"description": "ErrorSource type defines the source of the error",
"type": "string"
},
"ErrorType": {
"title": "ErrorType models the different API error types.",
"type": "string"
Expand Down Expand Up @@ -3882,6 +3889,7 @@
"type": "object"
},
"URL": {
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the EscapedPath method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
"properties": {
"ForceQuery": {
"type": "boolean"
Expand Down Expand Up @@ -3917,7 +3925,7 @@
"$ref": "#/definitions/Userinfo"
}
},
"title": "URL is a custom URL type that allows validation at configuration load time.",
"title": "A URL represents a parsed URL (technically, a URI reference).",
"type": "object"
},
"UpdateRuleGroupResponse": {
Expand Down Expand Up @@ -4123,6 +4131,7 @@
"type": "object"
},
"alertGroup": {
"description": "AlertGroup alert group",
"properties": {
"alerts": {
"description": "alerts",
Expand All @@ -4146,7 +4155,6 @@
"type": "object"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"items": {
"$ref": "#/definitions/alertGroup"
},
Expand Down Expand Up @@ -4251,7 +4259,6 @@
"type": "object"
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"properties": {
"annotations": {
"$ref": "#/definitions/labelSet"
Expand Down Expand Up @@ -4307,14 +4314,12 @@
"type": "object"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"items": {
"$ref": "#/definitions/gettableAlert"
},
"type": "array"
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"properties": {
"comment": {
"description": "comment",
Expand Down Expand Up @@ -4363,6 +4368,7 @@
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/definitions/gettableSilence"
},
Expand Down Expand Up @@ -4550,7 +4556,6 @@
"type": "object"
},
"receiver": {
"description": "Receiver receiver",
"properties": {
"active": {
"description": "active",
Expand Down
17 changes: 11 additions & 6 deletions pkg/services/ngalert/api/tooling/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3588,6 +3588,9 @@
"description": "Error is a property to be set if the corresponding DataQuery has an error.",
"type": "string"
},
"ErrorSource": {
"$ref": "#/definitions/ErrorSource"
},
"Frames": {
"$ref": "#/definitions/Frames"
},
Expand Down Expand Up @@ -3792,6 +3795,10 @@
}
}
},
"ErrorSource": {
"description": "ErrorSource type defines the source of the error",
"type": "string"
},
"ErrorType": {
"type": "string",
"title": "ErrorType models the different API error types."
Expand Down Expand Up @@ -6864,8 +6871,9 @@
}
},
"URL": {
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the EscapedPath method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
"type": "object",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"title": "A URL represents a parsed URL (technically, a URI reference).",
"properties": {
"ForceQuery": {
"type": "boolean"
Expand Down Expand Up @@ -7105,6 +7113,7 @@
}
},
"alertGroup": {
"description": "AlertGroup alert group",
"type": "object",
"required": [
"alerts",
Expand All @@ -7129,7 +7138,6 @@
"$ref": "#/definitions/alertGroup"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"type": "array",
"items": {
"$ref": "#/definitions/alertGroup"
Expand Down Expand Up @@ -7235,7 +7243,6 @@
}
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"type": "object",
"required": [
"labels",
Expand Down Expand Up @@ -7292,15 +7299,13 @@
"$ref": "#/definitions/gettableAlert"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"type": "array",
"items": {
"$ref": "#/definitions/gettableAlert"
},
"$ref": "#/definitions/gettableAlerts"
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"type": "object",
"required": [
"comment",
Expand Down Expand Up @@ -7350,6 +7355,7 @@
"$ref": "#/definitions/gettableSilence"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"type": "array",
"items": {
"$ref": "#/definitions/gettableSilence"
Expand Down Expand Up @@ -7540,7 +7546,6 @@
"$ref": "#/definitions/postableSilence"
},
"receiver": {
"description": "Receiver receiver",
"type": "object",
"required": [
"active",
Expand Down

0 comments on commit 36ae086

Please sign in to comment.