Skip to content

Commit 4b25700

Browse files
committed
Merge branch 'main' into support-multiple-bodies
# Conflicts: # end_to_end_tests/golden-record/my_test_api_client/api/tests/octet_stream_tests_octet_stream_post.py # openapi_python_client/parser/openapi.py # openapi_python_client/templates/endpoint_macros.py.jinja # openapi_python_client/templates/endpoint_module.py.jinja # tests/test_parser/test_openapi.py
2 parents c331a8b + 1201a7d commit 4b25700

8 files changed

+43
-44
lines changed

.changeset/remove_useless_pass_statements_from_generated_code.md

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

.changeset/support_all_text_content_types_in_responses.md

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

.changeset/switch_from_black_to_ruff_for_formatting.md

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

.changeset/use_ruff_instead_of_isort_autoflake_at_runtime.md

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

.github/workflows/checks.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ jobs:
6767
run: poetry run coverage xml -o coverage-${{ matrix.os }}-${{ matrix.python }}.xml
6868

6969
- name: Store coverage report
70-
uses: actions/upload-artifact@v3
70+
uses: actions/upload-artifact@v4.0.0
7171
with:
72-
name: coverage-report
72+
name: coverage-${{ matrix.os }}-${{ matrix.python }}
7373
path: coverage-${{ matrix.os }}-${{ matrix.python }}.xml
7474

7575
upload_coverage:
@@ -78,12 +78,12 @@ jobs:
7878
steps:
7979
- uses: actions/checkout@v4.1.1
8080
- name: Download coverage reports
81-
uses: actions/download-artifact@v3
81+
uses: actions/download-artifact@v4.0.0
8282
with:
83-
name: coverage-report
84-
- uses: codecov/codecov-action@v3
83+
path: coverage-report
84+
- uses: codecov/codecov-action@v3.1.4
8585
with:
86-
files: "*.xml"
86+
files: "coverage-report/**/*.xml"
8787

8888
integration:
8989
name: Integration Tests

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,40 @@ 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.16.0 (2023-12-07)
17+
18+
### Breaking Changes
19+
20+
#### Switch from Black to Ruff for formatting
21+
22+
`black` is no longer a runtime dependency, so if you have them set in custom `post_hooks` in a config file, you'll need to make sure they're being installed manually. [`ruff`](https://docs.astral.sh/ruff) is now installed and used by default instead.
23+
24+
#### Use Ruff instead of isort + autoflake at runtime
25+
26+
`isort` and `autoflake` are no longer runtime dependencies, so if you have them set in custom `post_hooks` in a config file, you'll need to make sure they're being installed manually. [`ruff`](https://docs.astral.sh/ruff) is now installed and used by default instead.
27+
28+
### Features
29+
30+
#### Support all `text/*` content types in responses
31+
32+
Within an API response, any content type which starts with `text/` will now be treated the same as `text/html` already was—they will return the `response.text` attribute from the [httpx Response](https://www.python-httpx.org/api/#response).
33+
34+
Thanks to @fdintino for the initial implementation, and thanks for the discussions from @kairntech, @rubenfiszel, and @antoneladestito.
35+
36+
Closes #797 and #821.
37+
38+
#### Support `application/octet-stream` request bodies
39+
40+
Endpoints that accept `application/octet-stream` request bodies are now supported using the same `File` type as octet-stream responses.
41+
42+
Thanks to @kgutwin for the implementation and @rtaycher for the discussion!
43+
44+
PR #899 closes #588
45+
46+
### Fixes
47+
48+
#### Remove useless `pass` statements from generated code
49+
1650
## 0.15.2 (2023-09-16)
1751

1852
### Features

openapi_python_client/parser/openapi.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,9 @@ class RequestBodyParser(Protocol):
116116
__name__: str = "RequestBodyParser"
117117

118118
def __call__(
119-
self,
120-
*,
121-
body: oai.RequestBody,
122-
schemas: Schemas,
123-
parent_name: str,
124-
config: Config,
119+
self, *, body: oai.RequestBody, schemas: Schemas, parent_name: str, config: Config
125120
) -> Tuple[Union[Property, PropertyError, None], Schemas]:
126-
...
121+
... # pragma: no cover
127122

128123

129124
@dataclass

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "openapi-python-client"
3-
version = "0.15.2"
3+
version = "0.16.0"
44
description = "Generate modern Python clients from OpenAPI"
55
repository = "https://github.com/triaxtec/openapi-python-client"
66
license = "MIT"

0 commit comments

Comments
 (0)