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
All notable changes to this project will be documented in this file.
3
4
4
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
7
7
8
## 0.6.0 - Unreleased
9
+
8
10
### Breaking Changes
9
-
- Reorganized api calls in generated clients. `async_api` will no longer be generated. Each path operation will now
10
-
have it's own module under its tag. For example, if there was a generated function `api.my_tag.my_function()` it is
11
-
replaced with `api.my_tag.my_function.sync()`. The async version can be called with `asyncio()` instead of `sync()`.
12
-
(#167)
13
-
- Removed support for mutable default values (e.g. dicts, lists). They may be added back in a future version given enough
14
-
demand, but the existing implementation was not up to this project's standards. (#170)
15
-
- Removed generated `errors` module (and the `ApiResponseError` therein). Instead of raising an exception on failure,
16
-
the `sync()` and `asyncio()` functions for a path operation will return `None`. This means all return types are now
11
+
12
+
- Reorganized api calls in generated clients. `async_api` will no longer be generated. Each path operation will now
13
+
have it's own module under its tag. For example, if there was a generated function `api.my_tag.my_function()` it is
14
+
replaced with `api.my_tag.my_function.sync()`. The async version can be called with `asyncio()` instead of `sync()`.
15
+
(#167)
16
+
- Removed support for mutable default values (e.g. dicts, lists). They may be added back in a future version given enough
17
+
demand, but the existing implementation was not up to this project's standards. (#170)
18
+
- Removed generated `errors` module (and the `ApiResponseError` therein). Instead of raising an exception on failure,
19
+
the `sync()` and `asyncio()` functions for a path operation will return `None`. This means all return types are now
17
20
`Optional`, so mypy will require you to handle potential errors (or explicitly ignore them).
18
21
- Moved `models.types` generated module up a level, so just `types`.
19
22
-`Client` and `AuthenticatedClient` are now declared using the `attrs` package instead of builtin `dataclass`
20
23
21
24
### Additions
22
-
- Every generated API module will have a `sync_detailed()` and `asyncio_detailed()` function which work like their
25
+
26
+
- Every generated API module will have a `sync_detailed()` and `asyncio_detailed()` function which work like their
23
27
non-detailed counterparts, but return a `types.Response[T]` instead of an `Optional[T]` (where T is the parsed body type).
24
-
`types.Response` contains `status_code`, `content` (bytes of returned content), `headers`, and `parsed` (the
28
+
`types.Response` contains `status_code`, `content` (bytes of returned content), `headers`, and `parsed` (the
25
29
parsed return type you would get from the non-detailed function). (#115)
26
-
- It's now possible to include custom headers and cookies in requests, as well as set a custom timeout. This can be done
27
-
either by directly setting those parameters on a `Client` (e.g. `my_client.headers = {"Header": "Value"}`) or using
28
-
a fluid api (e.g. `my_endpoint.sync(my_client.with_cookies({"MyCookie": "cookie"}).with_timeout(10.0))`).
29
-
30
+
- It's now possible to include custom headers and cookies in requests, as well as set a custom timeout. This can be done
31
+
either by directly setting those parameters on a `Client` (e.g. `my_client.headers = {"Header": "Value"}`) or using
32
+
a fluid api (e.g. `my_endpoint.sync(my_client.with_cookies({"MyCookie": "cookie"}).with_timeout(10.0))`).
30
33
31
34
## 0.5.4 - 2020-08-29
35
+
32
36
### Additions
37
+
33
38
- Support for octet-stream content type (#116)
34
39
- Support for [nullable](https://swagger.io/docs/specification/data-models/data-types/#null) (#99)
35
40
- Union properties can be defined using oneOf (#98)
36
41
- Support for lists of strings, integers, floats and booleans as responses (#165). Thanks @Maistho!
37
42
38
-
39
43
## 0.5.3 - 2020-08-13
44
+
40
45
### Security
46
+
41
47
- All values that become file/directory names are sanitized to address path traversal vulnerabilities (CVE-2020-15141)
42
48
- All values that get placed into python files (everything from enum names, to endpoint descriptions, to default values) are validated and/or saniziatied to address arbitrary code execution vulnerabilities (CVE-2020-15142)
43
49
44
50
### Changes
51
+
45
52
- Due to security concerns/implementation complexities, default values are temporarily unsupported for any `RefProperty` that doesn't refer to an enum.
46
-
- Defaults for properties must now be valid values for their respective type (e.g. "example string" is an invalid default for an `integer` type property, and the function for an endpoint using it would fail to generate and be skipped).
53
+
- Defaults for properties must now be valid values for their respective type (e.g. "example string" is an invalid default for an `integer` type property, and the function for an endpoint using it would fail to generate and be skipped).
47
54
48
55
### Additions
56
+
49
57
- Added support for header parameters (#117)
50
58
51
59
### Fixes
52
-
- JSON bodies will now be assigned correctly in generated clients(#139 & #147). Thanks @pawamoy!
53
60
61
+
- JSON bodies will now be assigned correctly in generated clients(#139 & #147). Thanks @pawamoy!
54
62
55
63
## 0.5.2 - 2020-08-06
64
+
56
65
### Additions
66
+
57
67
- Added `project_name_override` and `package_name_override` config options to override the name of the generated project/package (#123)
58
68
- The generated library's version is now the same as the OpenAPI doc's version (#134)
59
69
60
-
61
70
## 0.5.1 - 2020-08-05
71
+
62
72
### Fixes
73
+
63
74
- Relative paths are now allowed in securitySchemes/OAuthFlow/tokenUrl (#130).
64
75
- Schema validation errors will no longer print a stack trace (#131).
65
76
- Invalid YAML/URL will no longer print stack trace (#128)
66
77
67
-
68
78
## 0.5.0 - 2020-08-05
79
+
69
80
### Changes
81
+
70
82
- When encountering a problem, the generator will now differentiate between warnings (things it was able to skip past)
71
-
and errors (things which halt generation altogether).
83
+
and errors (things which halt generation altogether).
72
84
73
85
### Additions
86
+
74
87
- The generator can now handle many more errors gracefully, skipping the things it can't generate and continuing
75
-
with the pieces it can.
88
+
with the pieces it can.
76
89
- Support for Enums declared in "components/schemas" and references to them (#102).
77
90
- Generated clients can now be installed via pip (#120).
78
91
- Support for YAML OpenAPI documents (#111)
79
-
92
+
80
93
### Internal Changes
81
-
- Switched OpenAPI document parsing to use Pydantic based on a vendored version of
0 commit comments