Skip to content

Fix empty string enum member output#2827

Open
slegarraga wants to merge 2 commits into
openapi-ts:mainfrom
slegarraga:fix-empty-string-enum-member
Open

Fix empty string enum member output#2827
slegarraga wants to merge 2 commits into
openapi-ts:mainfrom
slegarraga:fix-empty-string-enum-member

Conversation

@slegarraga

Copy link
Copy Markdown

Fixes #2807.

Summary

  • emit empty string enum values as quoted enum member names instead of a missing identifier
  • add a tsEnum regression for ["", "foo", "bar"]

Validation

  • corepack pnpm --filter openapi-typescript exec vitest run test/lib/ts.test.ts -t "empty string member"
  • corepack pnpm --filter openapi-typescript exec vitest run test/lib/ts.test.ts
  • corepack pnpm --filter openapi-typescript build
  • corepack pnpm --filter openapi-typescript test:js
  • corepack pnpm --filter openapi-typescript lint:ts
  • corepack pnpm --filter openapi-typescript lint:js (passes with existing Biome warnings)

@slegarraga slegarraga requested a review from a team as a code owner June 7, 2026 18:18
@slegarraga slegarraga requested a review from gzm0 June 7, 2026 18:18
@netlify

netlify Bot commented Jun 7, 2026

Copy link
Copy Markdown

👷 Deploy request for openapi-ts pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 975b6d9

@changeset-bot

changeset-bot Bot commented Jun 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 975b6d9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openapi-typescript Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

--enum flag doesn't convert empty string enums correctly

1 participant