Skip to content

Conversation

@lcawl
Copy link
Contributor

@lcawl lcawl commented Jan 5, 2026

Background

While working on #2412, I encountered this error on the `docs-builder changelog bundle" command:

../docs-builder/.artifacts/publish/docs-builder/release/docs-builder changelog bundle --all --directory ./docs/changelog/
...
Error: Failed to parse YAML: Property 'feature-id' not found on type 'Elastic.Documentation.Services.Changelog.ChangelogData'.

The command worked when I updated the changelog files to use feature_id: xxx but that does not align with the schema in https://docs-v3-preview.elastic.dev/elastic/docs-builder/tree/main/contribute/changelog and AFAICT there was no conscious choice to use underscore and IMO it's less confusing to keep the command option and the schema in sync.

Summary

Updated the docs-builder changelog add command and related code to use feature-id instead of feature_id.

Changes Made:

  • ChangelogData.cs: Added [YamlMember(Alias = "feature-id", ApplyNamingConventions = false)] to the FeatureId property to ensure YAML serialization uses feature-id instead of feature_id.
  • ChangelogServiceTests.cs: Updated the test assertion to check for feature-id instead of feature_id.
  • Documentation: Already uses feature-id correctly:
    • Command help shows --feature-id
    • Schema documentation shows feature-id:
    • Generated YAML comments show # feature-id:

The C# parameter name featureId remains camelCase (standard), and ConsoleAppFramework converts it to --feature-id for the CLI. The YAML output now uses feature-id with a hyphen as required.

Tests

  • All 15 changelog tests pass
  • Build succeeds with no errors

Alternatives

If it's preferrable to stick with feature_id in the changelog files, IMO we should change the command option to --feature or --feature_id to avoid confusion.

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No
  1. If you answered "Yes" to the previous question, please specify the tool(s) and model(s) used (e.g., Google Gemini, OpenAI ChatGPT-4, etc.).

Tool(s) and model(s) used: composer-1 agent

@lcawl lcawl marked this pull request as ready for review January 5, 2026 23:00
@lcawl lcawl requested a review from a team as a code owner January 5, 2026 23:00
@lcawl lcawl requested a review from reakaleek January 5, 2026 23:00
@lcawl lcawl merged commit 5280164 into main Jan 6, 2026
40 of 41 checks passed
@lcawl lcawl deleted the changelog-feature-id branch January 6, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants