Skip to content

Commit 689ca4a

Browse files
committed
Expose Documentation section on IBicepConfiguration
1 parent d6d06cb commit 689ca4a

5 files changed

Lines changed: 19 additions & 1 deletion

File tree

src/Bicep.Core/Configuration/BicepConfiguration.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public BicepConfiguration(
2222
IBicepImplicitExtensionsConfiguration implicitExtensions,
2323
IBicepAnalyzersConfiguration analyzers,
2424
IBicepFormattingConfiguration formatting,
25+
IBicepDocumentationConfiguration documentation,
2526
ExperimentalFeaturesEnabled experimentalFeaturesEnabled,
2627
string? cacheRootDirectory,
2728
bool experimentalFeaturesWarning,
@@ -35,6 +36,7 @@ public BicepConfiguration(
3536
ImplicitExtensions = implicitExtensions;
3637
Analyzers = analyzers;
3738
Formatting = formatting;
39+
Documentation = documentation;
3840
ExperimentalFeaturesEnabled = experimentalFeaturesEnabled;
3941
CacheRootDirectory = ExpandCacheRootDirectory(cacheRootDirectory);
4042
ExperimentalFeaturesWarning = experimentalFeaturesWarning;
@@ -56,6 +58,8 @@ public BicepConfiguration(
5658

5759
public IBicepFormattingConfiguration Formatting { get; }
5860

61+
public IBicepDocumentationConfiguration Documentation { get; }
62+
5963
public ExperimentalFeaturesEnabled ExperimentalFeaturesEnabled { get; }
6064

6165
public string? CacheRootDirectory { get; }

src/Bicep.Core/Configuration/BicepConfigurationAdapter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public BicepConfigurationAdapter(RootConfiguration inner)
3838

3939
public IBicepFormattingConfiguration Formatting => this.inner.Formatting;
4040

41+
public IBicepDocumentationConfiguration Documentation => this.inner.Documentation;
42+
4143
public ExperimentalFeaturesEnabled ExperimentalFeaturesEnabled => this.inner.ExperimentalFeaturesEnabled;
4244

4345
public string? CacheRootDirectory => this.inner.CacheRootDirectory;

src/Bicep.Core/Configuration/DocumentationConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public sealed record DocumentationPatternSet
149149
/// <summary>
150150
/// Provides the documentation section of a Bicep configuration.
151151
/// </summary>
152-
public sealed class DocumentationConfiguration : ConfigurationSection<Documentation>
152+
public sealed class DocumentationConfiguration : ConfigurationSection<Documentation>, IBicepDocumentationConfiguration
153153
{
154154
public DocumentationConfiguration(Documentation data)
155155
: base(data)

src/Bicep.Core/Configuration/IBicepConfiguration.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public interface IBicepConfiguration
2828

2929
IBicepFormattingConfiguration Formatting { get; }
3030

31+
IBicepDocumentationConfiguration Documentation { get; }
32+
3133
ExperimentalFeaturesEnabled ExperimentalFeaturesEnabled { get; }
3234

3335
string? CacheRootDirectory { get; }
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
namespace Bicep.Core.Configuration
5+
{
6+
public interface IBicepDocumentationConfiguration
7+
{
8+
Documentation Data { get; }
9+
}
10+
}

0 commit comments

Comments
 (0)