diff --git a/src/services/Elastic.Documentation.Services/Changelog/ChangelogData.cs b/src/services/Elastic.Documentation.Services/Changelog/ChangelogData.cs index 76b57504b..bec4d7f05 100644 --- a/src/services/Elastic.Documentation.Services/Changelog/ChangelogData.cs +++ b/src/services/Elastic.Documentation.Services/Changelog/ChangelogData.cs @@ -2,6 +2,8 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information +using YamlDotNet.Serialization; + namespace Elastic.Documentation.Services.Changelog; /// @@ -22,6 +24,7 @@ public class ChangelogData public string? Description { get; set; } public string? Impact { get; set; } public string? Action { get; set; } + [YamlMember(Alias = "feature-id", ApplyNamingConventions = false)] public string? FeatureId { get; set; } public bool? Highlight { get; set; } } diff --git a/tests/Elastic.Documentation.Services.Tests/ChangelogServiceTests.cs b/tests/Elastic.Documentation.Services.Tests/ChangelogServiceTests.cs index c826f66ab..d5cdf7693 100644 --- a/tests/Elastic.Documentation.Services.Tests/ChangelogServiceTests.cs +++ b/tests/Elastic.Documentation.Services.Tests/ChangelogServiceTests.cs @@ -820,7 +820,7 @@ public async Task CreateChangelog_WithFeatureId_CreatesValidYaml() Directory.CreateDirectory(outputDir); var files = Directory.GetFiles(outputDir, "*.yaml"); var yamlContent = await File.ReadAllTextAsync(files[0], TestContext.Current.CancellationToken); - yamlContent.Should().Contain("feature_id: feature:new-search-api"); + yamlContent.Should().Contain("feature-id: feature:new-search-api"); } }