Skip to content

[dart] fix: handle multiline x-enum-descriptions - #24881

Merged
wing328 merged 1 commit into
OpenAPITools:masterfrom
Mattias-Sehlstedt:dart-multiline-enum-description
Sep 6, 2026
Merged

[dart] fix: handle multiline x-enum-descriptions#24881
wing328 merged 1 commit into
OpenAPITools:masterfrom
Mattias-Sehlstedt:dart-multiline-enum-description

Conversation

@Mattias-Sehlstedt

@Mattias-Sehlstedt Mattias-Sehlstedt commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Fixes so that dart can handle multiline x-enum-descriptions. This is done by changing the doc to /** ... */ and introducing a lambda to prefix each line with a *. Note that * is technically superfluous, and it is for example not used in the Java handling.

Reverted strange indent changes to enum.mustache from here, and instead made it a two-step indent as per every other definition in the template.

Fixes #24858

PR checklist

  • Read the contribution guidelines.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Summary by cubic

Fixes the Dart generator emitting broken doc comments for multiline x-enum-descriptions by switching from /// to /** ... */ block comments and prefixing each line with * via new Mustache lambdas.

Details

Written for commit 7073cc2. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 9 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@Mattias-Sehlstedt
Mattias-Sehlstedt force-pushed the dart-multiline-enum-description branch from a0b8ce4 to 33b2029 Compare September 5, 2026 19:26
@Mattias-Sehlstedt
Mattias-Sehlstedt force-pushed the dart-multiline-enum-description branch from 33b2029 to 7073cc2 Compare September 5, 2026 19:29

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 13 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

@wing328

wing328 commented Sep 6, 2026

Copy link
Copy Markdown
Member

thanks for the fix

cc @jaumard (2018/09) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08)

@wing328
wing328 merged commit 4f3eb90 into OpenAPITools:master Sep 6, 2026
28 checks passed
@wing328 wing328 added this to the 7.26.0 milestone Sep 6, 2026
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.

[BUG] dart-dio generates invalid code for multi-line enum descriptions as of 7.25.0

2 participants