Skip to content

Commit

Permalink
swagger property rename WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sadasant committed Sep 24, 2020
1 parent 9fb0ab1 commit e155811
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
16 changes: 0 additions & 16 deletions sdk/keyvault/keyvault-keys/src/cryptographyClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,6 @@ export class CryptographyClient {
}
}

// Renaming parameters

requestOptions.aad = options.additionalAuthenticatedData;

// Default to the service

let result;
Expand Down Expand Up @@ -201,10 +197,6 @@ export class CryptographyClient {
await this.getLocalCryptographyClient();
checkKeyValidity(this.getKeyID(), this.keyBundle);

// Renaming parameters

requestOptions.aad = options.additionalAuthenticatedData;

// Default to the service

let result;
Expand Down Expand Up @@ -260,10 +252,6 @@ export class CryptographyClient {
}
}

// Renaming parameters

requestOptions.aad = options.additionalAuthenticatedData;

// Default to the service

let result;
Expand Down Expand Up @@ -307,10 +295,6 @@ export class CryptographyClient {
await this.getLocalCryptographyClient();
checkKeyValidity(this.getKeyID(), this.keyBundle);

// Renaming parameters

requestOptions.aad = options.additionalAuthenticatedData;

// Default to the service

let result;
Expand Down
15 changes: 15 additions & 0 deletions sdk/keyvault/keyvault-keys/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,18 @@ input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/f9caf92
output-folder: ../
source-code-folder-path: ./src/generated
```
## Customizations for Track 2 Generator
See the [AutoRest samples](https://github.com/Azure/autorest/tree/master/Samples/3b-custom-transformations)
for more about how we're customizing things.
### Rename aad as KeyOperationsParameters
```yaml
directive:
- from: swagger-document
where: $.definitions.KeyOperationsParameters.properties.aad
transform: >
$["x-ms-client-name"] = "additionalAuthenticatedData";
```

0 comments on commit e155811

Please sign in to comment.