Alerting: Support for optimistic concurrency in priovisioning Tempate API (#91195)

* support optimistic concurrency in template service

* update request handler to get version from query parameter

* return not found if a new template is set with version

* update PUT api to set version

* update documentation + for mute timings

---------

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
This commit is contained in:
Yuri Tseretyan
2024-08-09 11:40:07 -04:00
committed by GitHub
co-authored by brendamuir
parent d20510a1db
commit 1108a00668
12 changed files with 371 additions and 53 deletions
+25 -1
View File
@@ -3393,6 +3393,12 @@
"schema": {
"$ref": "#/definitions/ValidationError"
}
},
"409": {
"description": "GenericPublicError",
"schema": {
"$ref": "#/definitions/GenericPublicError"
}
}
}
},
@@ -3406,15 +3412,27 @@
"parameters": [
{
"type": "string",
"description": "Template Name",
"description": "Template name",
"name": "name",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Version of template to use for optimistic concurrency. Leave empty to disable validation",
"name": "version",
"in": "query"
}
],
"responses": {
"204": {
"description": " The template was deleted successfully."
},
"409": {
"description": "GenericPublicError",
"schema": {
"$ref": "#/definitions/GenericPublicError"
}
}
}
}
@@ -5880,6 +5898,9 @@
},
"template": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
@@ -5888,6 +5909,9 @@
"properties": {
"template": {
"type": "string"
},
"version": {
"type": "string"
}
}
},