Skip to content

Commit 808354e

Browse files
Release 0.24.3 (#1236)
> [!IMPORTANT] > Merging this pull request will create this release ## Features ### Adding support for named integer enums #1214 by @barrybarrette Adding support for named integer enums via an optional extension, `x-enum-varnames`. This extension is added to the schema inline with the `enum` definition: ``` "MyEnum": { "enum": [ 0, 1, 2, 3, 4, 5, 6, 99 ], "type": "integer", "format": "int32", "x-enum-varnames": [ "Deinstalled", "Installed", "Upcoming_Site", "Lab_Site", "Pending_Deinstall", "Suspended", "Install_In_Progress", "Unknown" ] } ``` The result: ![image](https://github.com/user-attachments/assets/780880b3-2f1f-49be-823b-f9abb713a3e1) Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
1 parent 84b1de7 commit 808354e

File tree

3 files changed

+42
-41
lines changed

3 files changed

+42
-41
lines changed

.changeset/adding_support_for_named_integer_enums.md

-40
This file was deleted.

CHANGELOG.md

+41
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,47 @@ Programmatic usage of this project (e.g., importing it as a Python module) and t
1313

1414
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).
1515

16+
## 0.24.3 (2025-03-31)
17+
18+
### Features
19+
20+
#### Adding support for named integer enums
21+
22+
##1214 by @barrybarrette
23+
24+
Adding support for named integer enums via an optional extension, `x-enum-varnames`.
25+
26+
This extension is added to the schema inline with the `enum` definition:
27+
```
28+
"MyEnum": {
29+
"enum": [
30+
0,
31+
1,
32+
2,
33+
3,
34+
4,
35+
5,
36+
6,
37+
99
38+
],
39+
"type": "integer",
40+
"format": "int32",
41+
"x-enum-varnames": [
42+
"Deinstalled",
43+
"Installed",
44+
"Upcoming_Site",
45+
"Lab_Site",
46+
"Pending_Deinstall",
47+
"Suspended",
48+
"Install_In_Progress",
49+
"Unknown"
50+
]
51+
}
52+
```
53+
54+
The result:
55+
![image](https://github.com/user-attachments/assets/780880b3-2f1f-49be-823b-f9abb713a3e1)
56+
1657
## 0.24.2 (2025-03-22)
1758

1859
### Fixes

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies = [
1818
"typing-extensions>=4.8.0,<5.0.0",
1919
]
2020
name = "openapi-python-client"
21-
version = "0.24.2"
21+
version = "0.24.3"
2222
description = "Generate modern Python clients from OpenAPI"
2323
keywords = [
2424
"OpenAPI",

0 commit comments

Comments
 (0)