Azure / bicep-registry-modules

Bicep registry modules
MIT License
510 stars 359 forks source link

[AVM Question/Feedback]: add minVal and maxVal values to the Readme #3387

Open ReneHezser opened 1 month ago

ReneHezser commented 1 month ago

Check for previous/existing GitHub issues

Description

Currently the annotation @minValue(1) @maxValue(10) are not added to the Readme.

microsoft-github-policy-service[bot] commented 1 month ago

[!IMPORTANT] The "Needs: Triage :mag:" label must be removed once the triage process is complete!

[!TIP] For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.

microsoft-github-policy-service[bot] commented 1 month ago

[!WARNING] Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

[!TIP]

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage :mag:" label must be removed as part of the triage process (when the issue is first responded to)!
ReneHezser commented 1 month ago

To get this:

### Parameter: `containers.probes.httpGet.httpHeaders.name`

Name of the header.

- Required: Yes
- Type: string
- MinValue: 1
- MaxValue: 10

Add line 426++

            # add MinValue and maxValue to the description
            if ($parameter.ContainsKey('minValue')) {
                $formattedMinValue = "- MinValue: $($parameter['minValue'])"
            }
            if ($parameter.ContainsKey('maxValue')) {
                $formattedMaxValue = "- MaxValue: $($parameter['maxValue'])"
            }

lines 492+3

            ((-not [String]::IsNullOrEmpty($formattedMinValue)) ? $formattedMinValue : $null),
            ((-not [String]::IsNullOrEmpty($formattedMaxValue)) ? $formattedMaxValue : $null),