Skip to content

Commit 0091f1c

Browse files
committed
fix: switches to a getter for API consistency
1 parent bf8d0b6 commit 0091f1c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Microsoft.OpenApi/Expressions/CompositeExpression.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ namespace Microsoft.OpenApi
1313
public class CompositeExpression : RuntimeExpression
1414
{
1515
private readonly string template;
16-
private Regex expressionPattern = new(@"{(?<exp>\$[^}]*)");
16+
private readonly Regex expressionPattern = new(@"{(?<exp>\$[^}]*)");
1717

1818
/// <summary>
1919
/// Expressions embedded into string literal
2020
/// </summary>
21-
public List<RuntimeExpression> ContainedExpressions = new();
21+
public List<RuntimeExpression> ContainedExpressions { get; } = new();
2222

2323
/// <summary>
2424
/// Create a composite expression from a string literal with an embedded expression

test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ namespace Microsoft.OpenApi
5353
}
5454
public class CompositeExpression : Microsoft.OpenApi.RuntimeExpression
5555
{
56-
public System.Collections.Generic.List<Microsoft.OpenApi.RuntimeExpression> ContainedExpressions;
5756
public CompositeExpression(string expression) { }
57+
public System.Collections.Generic.List<Microsoft.OpenApi.RuntimeExpression> ContainedExpressions { get; }
5858
public override string Expression { get; }
5959
}
6060
public class CurrentKeys

0 commit comments

Comments
 (0)