Open GABRIELNGBTUC opened 5 months ago
The issue is that there is no type
property in the output when using user defined types.
You will see something like this in the JSON output when a bicep build
is done:
"out": {
"$ref": "#/definitions/test",
...
}
I've tested it by changing $ref
to type
and then it will work again. If this is fixed there should also be support for rendering the definitions from the module in the output.
Description of the issue
We have some bicep/ARM templates that use outputs with a user defined type as the output type.
When trying to create documentation on the compiled ARM file using PSDocs, the command fails with the error
Invoke-PSDocument: Object reference not set to an instance of an object.
.This only happens if the template both:
If I either replace the user defined type with
object
or remove all the resources/modules from the template, PSDocs successfully runTo reproduce
Have a bicep file with the following content:
Compile that file with the bicep cli and run the following command
The command will fail.
If you either replace the output line with
output out object = {str: 'test'}
or command theres
resource, no error is triggeredExpected behaviour
The command succeed in creating the documentation.
Error output
Module in use and version:
Captured output from
$PSVersionTable
:Additional context