Skip to content

Commit

Permalink
[CosmosDB] Changing the warning message for AnalyticalStorageSchemaTy…
Browse files Browse the repository at this point in the history
…pe (Azure#15723)

* changing the warning message for AnalyticalStorageSchemaType to only display when a value has been explicitly provided

* adjusting the changelog

* Update changelog

Co-authored-by: Yeming Liu <11371776+isra-fel@users.noreply.github.com>
  • Loading branch information
toswedlu and isra-fel authored Nov 10, 2021
1 parent dee07ec commit 4cd6b32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/CosmosDB/CosmosDB/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
-->

## Upcoming Release
* Fixed when a warning about the value of AnalyticalStorageSchemaType is displayed when no value was given.

## Version 1.4.0
* Introduced Get-AzCosmosDBMongoDBBackupInformation to retrieve latest backup information for MongoDB.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,11 @@ protected AnalyticalStorageConfiguration CreateAnalyticalStorageConfiguration(st
break;

default:
string message = $"Invalid value for AnalyticalStorageSchemaType. Valid values are '{SDKModel.AnalyticalStorageSchemaType.WellDefined}' and '{SDKModel.AnalyticalStorageSchemaType.FullFidelity}'.";
WriteWarning(message);
if (!string.IsNullOrWhiteSpace(param))
{
string message = $"Invalid value for AnalyticalStorageSchemaType. Valid values are '{SDKModel.AnalyticalStorageSchemaType.WellDefined}' and '{SDKModel.AnalyticalStorageSchemaType.FullFidelity}'.";
WriteWarning(message);
}
break;
}
return retval;
Expand Down

0 comments on commit 4cd6b32

Please sign in to comment.