Skip to content

fix(operation-type-coder): sanitize operation ID before generating type - #1516

Merged
dethell merged 2 commits into
counterfact:mainfrom
nkincy:sanitize-operation-id
Mar 2, 2026
Merged

fix(operation-type-coder): sanitize operation ID before generating type#1516
dethell merged 2 commits into
counterfact:mainfrom
nkincy:sanitize-operation-id

Conversation

@nkincy

@nkincy nkincy commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Attempts to fix an issue in operation-type-coder when using an OpenAPI operationId value as a TypeScript parameter name. Previously we used the operationId value verbatim which leads to TypeScript syntax errors when invalid TypeScript identifier characters were present.

This fix sanitizes the operationId value removing invalid special characters and camelCasing the output. If an operationId starts with a digit it is prefixed with a _.

@changeset-bot

changeset-bot Bot commented Mar 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ab3f747

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

This PR includes changesets to release 1 package
Name Type
counterfact 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

@dethell
dethell enabled auto-merge March 2, 2026 17:00
@dethell
dethell merged commit 9a6af7a into counterfact:main Mar 2, 2026
5 checks passed
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.

2 participants