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

[App Config] Update Response Output for Label for Configuration Setting #27622

Merged
merged 6 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sdk/appconfiguration/app-configuration/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

## 1.5.0-beta.3 (Unreleased)


### Features Added

### Breaking Changes

### Bugs Fixed

- To match the input type, change the output representation of `label` and `contentType` from `null` to `undefined` when these properties are empty or not defined in the configuration setting object. [#27622](https://github.com/Azure/azure-sdk-for-js/pull/27622)

### Other Changes

## 1.5.0-beta.2 (2023-10-10)
Expand Down
2 changes: 1 addition & 1 deletion sdk/appconfiguration/app-configuration/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/appconfiguration/app-configuration",
"Tag": "js/appconfiguration/app-configuration_7d75890bc5"
"Tag": "js/appconfiguration/app-configuration_0d80770eb3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,13 @@ export function transformKeyValue<T>(kvp: T & KeyValue): T & ConfigurationSettin
...kvp,
isReadOnly: !!kvp.locked,
};

delete setting.locked;

if (!setting.label) {
delete setting.label;
}
if (!setting.contentType) {
delete setting.contentType;
}
return setting;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ describe("AppConfigurationClient", () => {
);
assert.strictEqual(
replacedResult.contentType,
null,
undefined,
"Unexpected contentType in result from setConfigurationSetting()."
);

Expand Down Expand Up @@ -1256,7 +1256,7 @@ describe("AppConfigurationClient", () => {
);
assert.strictEqual(
replacedResult.contentType,
null,
undefined,
"Unexpected contentType in result from setConfigurationSetting()."
);

Expand Down Expand Up @@ -1300,7 +1300,7 @@ describe("AppConfigurationClient", () => {
);
assert.strictEqual(
result.contentType,
null,
undefined,
"Unexpected contentType in result from setConfigurationSetting()."
);
});
Expand Down