ngalert swagger: Fix status code (#79415)

This endpoint returns a 202, not a 204
Let me know if we should instead change the response of the API
This commit is contained in:
Julien Duchesne 2023-12-12 13:40:36 -05:00 committed by GitHub
parent 0918d000bf
commit f977e3faf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 35 additions and 36 deletions

View File

@ -1928,13 +1928,13 @@
}, },
"MuteTimeIntervalExport": { "MuteTimeIntervalExport": {
"properties": { "properties": {
"OrgID": {
"format": "int64",
"type": "integer"
},
"name": { "name": {
"type": "string" "type": "string"
}, },
"orgId": {
"format": "int64",
"type": "integer"
},
"time_intervals": { "time_intervals": {
"items": { "items": {
"$ref": "#/definitions/TimeInterval" "$ref": "#/definitions/TimeInterval"
@ -4252,6 +4252,7 @@
"type": "object" "type": "object"
}, },
"alertGroups": { "alertGroups": {
"description": "AlertGroups alert groups",
"items": { "items": {
"$ref": "#/definitions/alertGroup" "$ref": "#/definitions/alertGroup"
}, },
@ -4356,6 +4357,7 @@
"type": "object" "type": "object"
}, },
"gettableAlert": { "gettableAlert": {
"description": "GettableAlert gettable alert",
"properties": { "properties": {
"annotations": { "annotations": {
"$ref": "#/definitions/labelSet" "$ref": "#/definitions/labelSet"
@ -4418,7 +4420,6 @@
"type": "array" "type": "array"
}, },
"gettableSilence": { "gettableSilence": {
"description": "GettableSilence gettable silence",
"properties": { "properties": {
"comment": { "comment": {
"description": "comment", "description": "comment",
@ -4467,7 +4468,6 @@
"type": "object" "type": "object"
}, },
"gettableSilences": { "gettableSilences": {
"description": "GettableSilences gettable silences",
"items": { "items": {
"$ref": "#/definitions/gettableSilence" "$ref": "#/definitions/gettableSilence"
}, },
@ -4618,6 +4618,7 @@
"type": "array" "type": "array"
}, },
"postableSilence": { "postableSilence": {
"description": "PostableSilence postable silence",
"properties": { "properties": {
"comment": { "comment": {
"description": "comment", "description": "comment",
@ -5156,7 +5157,7 @@
} }
], ],
"responses": { "responses": {
"204": { "202": {
"description": " The contact point was deleted successfully." "description": " The contact point was deleted successfully."
} }
}, },

View File

@ -49,7 +49,7 @@ import (
// - application/json // - application/json
// //
// Responses: // Responses:
// 204: description: The contact point was deleted successfully. // 202: description: The contact point was deleted successfully.
// swagger:parameters RoutePutContactpoint RouteDeleteContactpoints // swagger:parameters RoutePutContactpoint RouteDeleteContactpoints
type ContactPointUIDReference struct { type ContactPointUIDReference struct {

View File

@ -1928,13 +1928,13 @@
}, },
"MuteTimeIntervalExport": { "MuteTimeIntervalExport": {
"properties": { "properties": {
"OrgID": {
"format": "int64",
"type": "integer"
},
"name": { "name": {
"type": "string" "type": "string"
}, },
"orgId": {
"format": "int64",
"type": "integer"
},
"time_intervals": { "time_intervals": {
"items": { "items": {
"$ref": "#/definitions/TimeInterval" "$ref": "#/definitions/TimeInterval"
@ -4419,7 +4419,6 @@
"type": "array" "type": "array"
}, },
"gettableSilence": { "gettableSilence": {
"description": "GettableSilence gettable silence",
"properties": { "properties": {
"comment": { "comment": {
"description": "comment", "description": "comment",
@ -4618,7 +4617,6 @@
"type": "array" "type": "array"
}, },
"postableSilence": { "postableSilence": {
"description": "PostableSilence postable silence",
"properties": { "properties": {
"comment": { "comment": {
"description": "comment", "description": "comment",
@ -7136,7 +7134,7 @@
} }
], ],
"responses": { "responses": {
"204": { "202": {
"description": " The contact point was deleted successfully." "description": " The contact point was deleted successfully."
} }
}, },

View File

@ -2433,7 +2433,7 @@
} }
], ],
"responses": { "responses": {
"204": { "202": {
"description": " The contact point was deleted successfully." "description": " The contact point was deleted successfully."
} }
} }
@ -5082,13 +5082,13 @@
"MuteTimeIntervalExport": { "MuteTimeIntervalExport": {
"type": "object", "type": "object",
"properties": { "properties": {
"OrgID": {
"type": "integer",
"format": "int64"
},
"name": { "name": {
"type": "string" "type": "string"
}, },
"orgId": {
"type": "integer",
"format": "int64"
},
"time_intervals": { "time_intervals": {
"type": "array", "type": "array",
"items": { "items": {
@ -7576,7 +7576,6 @@
"$ref": "#/definitions/gettableAlerts" "$ref": "#/definitions/gettableAlerts"
}, },
"gettableSilence": { "gettableSilence": {
"description": "GettableSilence gettable silence",
"type": "object", "type": "object",
"required": [ "required": [
"comment", "comment",
@ -7778,7 +7777,6 @@
} }
}, },
"postableSilence": { "postableSilence": {
"description": "PostableSilence postable silence",
"type": "object", "type": "object",
"required": [ "required": [
"comment", "comment",

View File

@ -2891,7 +2891,7 @@
} }
], ],
"responses": { "responses": {
"204": { "202": {
"description": " The contact point was deleted successfully." "description": " The contact point was deleted successfully."
} }
} }
@ -15785,13 +15785,13 @@
"MuteTimeIntervalExport": { "MuteTimeIntervalExport": {
"type": "object", "type": "object",
"properties": { "properties": {
"OrgID": {
"type": "integer",
"format": "int64"
},
"name": { "name": {
"type": "string" "type": "string"
}, },
"orgId": {
"type": "integer",
"format": "int64"
},
"time_intervals": { "time_intervals": {
"type": "array", "type": "array",
"items": { "items": {
@ -20671,6 +20671,7 @@
} }
}, },
"alertGroups": { "alertGroups": {
"description": "AlertGroups alert groups",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/alertGroup" "$ref": "#/definitions/alertGroup"
@ -20803,6 +20804,7 @@
} }
}, },
"gettableAlert": { "gettableAlert": {
"description": "GettableAlert gettable alert",
"type": "object", "type": "object",
"required": [ "required": [
"labels", "labels",
@ -20865,7 +20867,6 @@
} }
}, },
"gettableSilence": { "gettableSilence": {
"description": "GettableSilence gettable silence",
"type": "object", "type": "object",
"required": [ "required": [
"comment", "comment",
@ -20914,7 +20915,6 @@
} }
}, },
"gettableSilences": { "gettableSilences": {
"description": "GettableSilences gettable silences",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/gettableSilence" "$ref": "#/definitions/gettableSilence"
@ -21065,6 +21065,7 @@
} }
}, },
"postableSilence": { "postableSilence": {
"description": "PostableSilence postable silence",
"type": "object", "type": "object",
"required": [ "required": [
"comment", "comment",

View File

@ -6717,13 +6717,13 @@
}, },
"MuteTimeIntervalExport": { "MuteTimeIntervalExport": {
"properties": { "properties": {
"OrgID": {
"format": "int64",
"type": "integer"
},
"name": { "name": {
"type": "string" "type": "string"
}, },
"orgId": {
"format": "int64",
"type": "integer"
},
"time_intervals": { "time_intervals": {
"items": { "items": {
"$ref": "#/components/schemas/TimeInterval" "$ref": "#/components/schemas/TimeInterval"
@ -11602,6 +11602,7 @@
"type": "object" "type": "object"
}, },
"alertGroups": { "alertGroups": {
"description": "AlertGroups alert groups",
"items": { "items": {
"$ref": "#/components/schemas/alertGroup" "$ref": "#/components/schemas/alertGroup"
}, },
@ -11734,6 +11735,7 @@
"type": "object" "type": "object"
}, },
"gettableAlert": { "gettableAlert": {
"description": "GettableAlert gettable alert",
"properties": { "properties": {
"annotations": { "annotations": {
"$ref": "#/components/schemas/labelSet" "$ref": "#/components/schemas/labelSet"
@ -11796,7 +11798,6 @@
"type": "array" "type": "array"
}, },
"gettableSilence": { "gettableSilence": {
"description": "GettableSilence gettable silence",
"properties": { "properties": {
"comment": { "comment": {
"description": "comment", "description": "comment",
@ -11845,7 +11846,6 @@
"type": "object" "type": "object"
}, },
"gettableSilences": { "gettableSilences": {
"description": "GettableSilences gettable silences",
"items": { "items": {
"$ref": "#/components/schemas/gettableSilence" "$ref": "#/components/schemas/gettableSilence"
}, },
@ -11996,6 +11996,7 @@
"type": "array" "type": "array"
}, },
"postableSilence": { "postableSilence": {
"description": "PostableSilence postable silence",
"properties": { "properties": {
"comment": { "comment": {
"description": "comment", "description": "comment",
@ -15294,7 +15295,7 @@
} }
], ],
"responses": { "responses": {
"204": { "202": {
"description": " The contact point was deleted successfully." "description": " The contact point was deleted successfully."
} }
}, },