Skip to content

Commit 5280164

Browse files
authored
Change feature_id to feature-id in changelogs (#2421)
1 parent d72d64a commit 5280164

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/services/Elastic.Documentation.Services/Changelog/ChangelogData.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information
44

5+
using YamlDotNet.Serialization;
6+
57
namespace Elastic.Documentation.Services.Changelog;
68

79
/// <summary>
@@ -22,6 +24,7 @@ public class ChangelogData
2224
public string? Description { get; set; }
2325
public string? Impact { get; set; }
2426
public string? Action { get; set; }
27+
[YamlMember(Alias = "feature-id", ApplyNamingConventions = false)]
2528
public string? FeatureId { get; set; }
2629
public bool? Highlight { get; set; }
2730
}

tests/Elastic.Documentation.Services.Tests/ChangelogServiceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ public async Task CreateChangelog_WithFeatureId_CreatesValidYaml()
820820
Directory.CreateDirectory(outputDir);
821821
var files = Directory.GetFiles(outputDir, "*.yaml");
822822
var yamlContent = await File.ReadAllTextAsync(files[0], TestContext.Current.CancellationToken);
823-
yamlContent.Should().Contain("feature_id: feature:new-search-api");
823+
yamlContent.Should().Contain("feature-id: feature:new-search-api");
824824
}
825825
}
826826

0 commit comments

Comments
 (0)