From 6901ec5bde397aacac255bbf115c7c546347dd48 Mon Sep 17 00:00:00 2001 From: Ari Zavala Date: Mon, 13 Sep 2021 19:41:45 -0700 Subject: [PATCH 1/7] Making user identity not required and adding Routype --- .../CommunicationNetworkTraversal.json | 169 ++++++++++++++++++ .../examples/IssueRelayConfiguration.json | 27 +++ 2 files changed, 196 insertions(+) create mode 100644 specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json create mode 100644 specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/examples/IssueRelayConfiguration.json diff --git a/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json b/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json new file mode 100644 index 000000000000..ea3bfdcfc99c --- /dev/null +++ b/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json @@ -0,0 +1,169 @@ +{ + "swagger": "2.0", + "info": { + "title": "CommunicationNetworkingClient", + "description": "Azure Communication Networking Service", + "version": "2021-09-15-preview" + }, + "paths": { + "/networktraversal/:issueRelayConfiguration": { + "post": { + "tags": [ + "Turn" + ], + "summary": "Issue a configuration for an STUN/TURN server for an existing identity.", + "operationId": "CommunicationNetworkTraversal_IssueRelayConfiguration", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CommunicationRelayConfigurationRequest" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/CommunicationRelayConfiguration" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + } + } + }, + "x-ms-examples": { + "Issue Relay Configuration": { + "$ref": "./examples/IssueRelayConfiguration.json" + } + } + } + } + }, + "definitions": { + "CommunicationRelayConfigurationRequest": { + "description": "Request for a CommunicationRelayConfiguration.", + "required": [ + "routeType" + ], + "type": "object", + "properties": { + "id": { + "description": "An existing ACS identity.", + "type": "string" + }, + "routeType": { + "description": "The routing methodology to where the ICE server will be located from the client.", + "type": "string", + "default": "any", + "enum": ["any", "nearest"] + } + } + }, + "CommunicationIceServer": { + "description": "An instance of a STUN/TURN server with credentials to be used for ICE negotiation.", + "required": [ + "credential", + "urls", + "username", + "routeType" + ], + "type": "object", + "properties": { + "urls": { + "description": "List of STUN/TURN server URLs.", + "type": "array", + "items": { + "type": "string" + } + }, + "username": { + "description": "User account name which uniquely identifies the credentials.", + "type": "string" + }, + "credential": { + "description": "Credential for the server.", + "type": "string" + }, + "routeType": { + "description": "The routing methodology to where the ICE server will be located from the client.", + "type": "string", + "enum": ["any", "nearest"] + } + } + }, + "CommunicationRelayConfiguration": { + "description": "A relay configuration containing the STUN/TURN URLs and credentials.", + "required": [ + "expiresOn", + "iceServers" + ], + "type": "object", + "properties": { + "expiresOn": { + "format": "date-time", + "description": "The date for which the username and credentials are not longer valid.", + "type": "string" + }, + "iceServers": { + "description": "An array representing the credentials and the STUN/TURN server URLs for use in ICE negotiations.", + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationIceServer" + } + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "in": "query", + "name": "api-version", + "description": "Version of API to invoke.", + "required": true, + "enum": [ + "2021-06-21-preview" + ], + "type": "string" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "description": "The communication resource, for example https://my-resource.communication.azure.com", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true, + "x-ms-parameter-location": "client" + } + ] + } +} diff --git a/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/examples/IssueRelayConfiguration.json b/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/examples/IssueRelayConfiguration.json new file mode 100644 index 000000000000..8e6fbc7cf6e8 --- /dev/null +++ b/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/examples/IssueRelayConfiguration.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-09-15-preview", + "content-type": "application/json", + "body": { + "id": "8:acs:2dee53b4-368b-45b4-ab52-8493fb117652_00000005-14a2-493b-8a72-5a3a0d000081" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "expiresOn": "2020-09-10T21:39:39.3244584+00:00", + "iceServers": [ + { + "urls": [ + "turn:131.107.255.255:3478", "stun:131.107.255.255:3478" + ], + "username": "AgAAJNOeygwB1uVGvuwAVMHV4PLhYDgY66Fg1dUZvQ4AAAAEhXrhc8uJFjOK8lxEsZk3KIpWxc0=", + "credential": "9rl8ablFWj6/aqSuPLgLykLZKqw=", + "routeType": "any" + } + ] + } + } + } +} From 45a54c6b141e89bc27d34aadb0a7b4598dcea100 Mon Sep 17 00:00:00 2001 From: Ari Zavala Date: Tue, 14 Sep 2021 18:21:25 -0700 Subject: [PATCH 2/7] Make the request and routeType not to be required --- .../2021-09-15-preview/CommunicationNetworkTraversal.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json b/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json index ea3bfdcfc99c..718a5fa851d1 100644 --- a/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json +++ b/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json @@ -26,7 +26,7 @@ { "in": "body", "name": "body", - "required": true, + "required": false, "schema": { "$ref": "#/definitions/CommunicationRelayConfigurationRequest" } @@ -57,9 +57,6 @@ "definitions": { "CommunicationRelayConfigurationRequest": { "description": "Request for a CommunicationRelayConfiguration.", - "required": [ - "routeType" - ], "type": "object", "properties": { "id": { From cce947bb0beb7b6b3587597b0ff81a078fe9e872 Mon Sep 17 00:00:00 2001 From: Ari Zavala Date: Tue, 14 Sep 2021 18:58:28 -0700 Subject: [PATCH 3/7] Update readme with new tags for API version --- .../communication/data-plane/NetworkTraversal/readme.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specification/communication/data-plane/NetworkTraversal/readme.md b/specification/communication/data-plane/NetworkTraversal/readme.md index de431910454a..bece09d8bf50 100644 --- a/specification/communication/data-plane/NetworkTraversal/readme.md +++ b/specification/communication/data-plane/NetworkTraversal/readme.md @@ -49,6 +49,15 @@ input-file: - preview/2021-06-21-preview/CommunicationNetworkTraversal.json ``` +### Tag: package-2021-09-15-preview + +These settings apply only when `--tag=package-2021-09-15-preview` is specified on the command line. + +```yaml $(tag) == 'package-2021-09-15-preview' +input-file: + - preview/2021-09-15-preview/CommunicationNetworkTraversal.json +``` + --- # Code Generation From 6e979c6fb2d3f59ba85080d24482db7d7b325b1b Mon Sep 17 00:00:00 2001 From: Ari Zavala Date: Tue, 14 Sep 2021 21:35:53 -0700 Subject: [PATCH 4/7] Prettier fix for json --- .../CommunicationNetworkTraversal.json | 28 +++++++++++-------- .../examples/IssueRelayConfiguration.json | 3 +- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json b/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json index 718a5fa851d1..2638ca132337 100644 --- a/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json +++ b/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json @@ -63,12 +63,15 @@ "description": "An existing ACS identity.", "type": "string" }, - "routeType": { - "description": "The routing methodology to where the ICE server will be located from the client.", - "type": "string", - "default": "any", - "enum": ["any", "nearest"] - } + "routeType": { + "description": "The routing methodology to where the ICE server will be located from the client.", + "type": "string", + "default": "any", + "enum": [ + "any", + "nearest" + ] + } } }, "CommunicationIceServer": { @@ -96,11 +99,14 @@ "description": "Credential for the server.", "type": "string" }, - "routeType": { - "description": "The routing methodology to where the ICE server will be located from the client.", - "type": "string", - "enum": ["any", "nearest"] - } + "routeType": { + "description": "The routing methodology to where the ICE server will be located from the client.", + "type": "string", + "enum": [ + "any", + "nearest" + ] + } } }, "CommunicationRelayConfiguration": { diff --git a/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/examples/IssueRelayConfiguration.json b/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/examples/IssueRelayConfiguration.json index 8e6fbc7cf6e8..dfbaeaeec98e 100644 --- a/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/examples/IssueRelayConfiguration.json +++ b/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/examples/IssueRelayConfiguration.json @@ -14,7 +14,8 @@ "iceServers": [ { "urls": [ - "turn:131.107.255.255:3478", "stun:131.107.255.255:3478" + "turn:131.107.255.255:3478", + "stun:131.107.255.255:3478" ], "username": "AgAAJNOeygwB1uVGvuwAVMHV4PLhYDgY66Fg1dUZvQ4AAAAEhXrhc8uJFjOK8lxEsZk3KIpWxc0=", "credential": "9rl8ablFWj6/aqSuPLgLykLZKqw=", From 018a599c4863e71ad97db363c27eaa916152331a Mon Sep 17 00:00:00 2001 From: Ari Zavala Date: Fri, 17 Sep 2021 11:19:37 -0700 Subject: [PATCH 5/7] Only making the AnyCast change. The non-identity will be a separate change --- .../CommunicationNetworkTraversal.json | 7 +++++-- .../examples/IssueRelayConfiguration.json | 4 ++-- .../communication/data-plane/NetworkTraversal/readme.md | 8 ++++---- 3 files changed, 11 insertions(+), 8 deletions(-) rename specification/communication/data-plane/NetworkTraversal/preview/{2021-09-15-preview => 2021-10-08-preview}/CommunicationNetworkTraversal.json (97%) rename specification/communication/data-plane/NetworkTraversal/preview/{2021-09-15-preview => 2021-10-08-preview}/examples/IssueRelayConfiguration.json (87%) diff --git a/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json b/specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/CommunicationNetworkTraversal.json similarity index 97% rename from specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json rename to specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/CommunicationNetworkTraversal.json index 2638ca132337..aaa24d038989 100644 --- a/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/CommunicationNetworkTraversal.json +++ b/specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/CommunicationNetworkTraversal.json @@ -3,7 +3,7 @@ "info": { "title": "CommunicationNetworkingClient", "description": "Azure Communication Networking Service", - "version": "2021-09-15-preview" + "version": "2021-10-08-preview" }, "paths": { "/networktraversal/:issueRelayConfiguration": { @@ -26,7 +26,7 @@ { "in": "body", "name": "body", - "required": false, + "required": true, "schema": { "$ref": "#/definitions/CommunicationRelayConfigurationRequest" } @@ -57,6 +57,9 @@ "definitions": { "CommunicationRelayConfigurationRequest": { "description": "Request for a CommunicationRelayConfiguration.", + "required": [ + "id" + ], "type": "object", "properties": { "id": { diff --git a/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/examples/IssueRelayConfiguration.json b/specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/examples/IssueRelayConfiguration.json similarity index 87% rename from specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/examples/IssueRelayConfiguration.json rename to specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/examples/IssueRelayConfiguration.json index dfbaeaeec98e..0927f60852e7 100644 --- a/specification/communication/data-plane/NetworkTraversal/preview/2021-09-15-preview/examples/IssueRelayConfiguration.json +++ b/specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/examples/IssueRelayConfiguration.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-09-15-preview", + "api-version": "2021-10-08-preview", "content-type": "application/json", "body": { "id": "8:acs:2dee53b4-368b-45b4-ab52-8493fb117652_00000005-14a2-493b-8a72-5a3a0d000081" @@ -10,7 +10,7 @@ "responses": { "200": { "body": { - "expiresOn": "2020-09-10T21:39:39.3244584+00:00", + "expiresOn": "2021-11-10T21:39:39.3244584+00:00", "iceServers": [ { "urls": [ diff --git a/specification/communication/data-plane/NetworkTraversal/readme.md b/specification/communication/data-plane/NetworkTraversal/readme.md index bece09d8bf50..d8e5e19406b2 100644 --- a/specification/communication/data-plane/NetworkTraversal/readme.md +++ b/specification/communication/data-plane/NetworkTraversal/readme.md @@ -49,13 +49,13 @@ input-file: - preview/2021-06-21-preview/CommunicationNetworkTraversal.json ``` -### Tag: package-2021-09-15-preview +### Tag: package-2021-10-08-preview -These settings apply only when `--tag=package-2021-09-15-preview` is specified on the command line. +These settings apply only when `--tag=package-2021-10-08-preview` is specified on the command line. -```yaml $(tag) == 'package-2021-09-15-preview' +```yaml $(tag) == 'package-2021-10-08-preview' input-file: - - preview/2021-09-15-preview/CommunicationNetworkTraversal.json + - preview/2021-10-08-preview/CommunicationNetworkTraversal.json ``` --- From 262ff8be7bad046244f50bc7ecefa633fdd35411 Mon Sep 17 00:00:00 2001 From: Ari Zavala Date: Tue, 28 Sep 2021 18:55:32 -0700 Subject: [PATCH 6/7] Update removing identity requirement --- .../2021-10-08-preview/CommunicationNetworkTraversal.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/CommunicationNetworkTraversal.json b/specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/CommunicationNetworkTraversal.json index aaa24d038989..c99cd88f3b62 100644 --- a/specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/CommunicationNetworkTraversal.json +++ b/specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/CommunicationNetworkTraversal.json @@ -26,7 +26,6 @@ { "in": "body", "name": "body", - "required": true, "schema": { "$ref": "#/definitions/CommunicationRelayConfigurationRequest" } @@ -57,9 +56,6 @@ "definitions": { "CommunicationRelayConfigurationRequest": { "description": "Request for a CommunicationRelayConfiguration.", - "required": [ - "id" - ], "type": "object", "properties": { "id": { From 6b0491d69ab2fe8b9d976ed764795f9cca139a58 Mon Sep 17 00:00:00 2001 From: Ari Zavala Date: Thu, 7 Oct 2021 10:34:20 -0700 Subject: [PATCH 7/7] Update enum to correct version --- .../2021-10-08-preview/CommunicationNetworkTraversal.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/CommunicationNetworkTraversal.json b/specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/CommunicationNetworkTraversal.json index c99cd88f3b62..d2fb65ae0878 100644 --- a/specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/CommunicationNetworkTraversal.json +++ b/specification/communication/data-plane/NetworkTraversal/preview/2021-10-08-preview/CommunicationNetworkTraversal.json @@ -138,7 +138,7 @@ "description": "Version of API to invoke.", "required": true, "enum": [ - "2021-06-21-preview" + "2021-10-08-preview" ], "type": "string" }