You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+62Lines changed: 62 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,68 @@ Programmatic usage of this project (e.g., importing it as a Python module) and t
13
13
14
14
The 0.x prefix used in versions for this project is to indicate that breaking changes are expected frequently (several times a year). Breaking changes will increment the minor number, all other changes will increment the patch number. You can track the progress toward 1.0 [here](https://github.com/openapi-generators/openapi-python-client/projects/2).
15
15
16
+
## 0.29.1 (2026-08-30)
17
+
18
+
### 🚨Security
19
+
20
+
#### Arbitrary code generation vulnerability
21
+
22
+
Prior to this release, malicious OpenAPI documents could cause openapi-python-client to generate arbitrary code, which
23
+
would then be executed by consumers of the generated client.
24
+
25
+
If you generate code from OpenAPI documents you don't control, you should upgrade to this release as **soon as possible**
26
+
and validate any previously-generated code.
27
+
28
+
See [the GitHub advisory](https://github.com/openapi-generators/openapi-python-client/security/advisories/GHSA-5293-mq8x-g3xj) for more details.
29
+
30
+
### 🚀 Features
31
+
32
+
- Update `uv_build` to 0.12 when using `--meta=uv` (#1473)
33
+
34
+
### 🐛 Fixes
35
+
36
+
- Apply PEP 639 for improved license metadata (#1459)
37
+
- update generated code to use `StrEnum` and `-> Self` (#1474)
38
+
- Remove trailing spaces in README example code (#1475)
39
+
- Stopped generating empty docstrings for models with no description
40
+
41
+
#### Fixed invalid Python identifiers when resolving naming conflicts
42
+
43
+
When two property or parameter names conflicted after conversion to `snake_case` (e.g. `foo-bar` and `fooBar`), the conflict-resolution path preserved delimiters like `-`, `.`, and spaces in the generated Python identifiers, producing invalid code which failed generation. Conflicting names now keep their original casing but have any characters which are invalid in Python identifiers stripped (e.g. `foobar` and `fooBar`).
44
+
45
+
#### Improve readability of error messages
46
+
47
+
Errors and warnings which include a snippet of your OpenAPI document now render that snippet as JSON, making them much easier to read.
48
+
49
+
### 📝Notes
50
+
51
+
#### Breaking changes for all custom templates
52
+
53
+
**ALL** custom templates are expected to break with this version as a result of the security fix.
54
+
55
+
1. The `utils` global has been renamed to `strings`
56
+
2. Most string values can no longer be rendered directly into templates,
57
+
you must describe how the value is being used so it can be properly escaped using either a Python function or Jinja filter:
6.`strings.safe_for_docstring()` / `| safe_for_docstring` for values which get injected into a `"""` docstring
64
+
7.`strings.in_f_string_literal()` / `| in_f_string_literal` for values that go into `f""` f-strings
65
+
8.`strings.in_double_quote_literal()` / `| in_double_quote_literal` for values that go into **non-f-string**`""` literals
66
+
9.`.as_unembedded_code()` / `| as_unembedded_code` ONLY for `PythonCode` values—those that are intended to be Python code which is not embedded into any string/docstring. Examples include usages of `.python_code`, `.get_type_string()`, `.get_instance_type_string()`, `.get_type_strings_in_union()`. You *should not* assume these values are safe to put in docstrings, string literals, or f-string literals. Use the dedicated helpers for those.
67
+
As always, you can check the diff of the built in templates for examples. You will also want to check generated output
68
+
for "UntrustedString", which is how any string now requiring one of those functions will appear.
69
+
70
+
#### Many control characters now stripped from string literals
71
+
72
+
Out of an abundance of caution, most Unicode control characters are now stripped from string literals.
73
+
If your API uses control characters as part of const values, enums, or JSON body property names you may have issues
74
+
with this new version.
75
+
76
+
Most APIs are not expected to be affected by this change.
0 commit comments