Skip to content

fix(typescript): add trailing commas to as const enums#23277

Draft
scarf005 wants to merge 1 commit intoOpenAPITools:masterfrom
scarf005:fix/typescript-as-const-trailing-commas
Draft

fix(typescript): add trailing commas to as const enums#23277
scarf005 wants to merge 1 commit intoOpenAPITools:masterfrom
scarf005:fix/typescript-as-const-trailing-commas

Conversation

@scarf005
Copy link
Contributor

@scarf005 scarf005 commented Mar 17, 2026

Summary

  • add trailing commas to as const enum objects in typescript-angular, typescript-fetch, and typescript-nestjs-server
  • update generated samples and add shared regression coverage

continuation of #23275


Summary by cubic

Generate as const enum objects with trailing commas to reduce diff noise and align with common TS style across generators. Updates templates for typescript-angular, typescript-fetch, and typescript-nestjs-server, plus adds shared regression coverage.

  • Bug Fixes
    • Always emit trailing commas in enum objects in typescript-angular, typescript-fetch, and typescript-nestjs-server templates.
    • Updated generated samples to reflect the new formatting.
    • Added a shared test to enforce trailing commas across TypeScript generators (including typescript-axios).

Written for commit b11c3b1. Summary will update on new commits.

…23275)

Keep enum object diffs smaller across Angular, Fetch, and NestJS server generators.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant