From 0db6d269fe32d79774df6dd7f9d4897ed1c96c5d Mon Sep 17 00:00:00 2001 From: "Liangying.Wei" Date: Thu, 1 Sep 2022 09:39:24 +0800 Subject: [PATCH 01/14] Reorder the swagger actions following relativePath_httpmethod --- .../stable/2021-10-01/webpubsub.json | 438 +++++++++--------- 1 file changed, 219 insertions(+), 219 deletions(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json index c6db43b78888..9559a0d73c26 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json @@ -36,13 +36,13 @@ } } }, - "/api/hubs/{hub}/:generateToken": { + "/api/hubs/{hub}/:closeConnections": { "post": { "tags": [ "webpubsub" ], - "summary": "Generate token for the client to connect Azure Web PubSub service.", - "operationId": "WebPubSub_GenerateClientToken", + "summary": "Close the connections in the hub.", + "operationId": "WebPubSub_CloseAllConnections", "produces": [ "text/plain", "application/json", @@ -59,14 +59,8 @@ }, { "in": "query", - "name": "userId", - "description": "User Id.", - "type": "string" - }, - { - "in": "query", - "name": "role", - "description": "Roles that the connection with the generated token will have.", + "name": "excluded", + "description": "Exclude these connectionIds when closing the connections in the hub.", "type": "array", "items": { "type": "string" @@ -75,11 +69,9 @@ }, { "in": "query", - "name": "minutesToExpire", - "description": "The expire time of the generated token.", - "type": "integer", - "format": "int32", - "default": 60 + "name": "reason", + "description": "The reason closing the client connection.", + "type": "string" }, { "in": "query", @@ -90,11 +82,8 @@ } ], "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/ClientTokenResponse" - } + "204": { + "description": "Success" }, "default": { "description": "Error response", @@ -112,13 +101,13 @@ } } }, - "/api/hubs/{hub}/:closeConnections": { + "/api/hubs/{hub}/:generateToken": { "post": { "tags": [ "webpubsub" ], - "summary": "Close the connections in the hub.", - "operationId": "WebPubSub_CloseAllConnections", + "summary": "Generate token for the client to connect Azure Web PubSub service.", + "operationId": "WebPubSub_GenerateClientToken", "produces": [ "text/plain", "application/json", @@ -135,8 +124,14 @@ }, { "in": "query", - "name": "excluded", - "description": "Exclude these connectionIds when closing the connections in the hub.", + "name": "userId", + "description": "User Id.", + "type": "string" + }, + { + "in": "query", + "name": "role", + "description": "Roles that the connection with the generated token will have.", "type": "array", "items": { "type": "string" @@ -145,9 +140,11 @@ }, { "in": "query", - "name": "reason", - "description": "The reason closing the client connection.", - "type": "string" + "name": "minutesToExpire", + "description": "The expire time of the generated token.", + "type": "integer", + "format": "int32", + "default": 60 }, { "in": "query", @@ -158,8 +155,11 @@ } ], "responses": { - "204": { - "description": "Success" + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ClientTokenResponse" + } }, "default": { "description": "Error response", @@ -252,12 +252,12 @@ } }, "/api/hubs/{hub}/connections/{connectionId}": { - "head": { + "delete": { "tags": [ "webpubsub" ], - "summary": "Check if the connection with the given connectionId exists.", - "operationId": "WebPubSub_ConnectionExists", + "summary": "Close the client connection.", + "operationId": "WebPubSub_CloseConnection", "produces": [ "text/plain", "application/json", @@ -275,11 +275,17 @@ { "in": "path", "name": "connectionId", - "description": "The connection Id.", + "description": "Target connection Id.", "required": true, "type": "string", "minLength": 1 }, + { + "in": "query", + "name": "reason", + "description": "The reason closing the client connection.", + "type": "string" + }, { "in": "query", "name": "api-version", @@ -289,12 +295,9 @@ } ], "responses": { - "200": { + "204": { "description": "Success" }, - "404": { - "description": "Not Found" - }, "default": { "description": "Error response", "schema": { @@ -310,12 +313,12 @@ } } }, - "delete": { + "head": { "tags": [ "webpubsub" ], - "summary": "Close the client connection.", - "operationId": "WebPubSub_CloseConnection", + "summary": "Check if the connection with the given connectionId exists.", + "operationId": "WebPubSub_ConnectionExists", "produces": [ "text/plain", "application/json", @@ -333,17 +336,11 @@ { "in": "path", "name": "connectionId", - "description": "Target connection Id.", + "description": "The connection Id.", "required": true, "type": "string", "minLength": 1 }, - { - "in": "query", - "name": "reason", - "description": "The reason closing the client connection.", - "type": "string" - }, { "in": "query", "name": "api-version", @@ -353,9 +350,12 @@ } ], "responses": { - "204": { + "200": { "description": "Success" }, + "404": { + "description": "Not Found" + }, "default": { "description": "Error response", "schema": { @@ -663,12 +663,12 @@ } }, "/api/hubs/{hub}/groups/{group}/connections/{connectionId}": { - "put": { + "delete": { "tags": [ "webpubsub" ], - "summary": "Add a connection to the target group.", - "operationId": "WebPubSub_AddConnectionToGroup", + "summary": "Remove a connection from the target group.", + "operationId": "WebPubSub_RemoveConnectionFromGroup", "produces": [ "text/plain", "application/json", @@ -695,7 +695,7 @@ { "in": "path", "name": "connectionId", - "description": "Target connection Id", + "description": "Target connection Id.", "required": true, "type": "string", "minLength": 1 @@ -709,7 +709,7 @@ } ], "responses": { - "200": { + "204": { "description": "Success" }, "default": { @@ -727,12 +727,12 @@ } } }, - "delete": { + "put": { "tags": [ "webpubsub" ], - "summary": "Remove a connection from the target group.", - "operationId": "WebPubSub_RemoveConnectionFromGroup", + "summary": "Add a connection to the target group.", + "operationId": "WebPubSub_AddConnectionToGroup", "produces": [ "text/plain", "application/json", @@ -759,7 +759,7 @@ { "in": "path", "name": "connectionId", - "description": "Target connection Id.", + "description": "Target connection Id", "required": true, "type": "string", "minLength": 1 @@ -773,7 +773,7 @@ } ], "responses": { - "204": { + "200": { "description": "Success" }, "default": { @@ -792,13 +792,13 @@ } } }, - "/api/hubs/{hub}/users/{userId}": { - "head": { + "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}": { + "delete": { "tags": [ "webpubsub" ], - "summary": "Check if there are any client connections connected for the given user.", - "operationId": "WebPubSub_UserExists", + "summary": "Revoke permission for the connection.", + "operationId": "WebPubSub_RevokePermission", "produces": [ "text/plain", "application/json", @@ -815,12 +815,33 @@ }, { "in": "path", - "name": "userId", - "description": "Target user Id.", + "name": "permission", + "description": "The permission: current supported actions are joinLeaveGroup and sendToGroup.", + "required": true, + "type": "string", + "enum": [ + "sendToGroup", + "joinLeaveGroup" + ], + "x-ms-enum": { + "name": "WebPubSubPermission", + "modelAsString": true + } + }, + { + "in": "path", + "name": "connectionId", + "description": "Target connection Id.", "required": true, "type": "string", "minLength": 1 }, + { + "in": "query", + "name": "targetName", + "description": "The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name.", + "type": "string" + }, { "in": "query", "name": "api-version", @@ -830,12 +851,9 @@ } ], "responses": { - "200": { + "204": { "description": "Success" }, - "404": { - "description": "Not Found" - }, "default": { "description": "Error response", "schema": { @@ -850,15 +868,13 @@ } } } - } - }, - "/api/hubs/{hub}/users/{userId}/:closeConnections": { - "post": { + }, + "head": { "tags": [ "webpubsub" ], - "summary": "Close connections for the specific user.", - "operationId": "WebPubSub_CloseUserConnections", + "summary": "Check if a connection has permission to the specified action.", + "operationId": "WebPubSub_CheckPermission", "produces": [ "text/plain", "application/json", @@ -875,26 +891,31 @@ }, { "in": "path", - "name": "userId", - "description": "The user Id.", + "name": "permission", + "description": "The permission: current supported actions are joinLeaveGroup and sendToGroup.", "required": true, "type": "string", - "minLength": 1 + "enum": [ + "sendToGroup", + "joinLeaveGroup" + ], + "x-ms-enum": { + "name": "WebPubSubPermission", + "modelAsString": true + } }, { - "in": "query", - "name": "excluded", - "description": "Exclude these connectionIds when closing the connections for the user.", - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" + "in": "path", + "name": "connectionId", + "description": "Target connection Id.", + "required": true, + "type": "string", + "minLength": 1 }, { "in": "query", - "name": "reason", - "description": "The reason closing the client connection.", + "name": "targetName", + "description": "The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name.", "type": "string" }, { @@ -906,9 +927,12 @@ } ], "responses": { - "204": { + "200": { "description": "Success" }, + "404": { + "description": "Not Found" + }, "default": { "description": "Error response", "schema": { @@ -923,20 +947,13 @@ } } } - } - }, - "/api/hubs/{hub}/users/{userId}/:send": { - "post": { + }, + "put": { "tags": [ "webpubsub" ], - "summary": "Send content inside request body to the specific user.", - "operationId": "WebPubSub_SendToUser", - "consumes": [ - "application/octet-stream", - "text/plain", - "application/json" - ], + "summary": "Grant permission to the connection.", + "operationId": "WebPubSub_GrantPermission", "produces": [ "text/plain", "application/json", @@ -953,32 +970,43 @@ }, { "in": "path", - "name": "userId", - "description": "The user Id.", + "name": "permission", + "description": "The permission: current supported actions are joinLeaveGroup and sendToGroup.", + "required": true, + "type": "string", + "enum": [ + "sendToGroup", + "joinLeaveGroup" + ], + "x-ms-enum": { + "name": "WebPubSubPermission", + "modelAsString": true + } + }, + { + "in": "path", + "name": "connectionId", + "description": "Target connection Id.", "required": true, "type": "string", "minLength": 1 }, { "in": "query", - "name": "api-version", - "description": "The version of the REST APIs.", - "required": true, + "name": "targetName", + "description": "The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name.", "type": "string" }, { - "in": "body", - "name": "message", - "description": "The payload body.", + "in": "query", + "name": "api-version", + "description": "The version of the REST APIs.", "required": true, - "schema": { - "format": "binary", - "type": "string" - } + "type": "string" } ], "responses": { - "202": { + "200": { "description": "Success" }, "default": { @@ -997,13 +1025,13 @@ } } }, - "/api/hubs/{hub}/users/{userId}/groups/{group}": { - "put": { + "/api/hubs/{hub}/users/{userId}": { + "head": { "tags": [ "webpubsub" ], - "summary": "Add a user to the target group.", - "operationId": "WebPubSub_AddUserToGroup", + "summary": "Check if there are any client connections connected for the given user.", + "operationId": "WebPubSub_UserExists", "produces": [ "text/plain", "application/json", @@ -1018,15 +1046,6 @@ "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$" }, - { - "in": "path", - "name": "group", - "description": "Target group name, which length should be greater than 0 and less than 1025.", - "required": true, - "type": "string", - "maxLength": 1024, - "minLength": 1 - }, { "in": "path", "name": "userId", @@ -1047,6 +1066,9 @@ "200": { "description": "Success" }, + "404": { + "description": "Not Found" + }, "default": { "description": "Error response", "schema": { @@ -1061,13 +1083,15 @@ } } } - }, - "delete": { + } + }, + "/api/hubs/{hub}/users/{userId}/:closeConnections": { + "post": { "tags": [ "webpubsub" ], - "summary": "Remove a user from the target group.", - "operationId": "WebPubSub_RemoveUserFromGroup", + "summary": "Close connections for the specific user.", + "operationId": "WebPubSub_CloseUserConnections", "produces": [ "text/plain", "application/json", @@ -1084,20 +1108,27 @@ }, { "in": "path", - "name": "group", - "description": "Target group name, which length should be greater than 0 and less than 1025.", + "name": "userId", + "description": "The user Id.", "required": true, "type": "string", - "maxLength": 1024, "minLength": 1 }, { - "in": "path", - "name": "userId", - "description": "Target user Id.", - "required": true, - "type": "string", - "minLength": 1 + "in": "query", + "name": "excluded", + "description": "Exclude these connectionIds when closing the connections for the user.", + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "in": "query", + "name": "reason", + "description": "The reason closing the client connection.", + "type": "string" }, { "in": "query", @@ -1127,13 +1158,18 @@ } } }, - "/api/hubs/{hub}/users/{userId}/groups": { - "delete": { + "/api/hubs/{hub}/users/{userId}/:send": { + "post": { "tags": [ "webpubsub" ], - "summary": "Remove a user from all groups.", - "operationId": "WebPubSub_RemoveUserFromAllGroups", + "summary": "Send content inside request body to the specific user.", + "operationId": "WebPubSub_SendToUser", + "consumes": [ + "application/octet-stream", + "text/plain", + "application/json" + ], "produces": [ "text/plain", "application/json", @@ -1151,7 +1187,7 @@ { "in": "path", "name": "userId", - "description": "Target user Id.", + "description": "The user Id.", "required": true, "type": "string", "minLength": 1 @@ -1162,10 +1198,20 @@ "description": "The version of the REST APIs.", "required": true, "type": "string" + }, + { + "in": "body", + "name": "message", + "description": "The payload body.", + "required": true, + "schema": { + "format": "binary", + "type": "string" + } } ], "responses": { - "204": { + "202": { "description": "Success" }, "default": { @@ -1184,13 +1230,13 @@ } } }, - "/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}": { - "put": { + "/api/hubs/{hub}/users/{userId}/groups": { + "delete": { "tags": [ "webpubsub" ], - "summary": "Grant permission to the connection.", - "operationId": "WebPubSub_GrantPermission", + "summary": "Remove a user from all groups.", + "operationId": "WebPubSub_RemoveUserFromAllGroups", "produces": [ "text/plain", "application/json", @@ -1207,33 +1253,12 @@ }, { "in": "path", - "name": "permission", - "description": "The permission: current supported actions are joinLeaveGroup and sendToGroup.", - "required": true, - "type": "string", - "enum": [ - "sendToGroup", - "joinLeaveGroup" - ], - "x-ms-enum": { - "name": "WebPubSubPermission", - "modelAsString": true - } - }, - { - "in": "path", - "name": "connectionId", - "description": "Target connection Id.", + "name": "userId", + "description": "Target user Id.", "required": true, "type": "string", "minLength": 1 }, - { - "in": "query", - "name": "targetName", - "description": "The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name.", - "type": "string" - }, { "in": "query", "name": "api-version", @@ -1243,7 +1268,7 @@ } ], "responses": { - "200": { + "204": { "description": "Success" }, "default": { @@ -1260,13 +1285,15 @@ } } } - }, + } + }, + "/api/hubs/{hub}/users/{userId}/groups/{group}": { "delete": { "tags": [ "webpubsub" ], - "summary": "Revoke permission for the connection.", - "operationId": "WebPubSub_RevokePermission", + "summary": "Remove a user from the target group.", + "operationId": "WebPubSub_RemoveUserFromGroup", "produces": [ "text/plain", "application/json", @@ -1283,33 +1310,21 @@ }, { "in": "path", - "name": "permission", - "description": "The permission: current supported actions are joinLeaveGroup and sendToGroup.", + "name": "group", + "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "enum": [ - "sendToGroup", - "joinLeaveGroup" - ], - "x-ms-enum": { - "name": "WebPubSubPermission", - "modelAsString": true - } + "maxLength": 1024, + "minLength": 1 }, { "in": "path", - "name": "connectionId", - "description": "Target connection Id.", + "name": "userId", + "description": "Target user Id.", "required": true, "type": "string", "minLength": 1 }, - { - "in": "query", - "name": "targetName", - "description": "The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name.", - "type": "string" - }, { "in": "query", "name": "api-version", @@ -1337,12 +1352,12 @@ } } }, - "head": { + "put": { "tags": [ "webpubsub" ], - "summary": "Check if a connection has permission to the specified action.", - "operationId": "WebPubSub_CheckPermission", + "summary": "Add a user to the target group.", + "operationId": "WebPubSub_AddUserToGroup", "produces": [ "text/plain", "application/json", @@ -1359,33 +1374,21 @@ }, { "in": "path", - "name": "permission", - "description": "The permission: current supported actions are joinLeaveGroup and sendToGroup.", + "name": "group", + "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "enum": [ - "sendToGroup", - "joinLeaveGroup" - ], - "x-ms-enum": { - "name": "WebPubSubPermission", - "modelAsString": true - } + "maxLength": 1024, + "minLength": 1 }, { "in": "path", - "name": "connectionId", - "description": "Target connection Id.", + "name": "userId", + "description": "Target user Id.", "required": true, "type": "string", "minLength": 1 }, - { - "in": "query", - "name": "targetName", - "description": "The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name.", - "type": "string" - }, { "in": "query", "name": "api-version", @@ -1398,9 +1401,6 @@ "200": { "description": "Success" }, - "404": { - "description": "Not Found" - }, "default": { "description": "Error response", "schema": { From 9d45de63b5e22f4e304114bec436b1177bea2b9f Mon Sep 17 00:00:00 2001 From: "Liangying.Wei" Date: Fri, 9 Sep 2022 17:49:12 +0800 Subject: [PATCH 02/14] Create HealthApi_GetServiceStatus.json --- .../stable/2021-10-01/examples/HealthApi_GetServiceStatus.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json @@ -0,0 +1 @@ + From c8ed574a0fc939876aed15dad88f1a2a4b5765fc Mon Sep 17 00:00:00 2001 From: "Liangying.Wei" Date: Fri, 9 Sep 2022 17:49:46 +0800 Subject: [PATCH 03/14] Add files via upload --- .../examples/WebPubSub_AddConnectionToGroup.json | 11 +++++++++++ .../examples/WebPubSub_AddUserToGroup.json | 11 +++++++++++ .../examples/WebPubSub_CheckPermission.json | 13 +++++++++++++ .../examples/WebPubSub_CloseAllConnections.json | 10 ++++++++++ .../examples/WebPubSub_CloseConnection.json | 11 +++++++++++ .../examples/WebPubSub_CloseGroupConnections.json | 11 +++++++++++ .../examples/WebPubSub_CloseUserConnections.json | 11 +++++++++++ .../examples/WebPubSub_ConnectionExists.json | 11 +++++++++++ .../examples/WebPubSub_GenerateClientToken.json | 11 +++++++++++ .../examples/WebPubSub_GrantPermission.json | 12 ++++++++++++ .../2021-10-01/examples/WebPubSub_GroupExists.json | 11 +++++++++++ .../WebPubSub_RemoveConnectionFromGroup.json | 11 +++++++++++ .../examples/WebPubSub_RemoveUserFromAllGroups.json | 10 ++++++++++ .../examples/WebPubSub_RemoveUserFromGroup.json | 11 +++++++++++ .../examples/WebPubSub_RevokePermission.json | 12 ++++++++++++ .../2021-10-01/examples/WebPubSub_SendToAll.json | 9 +++++++++ .../examples/WebPubSub_SendToConnection.json | 10 ++++++++++ .../2021-10-01/examples/WebPubSub_SendToGroup.json | 10 ++++++++++ .../2021-10-01/examples/WebPubSub_SendToUser.json | 10 ++++++++++ .../2021-10-01/examples/WebPubSub_UserExists.json | 11 +++++++++++ 20 files changed, 217 insertions(+) create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddConnectionToGroup.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddUserToGroup.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CheckPermission.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseAllConnections.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseConnection.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseGroupConnections.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseUserConnections.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_ConnectionExists.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GenerateClientToken.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GrantPermission.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GroupExists.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveConnectionFromGroup.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromGroup.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RevokePermission.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToAll.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToConnection.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToGroup.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToUser.json create mode 100644 specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_UserExists.json diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddConnectionToGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddConnectionToGroup.json new file mode 100644 index 000000000000..e07b0a2545b8 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddConnectionToGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "group": "group1", + "connectionId": "connection1" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddUserToGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddUserToGroup.json new file mode 100644 index 000000000000..ecdbb9132f04 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddUserToGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "group": "group1", + "userId": "user1" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CheckPermission.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CheckPermission.json new file mode 100644 index 000000000000..501af5eec3e5 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CheckPermission.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "permission": "joinLeaveGroup", + "connectionId": "connection1", + "targetName": "group1" + }, + "responses": { + "200": {}, + "404": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseAllConnections.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseAllConnections.json new file mode 100644 index 000000000000..71c0a265be7a --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseAllConnections.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "reason": "Close reason" + }, + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseConnection.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseConnection.json new file mode 100644 index 000000000000..deab1fc34f9c --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseConnection.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "connectionId": "connection1", + "reason": "Close reason" + }, + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseGroupConnections.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseGroupConnections.json new file mode 100644 index 000000000000..7e2546b6edc5 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseGroupConnections.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "group": "group1", + "reason": "Close reason" + }, + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseUserConnections.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseUserConnections.json new file mode 100644 index 000000000000..edadb095ab1e --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseUserConnections.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "userId": "user1", + "reason": "Close reason" + }, + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_ConnectionExists.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_ConnectionExists.json new file mode 100644 index 000000000000..bab795dd59df --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_ConnectionExists.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "connectionId": "connection1" + }, + "responses": { + "200": {}, + "404": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GenerateClientToken.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GenerateClientToken.json new file mode 100644 index 000000000000..38d84cbd23d3 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GenerateClientToken.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "userId": "user1", + "minutesToExpire": 5 + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GrantPermission.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GrantPermission.json new file mode 100644 index 000000000000..c0c3f51f31f6 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GrantPermission.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "permission": "joinLeaveGroup", + "connectionId": "connection1", + "targetName": "group1" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GroupExists.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GroupExists.json new file mode 100644 index 000000000000..3a0adec87ddf --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GroupExists.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "group": "group1" + }, + "responses": { + "200": {}, + "404": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveConnectionFromGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveConnectionFromGroup.json new file mode 100644 index 000000000000..e3e74bce5706 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveConnectionFromGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "group": "group1", + "connectionId": "connection1" + }, + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json new file mode 100644 index 000000000000..867df63ae29e --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "userId": "user1" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromGroup.json new file mode 100644 index 000000000000..baae21be9cbe --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromGroup.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "group": "group1", + "userId": "user1" + }, + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RevokePermission.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RevokePermission.json new file mode 100644 index 000000000000..d5b8f2094fa5 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RevokePermission.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "permission": "joinLeaveGroup", + "connectionId": "connection1", + "targetName": "group1" + }, + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToAll.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToAll.json new file mode 100644 index 000000000000..73394fd79a45 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToAll.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1" + }, + "responses": { + "202": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToConnection.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToConnection.json new file mode 100644 index 000000000000..9d5298584fe1 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToConnection.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "connectionId": "connection1" + }, + "responses": { + "202": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToGroup.json new file mode 100644 index 000000000000..43bfd39c3687 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToGroup.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "group": "group1" + }, + "responses": { + "202": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToUser.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToUser.json new file mode 100644 index 000000000000..507332595564 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToUser.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "userId": "user1" + }, + "responses": { + "202": {} + } +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_UserExists.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_UserExists.json new file mode 100644 index 000000000000..6681498f3490 --- /dev/null +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_UserExists.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-10-01", + "hub": "hub1", + "userId": "user1" + }, + "responses": { + "200": {}, + "404": {} + } +} \ No newline at end of file From 72dacfafa648d9957c6b936700f11c75916f7785 Mon Sep 17 00:00:00 2001 From: "Liangying.Wei" Date: Fri, 9 Sep 2022 17:51:54 +0800 Subject: [PATCH 04/14] Update webpubsub.json --- .../stable/2021-10-01/webpubsub.json | 153 ++++++++++++++---- 1 file changed, 125 insertions(+), 28 deletions(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json index 9559a0d73c26..e3cd5918cf22 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json @@ -12,11 +12,6 @@ ], "summary": "Get service health status.", "operationId": "HealthApi_GetServiceStatus", - "produces": [ - "text/plain", - "application/json", - "text/json" - ], "parameters": [ { "in": "query", @@ -33,6 +28,11 @@ "default": { "description": "Error response" } + }, + "x-ms-examples": { + "HealthApi_GetServiceStatus": { + "$ref": "./examples/HealthApi_GetServiceStatus.json" + } } } }, @@ -83,7 +83,7 @@ ], "responses": { "204": { - "description": "Success" + "description": "No Content" }, "default": { "description": "Error response", @@ -98,6 +98,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_CloseAllConnections": { + "$ref": "./examples/WebPubSub_CloseAllConnections.json" + } } } }, @@ -144,7 +149,9 @@ "description": "The expire time of the generated token.", "type": "integer", "format": "int32", - "default": 60 + "default": 60, + "maximum": 2147483647, + "minimum": 1 }, { "in": "query", @@ -174,6 +181,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_GenerateClientToken": { + "$ref": "./examples/WebPubSub_GenerateClientToken.json" + } } } }, @@ -248,6 +260,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_SendToAll": { + "$ref": "./examples/WebPubSub_SendToAll.json" + } } } }, @@ -296,7 +313,7 @@ ], "responses": { "204": { - "description": "Success" + "description": "No Content" }, "default": { "description": "Error response", @@ -311,6 +328,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_CloseConnection": { + "$ref": "./examples/WebPubSub_CloseConnection.json" + } } }, "head": { @@ -369,6 +391,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_ConnectionExists": { + "$ref": "./examples/WebPubSub_ConnectionExists.json" + } } } }, @@ -426,7 +453,7 @@ ], "responses": { "202": { - "description": "Success" + "description": "Accepted" }, "default": { "description": "Error response", @@ -441,6 +468,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_SendToConnection": { + "$ref": "./examples/WebPubSub_SendToConnection.json" + } } } }, @@ -471,8 +503,7 @@ "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "maxLength": 1024, - "minLength": 1 + "pattern": "^(?!\\s+$).{1,1024}$" }, { "in": "query", @@ -502,6 +533,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_GroupExists": { + "$ref": "./examples/WebPubSub_GroupExists.json" + } } } }, @@ -532,8 +568,7 @@ "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "maxLength": 1024, - "minLength": 1 + "pattern": "^(?!\\s+$).{1,1024}$" }, { "in": "query", @@ -561,7 +596,7 @@ ], "responses": { "204": { - "description": "Success" + "description": "No Content" }, "default": { "description": "Error response", @@ -576,6 +611,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_CloseGroupConnections": { + "$ref": "./examples/WebPubSub_CloseGroupConnections.json" + } } } }, @@ -644,7 +684,7 @@ ], "responses": { "202": { - "description": "Success" + "description": "Accepted" }, "default": { "description": "Error response", @@ -659,6 +699,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_SendToGroup": { + "$ref": "./examples/WebPubSub_SendToGroup.json" + } } } }, @@ -710,7 +755,7 @@ ], "responses": { "204": { - "description": "Success" + "description": "No Content" }, "default": { "description": "Error response", @@ -725,6 +770,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_RemoveConnectionFromGroup": { + "$ref": "./examples/WebPubSub_RemoveConnectionFromGroup.json" + } } }, "put": { @@ -753,8 +803,7 @@ "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "maxLength": 1024, - "minLength": 1 + "pattern": "^(?!\\s+$).{1,1024}$" }, { "in": "path", @@ -789,6 +838,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_AddConnectionToGroup": { + "$ref": "./examples/WebPubSub_AddConnectionToGroup.json" + } } } }, @@ -852,7 +906,7 @@ ], "responses": { "204": { - "description": "Success" + "description": "No Content" }, "default": { "description": "Error response", @@ -867,6 +921,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_RevokePermission": { + "$ref": "./examples/WebPubSub_RevokePermission.json" + } } }, "head": { @@ -946,6 +1005,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_CheckPermission": { + "$ref": "./examples/WebPubSub_CheckPermission.json" + } } }, "put": { @@ -1022,6 +1086,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_GrantPermission": { + "$ref": "./examples/WebPubSub_GrantPermission.json" + } } } }, @@ -1082,6 +1151,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_UserExists": { + "$ref": "./examples/WebPubSub_UserExists.json" + } } } }, @@ -1140,7 +1214,7 @@ ], "responses": { "204": { - "description": "Success" + "description": "No Content" }, "default": { "description": "Error response", @@ -1155,6 +1229,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_CloseUserConnections": { + "$ref": "./examples/WebPubSub_CloseUserConnections.json" + } } } }, @@ -1212,7 +1291,7 @@ ], "responses": { "202": { - "description": "Success" + "description": "Accepted" }, "default": { "description": "Error response", @@ -1227,6 +1306,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_SendToUser": { + "$ref": "./examples/WebPubSub_SendToUser.json" + } } } }, @@ -1268,8 +1352,8 @@ } ], "responses": { - "204": { - "description": "Success" + "200": { + "description": "The user is deleted." }, "default": { "description": "Error response", @@ -1284,6 +1368,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_RemoveUserFromAllGroups": { + "$ref": "./examples/WebPubSub_RemoveUserFromAllGroups.json" + } } } }, @@ -1314,8 +1403,7 @@ "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "maxLength": 1024, - "minLength": 1 + "pattern": "^(?!\\s+$).{1,1024}$" }, { "in": "path", @@ -1335,7 +1423,7 @@ ], "responses": { "204": { - "description": "Success" + "description": "No Content" }, "default": { "description": "Error response", @@ -1350,6 +1438,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_RemoveUserFromGroup": { + "$ref": "./examples/WebPubSub_RemoveUserFromGroup.json" + } } }, "put": { @@ -1378,8 +1471,7 @@ "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "maxLength": 1024, - "minLength": 1 + "pattern": "^(?!\\s+$).{1,1024}$" }, { "in": "path", @@ -1414,6 +1506,11 @@ } } } + }, + "x-ms-examples": { + "WebPubSub_AddUserToGroup": { + "$ref": "./examples/WebPubSub_AddUserToGroup.json" + } } } } From ba0b7c7fbf2a8011f9c1d05c906cc502dc2a27b6 Mon Sep 17 00:00:00 2001 From: "Liangying.Wei" Date: Tue, 13 Sep 2022 10:06:42 +0800 Subject: [PATCH 05/14] Update HealthApi_GetServiceStatus.json --- .../2021-10-01/examples/HealthApi_GetServiceStatus.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json index 8b137891791f..64964b8a9555 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json @@ -1 +1,8 @@ - +{ + "parameters": { + "api-version": "2021-10-01" + }, + "responses": { + "200": {} + } +} From ffa46fe772c0869f4b9c07a39ec426f4bc2efd48 Mon Sep 17 00:00:00 2001 From: "Liangying.Wei" Date: Tue, 13 Sep 2022 10:38:30 +0800 Subject: [PATCH 06/14] Update webpubsub.json --- .../data-plane/WebPubSub/stable/2021-10-01/webpubsub.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json index e3cd5918cf22..ea077ce19875 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json @@ -1352,8 +1352,8 @@ } ], "responses": { - "200": { - "description": "The user is deleted." + "204": { + "description": "The user is removed from all groups." }, "default": { "description": "Error response", @@ -1423,7 +1423,7 @@ ], "responses": { "204": { - "description": "No Content" + "description": "The user is removed from the group." }, "default": { "description": "Error response", From 5baea2d23a0eb4fa1d845bc74d7dfee3620c7c58 Mon Sep 17 00:00:00 2001 From: Liangying Wei Date: Tue, 13 Sep 2022 14:19:04 +0800 Subject: [PATCH 07/14] Fix sample failure --- .../2021-10-01/examples/HealthApi_GetServiceStatus.json | 2 +- .../2021-10-01/examples/WebPubSub_GenerateClientToken.json | 6 +++++- .../examples/WebPubSub_RemoveUserFromAllGroups.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json index 64964b8a9555..10b356692406 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json @@ -5,4 +5,4 @@ "responses": { "200": {} } -} +} \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GenerateClientToken.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GenerateClientToken.json index 38d84cbd23d3..327c9b6acc68 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GenerateClientToken.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GenerateClientToken.json @@ -6,6 +6,10 @@ "minutesToExpire": 5 }, "responses": { - "200": {} + "200": { + "body": { + "token": "ABC" + } + } } } \ No newline at end of file diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json index 867df63ae29e..68f23f7f0fef 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json @@ -5,6 +5,6 @@ "userId": "user1" }, "responses": { - "200": {} + "204": {} } } \ No newline at end of file From 66bfc53cd437ddf098cdef21c21c0e8c3d45e542 Mon Sep 17 00:00:00 2001 From: Liangying Wei Date: Tue, 13 Sep 2022 14:23:17 +0800 Subject: [PATCH 08/14] Add message --- .../stable/2021-10-01/examples/WebPubSub_SendToAll.json | 3 ++- .../stable/2021-10-01/examples/WebPubSub_SendToConnection.json | 3 ++- .../stable/2021-10-01/examples/WebPubSub_SendToGroup.json | 3 ++- .../stable/2021-10-01/examples/WebPubSub_SendToUser.json | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToAll.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToAll.json index 73394fd79a45..4e9f071c491d 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToAll.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToAll.json @@ -1,7 +1,8 @@ { "parameters": { "api-version": "2021-10-01", - "hub": "hub1" + "hub": "hub1", + "message": "Message to send" }, "responses": { "202": {} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToConnection.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToConnection.json index 9d5298584fe1..7349b2c9489e 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToConnection.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToConnection.json @@ -2,7 +2,8 @@ "parameters": { "api-version": "2021-10-01", "hub": "hub1", - "connectionId": "connection1" + "connectionId": "connection1", + "message": "Message to send" }, "responses": { "202": {} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToGroup.json index 43bfd39c3687..d3f85a5e0d60 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToGroup.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToGroup.json @@ -2,7 +2,8 @@ "parameters": { "api-version": "2021-10-01", "hub": "hub1", - "group": "group1" + "group": "group1", + "message": "Message to send" }, "responses": { "202": {} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToUser.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToUser.json index 507332595564..0688c0d2097a 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToUser.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToUser.json @@ -2,7 +2,8 @@ "parameters": { "api-version": "2021-10-01", "hub": "hub1", - "userId": "user1" + "userId": "user1", + "message": "Message to send" }, "responses": { "202": {} From 075289d83193e81200c05d600c5b27237b224622 Mon Sep 17 00:00:00 2001 From: Liangying Wei Date: Tue, 13 Sep 2022 14:30:24 +0800 Subject: [PATCH 09/14] Prettier --- .../stable/2021-10-01/examples/HealthApi_GetServiceStatus.json | 2 +- .../2021-10-01/examples/WebPubSub_AddConnectionToGroup.json | 2 +- .../stable/2021-10-01/examples/WebPubSub_AddUserToGroup.json | 2 +- .../stable/2021-10-01/examples/WebPubSub_CheckPermission.json | 2 +- .../2021-10-01/examples/WebPubSub_CloseAllConnections.json | 2 +- .../stable/2021-10-01/examples/WebPubSub_CloseConnection.json | 2 +- .../2021-10-01/examples/WebPubSub_CloseGroupConnections.json | 2 +- .../2021-10-01/examples/WebPubSub_CloseUserConnections.json | 2 +- .../stable/2021-10-01/examples/WebPubSub_ConnectionExists.json | 2 +- .../2021-10-01/examples/WebPubSub_GenerateClientToken.json | 2 +- .../stable/2021-10-01/examples/WebPubSub_GrantPermission.json | 2 +- .../stable/2021-10-01/examples/WebPubSub_GroupExists.json | 2 +- .../examples/WebPubSub_RemoveConnectionFromGroup.json | 2 +- .../2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json | 2 +- .../2021-10-01/examples/WebPubSub_RemoveUserFromGroup.json | 2 +- .../stable/2021-10-01/examples/WebPubSub_RevokePermission.json | 2 +- .../stable/2021-10-01/examples/WebPubSub_SendToAll.json | 2 +- .../stable/2021-10-01/examples/WebPubSub_SendToConnection.json | 2 +- .../stable/2021-10-01/examples/WebPubSub_SendToGroup.json | 2 +- .../stable/2021-10-01/examples/WebPubSub_SendToUser.json | 2 +- .../stable/2021-10-01/examples/WebPubSub_UserExists.json | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json index 10b356692406..64964b8a9555 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/HealthApi_GetServiceStatus.json @@ -5,4 +5,4 @@ "responses": { "200": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddConnectionToGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddConnectionToGroup.json index e07b0a2545b8..fab5a7c09489 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddConnectionToGroup.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddConnectionToGroup.json @@ -8,4 +8,4 @@ "responses": { "200": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddUserToGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddUserToGroup.json index ecdbb9132f04..8a2e03f7bb47 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddUserToGroup.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_AddUserToGroup.json @@ -8,4 +8,4 @@ "responses": { "200": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CheckPermission.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CheckPermission.json index 501af5eec3e5..3a64b92b833a 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CheckPermission.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CheckPermission.json @@ -10,4 +10,4 @@ "200": {}, "404": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseAllConnections.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseAllConnections.json index 71c0a265be7a..0b2aa8f4ec5b 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseAllConnections.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseAllConnections.json @@ -7,4 +7,4 @@ "responses": { "204": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseConnection.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseConnection.json index deab1fc34f9c..fc4a12897478 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseConnection.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseConnection.json @@ -8,4 +8,4 @@ "responses": { "204": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseGroupConnections.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseGroupConnections.json index 7e2546b6edc5..f617479d7074 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseGroupConnections.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseGroupConnections.json @@ -8,4 +8,4 @@ "responses": { "204": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseUserConnections.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseUserConnections.json index edadb095ab1e..35efffd56840 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseUserConnections.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_CloseUserConnections.json @@ -8,4 +8,4 @@ "responses": { "204": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_ConnectionExists.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_ConnectionExists.json index bab795dd59df..1de67bfbe343 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_ConnectionExists.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_ConnectionExists.json @@ -8,4 +8,4 @@ "200": {}, "404": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GenerateClientToken.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GenerateClientToken.json index 327c9b6acc68..f0bed1a3c14b 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GenerateClientToken.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GenerateClientToken.json @@ -12,4 +12,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GrantPermission.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GrantPermission.json index c0c3f51f31f6..fe7299abb560 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GrantPermission.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GrantPermission.json @@ -9,4 +9,4 @@ "responses": { "200": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GroupExists.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GroupExists.json index 3a0adec87ddf..413f5d1124d8 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GroupExists.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_GroupExists.json @@ -8,4 +8,4 @@ "200": {}, "404": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveConnectionFromGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveConnectionFromGroup.json index e3e74bce5706..33e793772ed4 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveConnectionFromGroup.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveConnectionFromGroup.json @@ -8,4 +8,4 @@ "responses": { "204": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json index 68f23f7f0fef..56b127090c51 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromAllGroups.json @@ -7,4 +7,4 @@ "responses": { "204": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromGroup.json index baae21be9cbe..9ae74aa90747 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromGroup.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RemoveUserFromGroup.json @@ -8,4 +8,4 @@ "responses": { "204": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RevokePermission.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RevokePermission.json index d5b8f2094fa5..052c290ade36 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RevokePermission.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_RevokePermission.json @@ -9,4 +9,4 @@ "responses": { "204": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToAll.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToAll.json index 4e9f071c491d..27fb46ed15d4 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToAll.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToAll.json @@ -7,4 +7,4 @@ "responses": { "202": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToConnection.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToConnection.json index 7349b2c9489e..d9845618ee17 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToConnection.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToConnection.json @@ -8,4 +8,4 @@ "responses": { "202": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToGroup.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToGroup.json index d3f85a5e0d60..63aef0c685c3 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToGroup.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToGroup.json @@ -8,4 +8,4 @@ "responses": { "202": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToUser.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToUser.json index 0688c0d2097a..ab1cbb51f0ee 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToUser.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_SendToUser.json @@ -8,4 +8,4 @@ "responses": { "202": {} } -} \ No newline at end of file +} diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_UserExists.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_UserExists.json index 6681498f3490..c2fdab12a636 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_UserExists.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/examples/WebPubSub_UserExists.json @@ -8,4 +8,4 @@ "200": {}, "404": {} } -} \ No newline at end of file +} From b02fcecdc4c1353cad0759543d0e2a1b6dd7b6e1 Mon Sep 17 00:00:00 2001 From: Liangying Wei Date: Tue, 13 Sep 2022 19:48:59 +0800 Subject: [PATCH 10/14] avoid breaking change --- .../WebPubSub/stable/2021-10-01/webpubsub.json | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json index ea077ce19875..239f7ba03894 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json @@ -503,7 +503,8 @@ "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "pattern": "^(?!\\s+$).{1,1024}$" + "maxLength": 1024, + "minLength": 1 }, { "in": "query", @@ -568,7 +569,8 @@ "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "pattern": "^(?!\\s+$).{1,1024}$" + "maxLength": 1024, + "minLength": 1 }, { "in": "query", @@ -803,7 +805,8 @@ "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "pattern": "^(?!\\s+$).{1,1024}$" + "maxLength": 1024, + "minLength": 1 }, { "in": "path", @@ -1403,7 +1406,8 @@ "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "pattern": "^(?!\\s+$).{1,1024}$" + "maxLength": 1024, + "minLength": 1 }, { "in": "path", @@ -1471,7 +1475,8 @@ "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "pattern": "^(?!\\s+$).{1,1024}$" + "maxLength": 1024, + "minLength": 1 }, { "in": "path", From c7df32f270046691c5b53429ad7fdbeee072e049 Mon Sep 17 00:00:00 2001 From: Liangying Wei Date: Thu, 15 Sep 2022 11:19:13 +0800 Subject: [PATCH 11/14] resolve comments --- .../stable/2021-10-01/webpubsub.json | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json index 239f7ba03894..3ca145262066 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json @@ -150,7 +150,6 @@ "type": "integer", "format": "int32", "default": 60, - "maximum": 2147483647, "minimum": 1 }, { @@ -341,11 +340,6 @@ ], "summary": "Check if the connection with the given connectionId exists.", "operationId": "WebPubSub_ConnectionExists", - "produces": [ - "text/plain", - "application/json", - "text/json" - ], "parameters": [ { "in": "path", @@ -483,11 +477,6 @@ ], "summary": "Check if there are any client connections inside the given group", "operationId": "WebPubSub_GroupExists", - "produces": [ - "text/plain", - "application/json", - "text/json" - ], "parameters": [ { "in": "path", @@ -937,11 +926,6 @@ ], "summary": "Check if a connection has permission to the specified action.", "operationId": "WebPubSub_CheckPermission", - "produces": [ - "text/plain", - "application/json", - "text/json" - ], "parameters": [ { "in": "path", @@ -1104,11 +1088,6 @@ ], "summary": "Check if there are any client connections connected for the given user.", "operationId": "WebPubSub_UserExists", - "produces": [ - "text/plain", - "application/json", - "text/json" - ], "parameters": [ { "in": "path", From d5040245a00aa1e30325de59dbfefbaedbe7e33a Mon Sep 17 00:00:00 2001 From: Liangying Wei Date: Thu, 15 Sep 2022 13:36:53 +0800 Subject: [PATCH 12/14] clean up error body for HEAD --- .../stable/2021-10-01/webpubsub.json | 48 ++----------------- 1 file changed, 4 insertions(+), 44 deletions(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json index 3ca145262066..059eb5e796d5 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json @@ -373,17 +373,7 @@ "description": "Not Found" }, "default": { - "description": "Error response", - "schema": { - "$ref": "#/definitions/ErrorDetail" - }, - "x-ms-error-response": true, - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - } + "description": "Error response" } }, "x-ms-examples": { @@ -511,17 +501,7 @@ "description": "Not Found" }, "default": { - "description": "Error response", - "schema": { - "$ref": "#/definitions/ErrorDetail" - }, - "x-ms-error-response": true, - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - } + "description": "Error response" } }, "x-ms-examples": { @@ -980,17 +960,7 @@ "description": "Not Found" }, "default": { - "description": "Error response", - "schema": { - "$ref": "#/definitions/ErrorDetail" - }, - "x-ms-error-response": true, - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - } + "description": "Error response" } }, "x-ms-examples": { @@ -1121,17 +1091,7 @@ "description": "Not Found" }, "default": { - "description": "Error response", - "schema": { - "$ref": "#/definitions/ErrorDetail" - }, - "x-ms-error-response": true, - "headers": { - "x-ms-error-code": { - "x-ms-client-name": "ErrorCode", - "type": "string" - } - } + "description": "Error response" } }, "x-ms-examples": { From daa0f0ef43be9dc851c59a0eb3220565b868f524 Mon Sep 17 00:00:00 2001 From: Liangying Wei Date: Thu, 15 Sep 2022 13:58:17 +0800 Subject: [PATCH 13/14] fix build failure --- .../stable/2021-10-01/webpubsub.json | 39 ++++++++++++++++--- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json index 059eb5e796d5..023abf0d9c2f 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json @@ -373,7 +373,14 @@ "description": "Not Found" }, "default": { - "description": "Error response" + "description": "Error response", + "x-ms-error-response": true, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } } }, "x-ms-examples": { @@ -501,7 +508,14 @@ "description": "Not Found" }, "default": { - "description": "Error response" + "description": "Error response", + "x-ms-error-response": true, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } } }, "x-ms-examples": { @@ -538,8 +552,7 @@ "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "maxLength": 1024, - "minLength": 1 + "pattern": "^(?!\\s+$).{1,1024}$" }, { "in": "query", @@ -960,7 +973,14 @@ "description": "Not Found" }, "default": { - "description": "Error response" + "description": "Error response", + "x-ms-error-response": true, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } } }, "x-ms-examples": { @@ -1091,7 +1111,14 @@ "description": "Not Found" }, "default": { - "description": "Error response" + "description": "Error response", + "x-ms-error-response": true, + "headers": { + "x-ms-error-code": { + "x-ms-client-name": "ErrorCode", + "type": "string" + } + } } }, "x-ms-examples": { From 5c9b93c60ae6b645538335d3d3a54450ab903a29 Mon Sep 17 00:00:00 2001 From: Liangying Wei Date: Thu, 15 Sep 2022 14:12:18 +0800 Subject: [PATCH 14/14] fix build failure --- .../data-plane/WebPubSub/stable/2021-10-01/webpubsub.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json index 023abf0d9c2f..11b68ce5c377 100644 --- a/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json +++ b/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json @@ -552,7 +552,8 @@ "description": "Target group name, which length should be greater than 0 and less than 1025.", "required": true, "type": "string", - "pattern": "^(?!\\s+$).{1,1024}$" + "maxLength": 1024, + "minLength": 1 }, { "in": "query",