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

Incorrect "Required" Parameter in Documentation for Nullable Fields #317

Open
joergen98 opened this issue Oct 18, 2024 · 1 comment
Open

Comments

@joergen98
Copy link

Description of the issue

Incorrect "Required" Parameter in Documentation for Nullable Fields

We have encountered an issue where a parameter that is defined as nullable in our templates is still marked as "required" in the generated documentation. Specifically:

  • When we define a parameter like param Instance string? in our Bicep files, it should be interpreted as nullable.

  • When compiled to an ARM template, the parameter appears as:

    "Instance": {
      "type": "string",
      "nullable": true
    }
    
    

Despite the parameter being nullable, the generated documentation incorrectly shows the parameter as Required: Yes (as seen in the attached screenshot).
Image

However, when the parameter is set like this:

param Instance string = ''

and in the corresponding JSON:

"Instance": { 
"type": "string",
"defaultValue": ""
}

the Required field in the generated documentation shows correctly as No.

This discrepancy between the actual parameter configuration and the generated documentation can cause confusion for users relying on the documentation for implementation. We would appreciate it if this could be investigated and resolved 😃

To Reproduce
The documentation is generated using the following command:

Invoke-PSDocument -Module PSDocs.Azure -OutputPath $templateName -InputObject $template -InstanceName $docName -Culture 'en-US'

Please let us know if further details are needed.

Module in use and version:

  • Module: PSDocs
  • Version: [v0.9.0]
Copy link

Thanks for raising your first issue, the team appreciates the time you have taken 😉

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