Skip to content

Commit 405ef0f

Browse files
committed
As suggested in design review, replacing ValidateSet with PSArgumentCompleter
1 parent a0a173d commit 405ef0f

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

src/RedisCache/RedisCache/Commands/NewAzureRedisCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class NewAzureRedisCache : RedisCacheCmdletBase
6565
public int? ShardCount { get; set; }
6666

6767
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Specify the TLS version required by clients to connect to cache.")]
68-
[ValidateSet(TlsStrings.OneFullStopZero, TlsStrings.OneFullStopOne, TlsStrings.OneFullStopTwo)]
68+
[PSArgumentCompleter(TlsStrings.OneFullStopZero, TlsStrings.OneFullStopOne, TlsStrings.OneFullStopTwo)]
6969
public string MinimumTlsVersion { get; set; }
7070

7171
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "The full resource ID of a subnet in a virtual network to deploy the redis cache in. Example format: /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1")]

src/RedisCache/RedisCache/Commands/SetAzureRedisCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public class SetAzureRedisCache : RedisCacheCmdletBase
5959
public int? ShardCount { get; set; }
6060

6161
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Specify the TLS version required by clients to connect to cache.")]
62-
[ValidateSet(TlsStrings.OneFullStopZero, TlsStrings.OneFullStopOne, TlsStrings.OneFullStopTwo)]
62+
[PSArgumentCompleter(TlsStrings.OneFullStopZero, TlsStrings.OneFullStopOne, TlsStrings.OneFullStopTwo)]
6363
public string MinimumTlsVersion { get; set; }
6464

6565
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "A hash table which represents tags.")]

src/RedisCache/RedisCache/help/New-AzRedisCache.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ Specify the TLS version required by clients to connect to cache.
149149
Type: System.String
150150
Parameter Sets: (All)
151151
Aliases:
152-
Accepted values: 1.0, 1.1, 1.2
153152

154153
Required: False
155154
Position: Named

src/RedisCache/RedisCache/help/Set-AzRedisCache.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ Specify the TLS version required by clients to connect to cache.
9191
Type: System.String
9292
Parameter Sets: (All)
9393
Aliases:
94-
Accepted values: 1.0, 1.1, 1.2
9594

9695
Required: False
9796
Position: Named

0 commit comments

Comments
 (0)