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

Added ability to detect optionality for each Parameter #68

Merged
merged 8 commits into from
Mar 30, 2021
Merged

Added ability to detect optionality for each Parameter #68

merged 8 commits into from
Mar 30, 2021

Conversation

vicperdana
Copy link
Contributor

@vicperdana vicperdana commented Mar 25, 2021

PR Summary

Added ability to detect "Required" or "Optional for each parameter. Closes #55

  • Detects if parameter is either "Optional" or "Required" based on the availability of DefaultValue or AllowedValues

PR Checklist

  • PR has a meaningful title
  • Summarized changes
  • Change is not breaking
  • This PR is ready to merge and is not Work in Progress

@vicperdana vicperdana requested a review from a team as a code owner March 25, 2021 11:15
src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 Outdated Show resolved Hide resolved
@@ -20,15 +20,18 @@ function global:GetTemplateParameter {
Description = ''
DefaultValue = $Null
AllowedValues = $Null
Required = "Required"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vicperdana Potentially this can be localized as well since it will be part of the output.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BernieWhite just to clarify, would this be related to:
$LocalizedData.Required in line number 238.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vicperdana More suggesting that we Required now Yes / No can be localized.

So at some point, if someone wants to localize PSDocs.Azure then Yes/ No can be specified in another language.

I've added the suggestion as a commit.

src/PSDocs.Azure/docs/Azure.Template.Doc.ps1 Show resolved Hide resolved
templates/acr/v1/README.md Outdated Show resolved Hide resolved
@BernieWhite
Copy link
Contributor

@vicperdana All good 🥇 Nice work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add parameter type and require column to template doco
2 participants