Skip to content
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
33 changes: 33 additions & 0 deletions src/PSDocs.Azure/docs/Azure.Template.Doc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ function global:GetTemplateParameter {
if ([bool]$property.Value.PSObject.Properties['allowedValues']) {
$result['allowedValues'] = $property.Value.allowedValues;
}
if ([bool]$property.Value.PSObject.Properties['minValue']) {
$result['minValue'] = $property.Value.minValue;
}
if ([bool]$property.Value.PSObject.Properties['maxValue']) {
$result['maxValue'] = $property.Value.maxValue;
}

if ([bool]$property.Value.PSObject.Properties['minLength']) {
$result['minLength'] = $property.Value.minLength;
}
if ([bool]$property.Value.PSObject.Properties['maxLength']) {
$result['maxLength'] = $property.Value.maxLength;
}
[PSCustomObject]$result;
}
}
Expand Down Expand Up @@ -323,6 +336,26 @@ Document 'README' -With 'Azure.TemplateSchema' {
"**$($LocalizedData.AllowedValues)**"
$parameter.AllowedValues | Code 'text'
}

if ($Null -ne $parameter.MinValue -and $parameter.MinValue.Length -gt 0) {
"**$($LocalizedData.MinValue)**"
$parameter.MinValue | Code 'text'
}

if ($Null -ne $parameter.MaxValue -and $parameter.MaxValue.Length -gt 0) {
"**$($LocalizedData.MaxValue)**"
$parameter.MaxValue | Code 'text'
}

if ($Null -ne $parameter.MinLength -and $parameter.MinLength.Length -gt 0) {
"**$($LocalizedData.MinLength)**"
$parameter.MinLength | Code 'text'
}

if ($Null -ne $parameter.MaxLength -and $parameter.MaxLength.Length -gt 0) {
"**$($LocalizedData.MaxLength)**"
$parameter.MaxLength | Code 'text'
}
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/PSDocs.Azure/en/PSDocs-strings.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@
Required = 'Required'
RequiredYes = 'Yes'
RequiredNo = 'No'
MinValue = 'Minimum value'
MaxValue = 'Maximum value'
MinLength = 'Minimum length'
MaxLength = 'Maximum length'
}
48 changes: 48 additions & 0 deletions templates/storage/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ Determine how many additional characters are added to the storage account name a
0
```

**Minimum value**

```text
0
```

**Maximum value**

```text
13
```

### containers

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
Expand All @@ -98,6 +110,18 @@ The number of days to retain deleted blobs. When set to 0, soft delete is disabl
0
```

**Minimum value**

```text
0
```

**Maximum value**

```text
365
```

### containerSoftDeleteDays

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
Expand All @@ -110,6 +134,18 @@ The number of days to retain deleted containers. When set to 0, soft delete is d
0
```

**Minimum value**

```text
0
```

**Maximum value**

```text
365
```

### shares

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
Expand Down Expand Up @@ -140,6 +176,18 @@ The number of days to retain deleted shares. When set to 0, soft delete is disab
0
```

**Minimum value**

```text
0
```

**Maximum value**

```text
365
```

### allowBlobPublicAccess

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
Expand Down