BugFix: Allow to specify mastership role through REST API
In current implementation, swagger doc does match with codec impl.
With this commit, we can assign an exact mastership role for a
device through REST API.
Change-Id: I5cb3f8d478f8fe3eb22f12fc5254ed8a400d5b56
diff --git a/web/api/src/main/resources/definitions/MastershipPut.json b/web/api/src/main/resources/definitions/MastershipPut.json
index 67f0437..390a0fb 100644
--- a/web/api/src/main/resources/definitions/MastershipPut.json
+++ b/web/api/src/main/resources/definitions/MastershipPut.json
@@ -4,7 +4,7 @@
"required": [
"deviceId",
"nodeId",
- "mastershipRole"
+ "role"
],
"properties": {
"deviceId": {
@@ -15,7 +15,7 @@
"type": "string",
"example": "1"
},
- "mastershipRole": {
+ "role": {
"type": "string",
"example": "MASTER"
}
diff --git a/web/api/src/main/resources/definitions/MastershipRole.json b/web/api/src/main/resources/definitions/MastershipRole.json
index add66aa..a7706db 100644
--- a/web/api/src/main/resources/definitions/MastershipRole.json
+++ b/web/api/src/main/resources/definitions/MastershipRole.json
@@ -1,6 +1,6 @@
{
"type": "object",
- "title": "mastershipRole",
+ "title": "role",
"required": [
"role"
],