Skip to content

Fix empty string enum member output#2827

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

Fix empty string enum member output#2827
slegarraga wants to merge 1 commit 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 e57f4dc

@changeset-bot

changeset-bot Bot commented Jun 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e57f4dc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a 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