Skip to content

Commit

Permalink
App configuration migration (#13095)
Browse files Browse the repository at this point in the history
* Generated Code changes

* Custom Code Changes

* Formatting Changes

* Configuration Readme Changes

* Add Transformations

* Add Hidden to Client Classes & Update Version Tool
  • Loading branch information
sarangan12 authored Jan 14, 2021
1 parent c9e82bb commit c8f5a67
Show file tree
Hide file tree
Showing 9 changed files with 1,774 additions and 1,496 deletions.
4 changes: 4 additions & 0 deletions sdk/appconfiguration/app-configuration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
{
"path": "src/appConfigurationClient.ts",
"prefix": "packageVersion"
},
{
"path": "src/generated/src/appConfigurationContext.ts",
"prefix": "packageVersion"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ import {
import { tracingPolicy } from "@azure/core-http";
import { Spanner } from "./internal/tracingHelpers";
import {
GetKeyValuesResponse,
AppConfigurationOptions as GeneratedAppConfigurationClientOptions
AppConfigurationGetKeyValuesResponse,
AppConfigurationOptionalParams as GeneratedAppConfigurationClientOptions
} from "./generated/src/models";
import { syncTokenPolicy, SyncTokens } from "./internal/synctokenpolicy";

Expand Down Expand Up @@ -169,6 +169,7 @@ export class AppConfigurationClient {

this.client = new AppConfiguration(
appConfigCredential,
appConfigEndpoint,
apiVersion,
getGeneratedClientOptions(appConfigEndpoint, syncTokens, appConfigOptions)
);
Expand Down Expand Up @@ -357,7 +358,9 @@ export class AppConfigurationClient {
}
}

private *createListConfigurationPageFromResponse(currentResponse: GetKeyValuesResponse) {
private *createListConfigurationPageFromResponse(
currentResponse: AppConfigurationGetKeyValuesResponse
) {
yield {
...currentResponse,
items: currentResponse.items != null ? currentResponse.items.map(transformKeyValue) : []
Expand Down Expand Up @@ -512,7 +515,7 @@ export class AppConfigurationClient {
* @hidden
*/
export function getGeneratedClientOptions(
baseUri: string,
endpoint: string,
syncTokens: SyncTokens,
internalAppConfigOptions: InternalAppConfigurationClientOptions
): GeneratedAppConfigurationClientOptions {
Expand All @@ -528,7 +531,7 @@ export function getGeneratedClientOptions(
);

return {
baseUri,
endpoint,
deserializationContentTypes,
// we'll add in our own custom retry policies
noRetryPolicy: true,
Expand Down
Loading

0 comments on commit c8f5a67

Please sign in to comment.