You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// These models should be kept in sync with the corresponding models in the Bicep CLI, but must also be backwards-compatible,
11
11
// as the JSONRPC client is able to communicate with multiple versions of the Bicep CLI.
12
12
13
+
/// <summary>
14
+
/// Represents a zero-based position within a Bicep source file.
15
+
/// </summary>
16
+
/// <param name="Line">The zero-based line number.</param>
17
+
/// <param name="Char">The zero-based character offset within the line.</param>
13
18
publicrecordPosition(
14
19
intLine,
15
20
intChar);
16
21
22
+
/// <summary>
23
+
/// Represents a range within a Bicep source file, defined by a start and end position.
24
+
/// </summary>
25
+
/// <param name="Start">The start position of the range (inclusive).</param>
26
+
/// <param name="End">The end position of the range (exclusive).</param>
17
27
publicrecordRange(
18
28
PositionStart,
19
29
PositionEnd);
20
30
31
+
/// <summary>
32
+
/// Request to retrieve the version of the Bicep CLI. This is a parameterless request.
33
+
/// </summary>
21
34
publicrecordVersionRequest();
22
35
36
+
/// <summary>
37
+
/// Response containing the Bicep CLI version.
38
+
/// </summary>
39
+
/// <param name="Version">The semantic version string of the Bicep CLI (e.g., <c>"0.38.5"</c>).</param>
23
40
publicrecordVersionResponse(
24
41
stringVersion);
25
42
43
+
/// <summary>
44
+
/// Request to compile a Bicep file (<c>.bicep</c>) into an ARM template.
45
+
/// </summary>
46
+
/// <param name="Path">The file path to the Bicep file to compile (e.g., <c>"./main.bicep"</c>).</param>
26
47
publicrecordCompileRequest(
27
48
stringPath);
28
49
50
+
/// <summary>
51
+
/// Response from compiling a Bicep file.
52
+
/// </summary>
53
+
/// <param name="Success">Whether the compilation completed without errors.</param>
54
+
/// <param name="Diagnostics">The collection of diagnostics (errors, warnings, informational messages) produced during compilation.</param>
55
+
/// <param name="Contents">The compiled ARM template JSON string, or <see langword="null"/> if compilation failed.</param>
29
56
publicrecordCompileResponse(
30
57
boolSuccess,
31
58
ImmutableArray<DiagnosticDefinition>Diagnostics,
32
59
string?Contents);
33
60
61
+
/// <summary>
62
+
/// Request to compile a Bicep parameters file (<c>.bicepparam</c>) into ARM deployment parameters.
63
+
/// </summary>
64
+
/// <param name="Path">The file path to the <c>.bicepparam</c> file to compile.</param>
65
+
/// <param name="ParameterOverrides">A dictionary of parameter names to JSON values that override the defaults specified in the parameters file.</param>
34
66
publicrecordCompileParamsRequest(
35
67
stringPath,
36
68
Dictionary<string,JsonNode>ParameterOverrides);
37
69
70
+
/// <summary>
71
+
/// Response from compiling a Bicep parameters file.
72
+
/// </summary>
73
+
/// <param name="Success">Whether the compilation completed without errors.</param>
74
+
/// <param name="Diagnostics">The collection of diagnostics produced during compilation.</param>
75
+
/// <param name="Parameters">The compiled ARM parameters JSON string, or <see langword="null"/> if compilation failed.</param>
76
+
/// <param name="Template">The compiled ARM template JSON string referenced by the parameters file, or <see langword="null"/> if not resolvable.</param>
77
+
/// <param name="TemplateSpecId">The Azure resource ID of the template spec, if the parameters file references one; otherwise <see langword="null"/>.</param>
38
78
publicrecordCompileParamsResponse(
39
79
boolSuccess,
40
80
ImmutableArray<DiagnosticDefinition>Diagnostics,
41
81
string?Parameters,
42
82
string?Template,
43
83
string?TemplateSpecId);
44
84
85
+
/// <summary>
86
+
/// Represents a single diagnostic message produced during Bicep compilation or analysis.
87
+
/// </summary>
88
+
/// <param name="Source">The source of the diagnostic (e.g., <c>"bicep"</c> for compiler diagnostics or a linter rule name).</param>
89
+
/// <param name="Range">The source location range where the diagnostic applies.</param>
90
+
/// <param name="Level">The severity level of the diagnostic: <c>"Error"</c>, <c>"Warning"</c>, or <c>"Info"</c>.</param>
91
+
/// <param name="Code">The diagnostic code (e.g., <c>"BCP001"</c>) that uniquely identifies the diagnostic type.</param>
/// Request to retrieve all file references (modules, extensions, and other dependencies) used by a Bicep file.
102
+
/// </summary>
103
+
/// <param name="Path">The file path to the Bicep file to analyze.</param>
52
104
publicrecordGetFileReferencesRequest(
53
105
stringPath);
54
106
107
+
/// <summary>
108
+
/// Response containing all file references used by a Bicep file.
109
+
/// </summary>
110
+
/// <param name="FilePaths">The collection of absolute file paths referenced by the Bicep file, including modules, loaded files, and the file itself.</param>
55
111
publicrecordGetFileReferencesResponse(
56
112
ImmutableArray<string>FilePaths);
57
113
114
+
/// <summary>
115
+
/// Request to retrieve metadata about a Bicep file, including its parameters, outputs, and exports.
116
+
/// </summary>
117
+
/// <param name="Path">The file path to the Bicep file to analyze.</param>
58
118
publicrecordGetMetadataRequest(
59
119
stringPath);
60
120
121
+
/// <summary>
122
+
/// Request to generate a snapshot of a Bicep parameters file with deployment metadata.
123
+
/// The snapshot captures the resolved state of the parameters file along with contextual deployment information.
124
+
/// Requires Bicep CLI version 0.36.1 or later.
125
+
/// </summary>
126
+
/// <param name="Path">The file path to the <c>.bicepparam</c> file.</param>
127
+
/// <param name="Metadata">Deployment metadata providing Azure context such as subscription, resource group, and location.</param>
128
+
/// <param name="ExternalInputs">Optional collection of external input values to inject into the snapshot. Pass <see langword="null"/> if no external inputs are needed.</param>
/// Represents a resource node in the deployment graph.
245
+
/// </summary>
246
+
/// <param name="Range">The source location range of the resource declaration.</param>
247
+
/// <param name="Name">The symbolic name of the resource in the Bicep file.</param>
248
+
/// <param name="Type">The fully qualified Azure resource type (e.g., <c>"Microsoft.Storage/storageAccounts"</c>).</param>
249
+
/// <param name="IsExisting">Whether this is a reference to an existing resource (declared with the <c>existing</c> keyword) rather than a new deployment.</param>
250
+
/// <param name="RelativePath">The relative file path if this resource is defined in a module; otherwise <see langword="null"/>.</param>
116
251
publicrecordNode(
117
252
RangeRange,
118
253
stringName,
119
254
stringType,
120
255
boolIsExisting,
121
256
string?RelativePath);
122
257
258
+
/// <summary>
259
+
/// Represents a directed dependency edge between two resource nodes in the deployment graph.
260
+
/// </summary>
261
+
/// <param name="Source">The symbolic name of the dependent resource (the resource that depends on the target).</param>
262
+
/// <param name="Target">The symbolic name of the dependency (the resource being depended upon).</param>
123
263
publicrecordEdge(
124
264
stringSource,
125
265
stringTarget);
126
266
}
127
267
268
+
/// <summary>
269
+
/// Request to format a Bicep file according to Bicep formatting standards.
270
+
/// Requires Bicep CLI version 0.37.1 or later.
271
+
/// </summary>
272
+
/// <param name="Path">The file path to the Bicep file to format.</param>
128
273
publicrecordFormatRequest(
129
274
stringPath);
130
275
276
+
/// <summary>
277
+
/// Response containing the formatted Bicep file content.
278
+
/// </summary>
279
+
/// <param name="Contents">The formatted Bicep source code as a string.</param>
0 commit comments