Skip to content

Commit a478928

Browse files
author
Jaakko Heusala
committed
Added changeset
1 parent 7ac8a91 commit a478928

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"swagger-typescript-api": patch
3+
---
4+
5+
Fix TypeScript generation failure for operationIds starting with numbers
6+
7+
**What:** Fixed an issue where operationIds starting with numbers (e.g., "123getUser") would cause TypeScript generation to fail due to invalid identifier names.
8+
9+
**Why:** OperationIds that start with numbers are not valid JavaScript identifiers, causing syntax errors in the generated TypeScript code.
10+
11+
**How:** Modified the template logic to quote property names for invalid identifiers. OperationIds starting with numbers are now generated as quoted properties (e.g., `"123GetUser": ...`) instead of unquoted invalid identifiers.
12+
13+
This resolves GitHub issue #952.

0 commit comments

Comments
 (0)