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
8
+
## 0.6.0 - Unreleased
9
+
10
+
### Breaking Changes
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
20
+
`Optional`, so mypy will require you to handle potential errors (or explicitly ignore them).
21
+
- Moved `models.types` generated module up a level, so just `types`.
22
+
- All generated classes that were `dataclass` now use the `attrs` package instead
23
+
24
+
### Additions
25
+
26
+
- Every generated API module will have a `sync_detailed()` and `asyncio_detailed()` function which work like their
27
+
non-detailed counterparts, but return a `types.Response[T]` instead of an `Optional[T]` (where T is the parsed body type).
28
+
`types.Response` contains `status_code`, `content` (bytes of returned content), `headers`, and `parsed` (the
29
+
parsed return type you would get from the non-detailed function). (#115)
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))`).
33
+
- Unsupported content types or no responses at all will no longer result in an endpoint being completely skipped. Instead,
34
+
only the `detailed` versions of the endpoint will be generated, where the resulting `Response.parsed` is always `None`.
35
+
(#141)
36
+
- Support for Python 3.6 (#137 & #154)
37
+
- Support for enums with integer values
38
+
39
+
### Changes
40
+
41
+
- The format of any errors/warnings has been spaced out a bit.
7
42
8
43
## 0.5.5 - 2020-09-04
9
44
### Fixes
@@ -12,128 +47,154 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
47
13
48
14
49
## 0.5.4 - 2020-08-29
50
+
15
51
### Additions
52
+
16
53
- Support for octet-stream content type (#116)
17
54
- Support for [nullable](https://swagger.io/docs/specification/data-models/data-types/#null) (#99)
18
55
- Union properties can be defined using oneOf (#98)
19
56
- Support for lists of strings, integers, floats and booleans as responses (#165). Thanks @Maistho!
20
57
21
-
22
58
## 0.5.3 - 2020-08-13
59
+
23
60
### Security
61
+
24
62
- All values that become file/directory names are sanitized to address path traversal vulnerabilities (CVE-2020-15141)
25
63
- 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)
26
64
27
65
### Changes
66
+
28
67
- Due to security concerns/implementation complexities, default values are temporarily unsupported for any `RefProperty` that doesn't refer to an enum.
29
-
- 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).
68
+
- 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).
30
69
31
70
### Additions
71
+
32
72
- Added support for header parameters (#117)
33
73
34
74
### Fixes
35
-
- JSON bodies will now be assigned correctly in generated clients(#139 & #147). Thanks @pawamoy!
36
75
76
+
- JSON bodies will now be assigned correctly in generated clients(#139 & #147). Thanks @pawamoy!
37
77
38
78
## 0.5.2 - 2020-08-06
79
+
39
80
### Additions
81
+
40
82
- Added `project_name_override` and `package_name_override` config options to override the name of the generated project/package (#123)
41
83
- The generated library's version is now the same as the OpenAPI doc's version (#134)
42
84
43
-
44
85
## 0.5.1 - 2020-08-05
86
+
45
87
### Fixes
88
+
46
89
- Relative paths are now allowed in securitySchemes/OAuthFlow/tokenUrl (#130).
47
90
- Schema validation errors will no longer print a stack trace (#131).
48
91
- Invalid YAML/URL will no longer print stack trace (#128)
49
92
50
-
51
93
## 0.5.0 - 2020-08-05
94
+
52
95
### Changes
96
+
53
97
- When encountering a problem, the generator will now differentiate between warnings (things it was able to skip past)
54
-
and errors (things which halt generation altogether).
98
+
and errors (things which halt generation altogether).
55
99
56
100
### Additions
101
+
57
102
- The generator can now handle many more errors gracefully, skipping the things it can't generate and continuing
58
-
with the pieces it can.
103
+
with the pieces it can.
59
104
- Support for Enums declared in "components/schemas" and references to them (#102).
60
105
- Generated clients can now be installed via pip (#120).
61
106
- Support for YAML OpenAPI documents (#111)
62
-
107
+
63
108
### Internal Changes
64
-
- Switched OpenAPI document parsing to use Pydantic based on a vendored version of
0 commit comments