forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Communication common api types (Azure#11749)
* Common API types for Communication Services: Error and Identifier * Rename type to kind * Make error, code, message required as specified in guidelines * Make all props on Identifier read-only * prettier fix to add an empty line at the end * add common.json to README * make identifier id required and fix linter issues * fix spelling * make details an array of errors, rename error to CommunicationError * grammar fix * remove properties that are identical to id
- Loading branch information
Showing
2 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
107 changes: 107 additions & 0 deletions
107
.../data-plane/Microsoft.CommunicationServicesCommon/preview/2020-11-19-preview1/common.json
This file contains 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,107 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Communication", | ||
"description": "Communication Services API common types.", | ||
"version": "2020-11-19-preview1" | ||
}, | ||
"paths": {}, | ||
"definitions": { | ||
"CommunicationErrorResponse": { | ||
"description": "The Communication Services error.", | ||
"required": [ | ||
"error" | ||
], | ||
"properties": { | ||
"error": { | ||
"description": "The Communication Services error.", | ||
"$ref": "#/definitions/CommunicationError" | ||
} | ||
} | ||
}, | ||
"CommunicationError": { | ||
"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": "array", | ||
"items": { | ||
"$ref": "#/definitions/CommunicationError" | ||
}, | ||
"readOnly": true, | ||
"description": "Further details about specific errors that led to this error." | ||
}, | ||
"innererror": { | ||
"x-ms-client-name": "innerError", | ||
"readOnly": true, | ||
"$ref": "#/definitions/CommunicationError", | ||
"description": "The inner error if any." | ||
} | ||
}, | ||
"x-nullable": true | ||
}, | ||
"CommunicationIdentifierKind": { | ||
"description": "The kind of a communication identifier.", | ||
"type": "string", | ||
"enum": [ | ||
"unknown", | ||
"communicationUser", | ||
"phoneNumber", | ||
"callingApplication" | ||
], | ||
"x-ms-enum": { | ||
"name": "CommunicationIdentifierKind", | ||
"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." | ||
}, | ||
"id": { | ||
"type": "string", | ||
"description": "Full Id of the identifier." | ||
}, | ||
"phoneNumber": { | ||
"type": "string", | ||
"readOnly": true, | ||
"description": "The phone number in E.164 format." | ||
} | ||
} | ||
} | ||
}, | ||
"securityDefinitions": { | ||
"azure_auth": { | ||
"type": "oauth2", | ||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", | ||
"flow": "implicit", | ||
"description": "Azure Active Directory OAuth2 Flow.", | ||
"scopes": { | ||
"user_impersonation": "impersonate your user account" | ||
} | ||
} | ||
} | ||
} |
This file contains 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