Skip to content

Commit ba1405a

Browse files
Version Packages (#1330)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent c2d3e6a commit ba1405a

File tree

4 files changed

+31
-33
lines changed

4 files changed

+31
-33
lines changed

.changeset/fix-operationid-starting-with-number.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

.changeset/loud-dancers-shake.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# swagger-typescript-api
22

3+
## 13.2.8
4+
5+
### Patch Changes
6+
7+
- [#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
8+
9+
**What:** Fixed an issue where operationIds starting with numbers (e.g., "123getUser") would cause TypeScript generation to fail due to invalid identifier names.
10+
11+
**Why:** OperationIds that start with numbers are not valid JavaScript identifiers, causing syntax errors in the generated TypeScript code.
12+
13+
**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.
14+
15+
This resolves GitHub issue #952.
16+
17+
- [#1008](https://github.com/acacode/swagger-typescript-api/pull/1008) [`c2d3e6a`](https://github.com/acacode/swagger-typescript-api/commit/c2d3e6aab97d57a8cd7788c8e2adc909bcf26e1f) Thanks [@frazar](https://github.com/frazar)! - Fix handling of FormData inputs in Fetch HTTP client
18+
19+
Previously, when users passed a `FormData` object directly to the Fetch
20+
client's `multipart/form-data` formatter, it would incorrectly attempt to use
21+
`Object.keys()` on the FormData instance, which returns an empty array. This
22+
caused the FormData to be processed incorrectly.
23+
24+
The fix adds a type check to return FormData instances unchanged, allowing
25+
users to have full control over FormData construction when needed whilst
26+
maintaining backwards compatibility for object inputs. This aligns the Fetch
27+
client behaviour with the existing Axios client implementation.
28+
29+
This resolves issues where users needed to send multipart requests with
30+
multiple entries for the same key, which is only possible with direct FormData
31+
manipulation.
32+
333
## 13.2.7
434

535
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "swagger-typescript-api",
3-
"version": "13.2.7",
3+
"version": "13.2.8",
44
"description": "Generate the API client for Fetch or Axios from an OpenAPI Specification",
55
"homepage": "https://github.com/acacode/swagger-typescript-api",
66
"bugs": "https://github.com/acacode/swagger-typescript-api/issues",

0 commit comments

Comments
 (0)