Skip to content

Commit d46544c

Browse files
Release 0.24.0 (#1210)
> [!IMPORTANT] > Merging this pull request will create this release ## Breaking Changes ### Support `$ref` in responses Previously, using a `$ref` to define a response was ignored, the code to call the endpoint was still generated, but the response would not be parsed. Now, responses defined with `$ref` will be used to generate the response model, which will parse the response at runtime. If a `$ref` is incorrect or uses a feature that is not supported by the generator, these endpoints will start failing to generate. ## Features ### Make `config` available in custom templates The configuration options object is now exposed as a variable called `config` in Jinja2 templates. ### Add `docstrings_on_attributes` config setting Setting this option to `true` changes the docstring behavior in model classes: for any attribute that have a non-empty `description`, instead of describing the attribute as part of the class's docstring, the description will appear in an individual docstring for that attribute. Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
1 parent f8b2988 commit d46544c

5 files changed

+24
-27
lines changed

.changeset/config_in_templates.md

-7
This file was deleted.

.changeset/docstrings_on_attributes.md

-7
This file was deleted.

.changeset/support_ref_in_responses.md

-12
This file was deleted.

CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,29 @@ 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.0 (2025-03-03)
17+
18+
### Breaking Changes
19+
20+
#### Support `$ref` in responses
21+
22+
Previously, using a `$ref` to define a response was ignored, the code to call the endpoint was still generated, but
23+
the response would not be parsed. Now, responses defined with `$ref` will be used to generate the response model, which
24+
will parse the response at runtime.
25+
26+
If a `$ref` is incorrect or uses a feature that is not supported by the generator, these endpoints will start failing to
27+
generate.
28+
29+
### Features
30+
31+
#### Make `config` available in custom templates
32+
33+
The configuration options object is now exposed as a variable called `config` in Jinja2 templates.
34+
35+
#### Add `docstrings_on_attributes` config setting
36+
37+
Setting this option to `true` changes the docstring behavior in model classes: for any attribute that have a non-empty `description`, instead of describing the attribute as part of the class's docstring, the description will appear in an individual docstring for that attribute.
38+
1639
## 0.23.1 (2025-01-13)
1740

1841
### Features

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.23.1"
21+
version = "0.24.0"
2222
description = "Generate modern Python clients from OpenAPI"
2323
keywords = [
2424
"OpenAPI",

0 commit comments

Comments
 (0)