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

BUG - Parameter required on nullable types #340

Open
picccard opened this issue Apr 17, 2024 · 0 comments
Open

BUG - Parameter required on nullable types #340

picccard opened this issue Apr 17, 2024 · 0 comments

Comments

@picccard
Copy link

Description of the issue

Nullable datatypes in bicep compiles to json with the nullable-property as true, but the docs will say the parameter is required and not optional. The module should be report optional if property defaultValue is not empty or if this property nullable is true.

To reproduce

Bicep code like this:

@description('Optional. List of application security groups to deploy.')
param applicationSecurityGroups string[]?

Builds to json like this:

"applicationSecurityGroups": {
  "type": "array",
  "items": {
    "type": "string"
  },
  "nullable": true,
  "metadata": {
    "description": "Optional. List of application security groups to deploy."
  }
}

Results in doc like this:

applicationSecurityGroups

Parameter Setting

Optional. List of application security groups to deploy.

Expected behaviour

![Parameter Setting] should be set as optional if the parameter-property nullable is true.

Module in use and version:

  • Module: PSDocs.Azure
  • Version: [0.3.0]

Captured output from $PSVersionTable:

Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Darwin 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-100…
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Additional context
none

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

No branches or pull requests

1 participant