OpenApiComponentAnnotationScanner.AnnotatedVariable class

Represents a variable discovered in script, along with its OpenAPI annotations and metadata.

public sealed class AnnotatedVariable

Public Members

name description
AnnotatedVariable(…) Represents a variable discovered in script, along with its OpenAPI annotations and metadata.
Annotations { get; } Annotations attached to the variable.
InitialValue { get; set; } The initializer value if it can be evaluated (best-effort).
InitialValueExpression { get; set; } The initializer expression text (always available when an initializer exists).
Name { get; set; } The variable name.
NoDefault { get; } Indicates whether the variable was declared with no default (e.g. $x = [NoDefault]).
VariableType { get; set; } The declared variable type if present (e.g. from [int]$x or [int]$x = 1).
VariableTypeName { get; set; } The declared variable type name as written in script (best-effort).

See Also