-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Update CommunicationTurn swagger and add CommunicationIdentity swagger to preview folder #12881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9edffc8
update Identity and Turn swaggers to use common definition of Communi…
08ac674
Update Turn swagger to use definitions from CommunicationIdentity swa…
40f4709
Merge remote-tracking branch 'upstream/master'
4a7a4ab
update CommunicationIdentity to preview version to match with Communi…
73dcf30
update readme file with preview version of CommnicationIdentity.json
fd8b27c
add examples for CommunicationIdentity
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
313 changes: 313 additions & 0 deletions
313
...soft.CommunicationServicesIdentity/preview/2021-02-22-preview1/CommunicationIdentity.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,313 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "info": { | ||
| "title": "CommunicationIdentityClient", | ||
| "description": "Azure Communication Identity Service", | ||
| "version": "2021-02-22-preview1" | ||
| }, | ||
| "paths": { | ||
| "/identities": { | ||
| "post": { | ||
| "tags": [ | ||
| "Identity" | ||
| ], | ||
| "summary": "Create a new identity.", | ||
| "operationId": "CommunicationIdentity_Create", | ||
| "consumes": [ | ||
| "application/json" | ||
| ], | ||
| "produces": [ | ||
| "application/json" | ||
| ], | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "in": "body", | ||
| "name": "body", | ||
| "schema": { | ||
| "$ref": "#/definitions/CommunicationIdentityCreateRequest" | ||
| } | ||
| } | ||
| ], | ||
| "responses": { | ||
| "default": { | ||
| "description": "Error", | ||
| "schema": { | ||
| "$ref": "../../../Microsoft.CommunicationServicesCommon/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" | ||
| } | ||
| }, | ||
| "201": { | ||
| "description": "Created - Returns the created identity.", | ||
| "schema": { | ||
| "$ref": "#/definitions/CommunicationIdentityAccessTokenResult" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
| "Create an Identity": { | ||
| "$ref": "./examples/CreateIdentity.json" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/identities/{id}": { | ||
| "delete": { | ||
| "tags": [ | ||
| "Identity" | ||
| ], | ||
| "summary": "Delete the identity, revoke all tokens for the identity and delete all associated data.", | ||
| "operationId": "CommunicationIdentity_Delete", | ||
| "produces": [ | ||
| "application/json" | ||
| ], | ||
| "parameters": [ | ||
| { | ||
| "in": "path", | ||
| "name": "id", | ||
| "description": "Identifier of the identity to be deleted.", | ||
| "required": true, | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "default": { | ||
| "description": "Error", | ||
| "schema": { | ||
| "$ref": "../../../Microsoft.CommunicationServicesCommon/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" | ||
| } | ||
| }, | ||
| "204": { | ||
| "description": "Success" | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
| "Delete an identity": { | ||
| "$ref": "./examples/DeleteIdentity.json" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/identities/{id}/:revokeAccessTokens": { | ||
| "post": { | ||
| "tags": [ | ||
| "Identity" | ||
| ], | ||
| "summary": "Revoke all access tokens for the specific identity.", | ||
| "operationId": "CommunicationIdentity_RevokeAccessTokens", | ||
| "produces": [ | ||
| "application/json" | ||
| ], | ||
| "parameters": [ | ||
| { | ||
| "in": "path", | ||
| "name": "id", | ||
| "description": "Identifier of the identity.", | ||
| "required": true, | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "default": { | ||
| "description": "Error", | ||
| "schema": { | ||
| "$ref": "../../../Microsoft.CommunicationServicesCommon/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" | ||
| } | ||
| }, | ||
| "204": { | ||
| "description": "Success" | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
| "Revoke access tokens": { | ||
| "$ref": "./examples/RevokeAccessTokens.json" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/identities/{id}/:issueAccessToken": { | ||
| "post": { | ||
| "tags": [ | ||
| "Token" | ||
| ], | ||
| "summary": "Issue a new token for an identity.", | ||
| "operationId": "CommunicationIdentity_IssueAccessToken", | ||
| "consumes": [ | ||
| "application/json" | ||
| ], | ||
| "produces": [ | ||
| "application/json" | ||
| ], | ||
| "parameters": [ | ||
| { | ||
| "in": "path", | ||
| "name": "id", | ||
| "description": "Identifier of the identity to issue token for.", | ||
| "required": true, | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/ApiVersionParameter" | ||
| }, | ||
| { | ||
| "in": "body", | ||
| "name": "body", | ||
| "description": "Requesting scopes for the new token.", | ||
| "required": true, | ||
| "schema": { | ||
| "$ref": "#/definitions/CommunicationIdentityAccessTokenRequest" | ||
| } | ||
| } | ||
| ], | ||
| "responses": { | ||
| "default": { | ||
| "description": "Error", | ||
| "schema": { | ||
| "$ref": "../../../Microsoft.CommunicationServicesCommon/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" | ||
| } | ||
| }, | ||
| "200": { | ||
| "description": "Success", | ||
| "schema": { | ||
| "$ref": "#/definitions/CommunicationIdentityAccessToken" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-examples": { | ||
| "Issue an access token": { | ||
| "$ref": "./examples/IssueAccessToken.json" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
| "CommunicationIdentityTokenScope": { | ||
| "description": "List of scopes for an access token.", | ||
| "enum": [ | ||
| "chat", | ||
| "voip" | ||
| ], | ||
| "type": "string", | ||
| "x-ms-enum": { | ||
| "name": "CommunicationIdentityTokenScope", | ||
| "modelAsString": true | ||
| } | ||
| }, | ||
| "CommunicationIdentityCreateRequest": { | ||
| "type": "object", | ||
| "properties": { | ||
| "createTokenWithScopes": { | ||
| "description": "Also create access token for the created identity.", | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/CommunicationIdentityTokenScope" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "CommunicationIdentity": { | ||
| "description": "A communication identity.", | ||
| "required": [ | ||
| "id" | ||
| ], | ||
| "type": "object", | ||
| "properties": { | ||
| "id": { | ||
| "description": "Identifier of the identity.", | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "CommunicationIdentityAccessToken": { | ||
| "description": "An access token.", | ||
| "required": [ | ||
| "expiresOn", | ||
| "token" | ||
| ], | ||
| "type": "object", | ||
| "properties": { | ||
| "token": { | ||
| "description": "The access token issued for the identity.", | ||
| "type": "string" | ||
| }, | ||
| "expiresOn": { | ||
| "format": "date-time", | ||
| "description": "The expiry time of the token.", | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "CommunicationIdentityAccessTokenResult": { | ||
| "description": "A communication identity with access token.", | ||
| "required": [ | ||
| "identity" | ||
| ], | ||
| "type": "object", | ||
| "properties": { | ||
| "identity": { | ||
| "$ref": "#/definitions/CommunicationIdentity" | ||
| }, | ||
| "accessToken": { | ||
| "$ref": "#/definitions/CommunicationIdentityAccessToken" | ||
| } | ||
| } | ||
| }, | ||
| "CommunicationIdentityAccessTokenRequest": { | ||
| "required": [ | ||
| "scopes" | ||
| ], | ||
| "type": "object", | ||
| "properties": { | ||
| "scopes": { | ||
| "description": "List of scopes attached to the token.", | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/CommunicationIdentityTokenScope" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "parameters": { | ||
| "ApiVersionParameter": { | ||
| "in": "query", | ||
| "name": "api-version", | ||
| "description": "Version of API to invoke.", | ||
| "required": true, | ||
| "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" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
25 changes: 25 additions & 0 deletions
25
...ft.CommunicationServicesIdentity/preview/2021-02-22-preview1/examples/CreateIdentity.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "parameters": { | ||
| "api-version": "2021-03-07", | ||
| "content-type": "application/json", | ||
| "endpoint": "https://my-resource.communication.azure.com", | ||
| "body": { | ||
| "createTokenWithScopes": [ | ||
| "chat" | ||
| ] | ||
| } | ||
| }, | ||
| "responses": { | ||
| "201": { | ||
| "body": { | ||
| "identity": { | ||
| "id": "8:acs:2dee53b4-368b-45b4-ab52-8493fb117652_00000005-14a2-493b-8a72-5a3a0d000081" | ||
| }, | ||
| "accessToken": { | ||
| "token": "token", | ||
| "expiresOn": "2020-09-10T21:39:39.3244584+00:00" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
11 changes: 11 additions & 0 deletions
11
...ft.CommunicationServicesIdentity/preview/2021-02-22-preview1/examples/DeleteIdentity.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "parameters": { | ||
| "api-version": "2021-03-07", | ||
| "content-type": "application/json", | ||
| "id": "8:acs:2dee53b4-368b-45b4-ab52-8493fb117652_00000005-14a2-493b-8a72-5a3a0d000081", | ||
| "endpoint": "https://my-resource.communication.azure.com" | ||
| }, | ||
| "responses": { | ||
| "204": {} | ||
| } | ||
| } |
21 changes: 21 additions & 0 deletions
21
....CommunicationServicesIdentity/preview/2021-02-22-preview1/examples/IssueAccessToken.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "parameters": { | ||
| "api-version": "2021-03-07", | ||
| "content-type": "application/merge-patch+json", | ||
| "id": "8:acs:2dee53b4-368b-45b4-ab52-8493fb117652_00000005-14a2-493b-8a72-5a3a0d000081", | ||
| "body": { | ||
| "scopes": [ | ||
| "chat" | ||
| ] | ||
| }, | ||
| "endpoint": "https://my-resource.communication.azure.com" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "token": "token", | ||
| "expiresOn": "2020-09-10T21:39:39.3244584+00:00" | ||
| } | ||
| } | ||
| } | ||
| } |
11 changes: 11 additions & 0 deletions
11
...ommunicationServicesIdentity/preview/2021-02-22-preview1/examples/RevokeAccessTokens.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "parameters": { | ||
| "api-version": "2021-03-07", | ||
| "content-type": "application/json", | ||
| "id": "8:acs:2dee53b4-368b-45b4-ab52-8493fb117652_00000005-14a2-493b-8a72-5a3a0d000081", | ||
| "endpoint": "https://my-resource.communication.azure.com" | ||
| }, | ||
| "responses": { | ||
| "204": {} | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.