1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
# Azure Communication Phone Number Administration for Python
> see https://aka.ms/autorest
### Generation
```ps
cd <swagger-folder>
autorest ./PHONE_NUMBER_SWAGGER.md
```
### Settings
``` yaml
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/257f060be8b60d8468584682aa2d71b1faa5f82c/specification/communication/data-plane/Microsoft.CommunicationServicesAdministration/preview/2020-07-20-preview1/communicationservicesadministration.json
output-folder: ../azure/communication/administration/_phonenumber/_generated
namespace: azure.communication.administration
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 3
no-namespace-folders: true
clear-output-folder: true
v3: true
python: true
```
### Rename searchId to reservationId
```yaml
directive:
- from: swagger-document
where: $.definitions.PhoneNumberSearch.properties.searchId
transform: >
$["x-ms-client-name"] = "reservationId";
```
### Rename PhoneNumberSearch to PhoneNumberReservation
```yaml
custom-types-subpackage: models
custom-types: PhoneNumberReservation
required-fields-as-ctor-args: true
directive:
- rename-model:
from: PhoneNumberSearch
to: PhoneNumberReservation
```
|