From c89681e800076ffba5afc6052977f1e264ff27d8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 13:49:36 +0000 Subject: [PATCH] Version Packages --- .changeset/fix-operationid-starting-with-number.md | 13 ------------- CHANGELOG.md | 14 ++++++++++++++ package.json | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) delete mode 100644 .changeset/fix-operationid-starting-with-number.md diff --git a/.changeset/fix-operationid-starting-with-number.md b/.changeset/fix-operationid-starting-with-number.md deleted file mode 100644 index c5449fa6..00000000 --- a/.changeset/fix-operationid-starting-with-number.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"swagger-typescript-api": patch ---- - -Fix TypeScript generation failure for operationIds starting with numbers - -**What:** Fixed an issue where operationIds starting with numbers (e.g., "123getUser") would cause TypeScript generation to fail due to invalid identifier names. - -**Why:** OperationIds that start with numbers are not valid JavaScript identifiers, causing syntax errors in the generated TypeScript code. - -**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. - -This resolves GitHub issue #952. diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b3690f7..62c23ab9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # swagger-typescript-api +## 13.2.8 + +### Patch Changes + +- [#1326](https://github.com/acacode/swagger-typescript-api/pull/1326) [`99b5f50`](https://github.com/acacode/swagger-typescript-api/commit/99b5f5055bfdf207d9dfe316ef8ff2490d474443) Thanks [@thejhh](https://github.com/thejhh)! - Fix TypeScript generation failure for operationIds starting with numbers + + **What:** Fixed an issue where operationIds starting with numbers (e.g., "123getUser") would cause TypeScript generation to fail due to invalid identifier names. + + **Why:** OperationIds that start with numbers are not valid JavaScript identifiers, causing syntax errors in the generated TypeScript code. + + **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. + + This resolves GitHub issue #952. + ## 13.2.7 ### Patch Changes diff --git a/package.json b/package.json index 424a7e90..be25d9e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swagger-typescript-api", - "version": "13.2.7", + "version": "13.2.8", "description": "Generate the API client for Fetch or Axios from an OpenAPI Specification", "homepage": "https://github.com/acacode/swagger-typescript-api", "bugs": "https://github.com/acacode/swagger-typescript-api/issues",