Skip to content
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

Communication common api types #11749

Merged
merged 11 commits into from
Dec 2, 2020
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"swagger": "2.0",
"info": {
"title": "Communication",
"description": "Communication Services API common types.",
"version": "2020-11-19-preview1"
},
"paths": {},
"definitions": {
"CommunicationError": {
"description": "The Communication Services error exception.",
DominikMe marked this conversation as resolved.
Show resolved Hide resolved
"required": [
"error"
],
"properties": {
"error": {
"description": "The Communication Services error.",
"$ref": "#/definitions/Error"
}
}
},
"Error": {
DominikMe marked this conversation as resolved.
Show resolved Hide resolved
"description": "The Communication Services error.",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"description": "The error code."
},
"message": {
"type": "string",
"description": "The error message."
},
"target": {
"type": "string",
"readOnly": true,
"description": "The error target."
},
"details": {
"type": "string",
"readOnly": true,
"description": "The error details."
},
"innererror": {
DominikMe marked this conversation as resolved.
Show resolved Hide resolved
"x-ms-client-name": "innerError",
"readOnly": true,
"$ref": "#/definitions/Error",
"description": "The inner error if any."
}
},
"x-nullable": true
},
"CommunicationIdentifierKind": {
"description": "The kind of an communication identifier.",
DominikMe marked this conversation as resolved.
Show resolved Hide resolved
"type": "string",
"enum": [
"unknown",
"communicationUser",
"phoneNumber",
"callingApplication"
],
"x-ms-enum": {
"name": "CommunicationIdentifierType",
DominikMe marked this conversation as resolved.
Show resolved Hide resolved
"modelAsString": true
}
},
"CommunicationIdentifier": {
"description": "Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user.",
"required": [
"kind",
"id"
],
"properties": {
"kind": {
"$ref": "#/definitions/CommunicationIdentifierKind",
"description": "Kind of the communication identifier."
},
"communicationUserId": {
"type": "string",
"readOnly": true,
"description": "Id of the CommunicationUser as returned from the Communication Service."
},
"phoneNumber": {
"type": "string",
"readOnly": true,
"description": "The phone number in E.164 format."
},
"callingApplicationId": {
"type": "string",
"readOnly": true,
"description": "Id of the CallingApplication."
},
"id": {
amrElroumy marked this conversation as resolved.
Show resolved Hide resolved
"type": "string",
"description": "Fully serialized Id of the identifier."
}
}
}
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
DominikMe marked this conversation as resolved.
Show resolved Hide resolved
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
}
}
9 changes: 9 additions & 0 deletions specification/communication/data-plane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ input-file:
- Microsoft.CommunicationServicesIdentity/preview/2020-07-20-preview2/CommunicationIdentity.json
```

### Tag: package-2020-11-19-preview1

These settings apply only when `--tag=package-2020-11-19-preview1` is specified on the command line.

```yaml $(tag) == 'package-2020-11-19-preview1'
input-file:
- Microsoft.CommunicationServicesCommon/preview/2020-11-19-preview1/common.json
```

---

# Code Generation
Expand Down