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
* Major refactor of models/enums/schemas.
* Switch properties to use attr.s instead of dataclass
* Fix forward references and properly allow Unset for ModelPropertys
* Refactor response handling to use the same schema generation as input properties.
* Added improved naming scheme of models/enums using parent elements
Co-authored-by: Ethan Mann <emann@triaxtec.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
12
12
- Any request/response field that is not `required` and wasn't specified is now set to `UNSET` instead of `None`.
13
13
- Values that are `UNSET` will not be sent along in API calls
14
+
- Schemas defined with `type=object` will now be converted into classes, just like if they were created as ref components.
15
+
The previous behavior was a combination of skipping and using generic Dicts for these schemas.
16
+
- Response schema handling was unified with input schema handling, meaning that responses will behave differently than before.
17
+
Specifically, instead of the content-type deciding what the generated Python type is, the schema itself will.
18
+
- As a result of this, endpoints that used to return `bytes` when content-type was application/octet-stream will now return a `File` object if the type of the data is "binary", just like if you were submitting that type instead of receiving it.
19
+
- Instead of skipping input properties with no type, enum, anyOf, or oneOf declared, the property will be declared as `None`.
20
+
- Class (models and Enums) names will now contain the name of their parent element (if any). For example, a property
21
+
declared in an endpoint will be named like {endpoint_name}_{previous_class_name}. Classes will no longer be
22
+
deduplicated by appending a number to the end of the generated name, so if two names conflict with this new naming
23
+
scheme, there will be an error instead.
14
24
15
25
### Additions
16
26
17
27
- Added a `--custom-template-path` option for providing custom jinja2 templates (#231 - Thanks @erichulburd!).
18
28
- Better compatibility for "required" (whether or not the field must be included) and "nullable" (whether or not the field can be null) (#205 & #208). Thanks @bowenwr & @emannguitar!
29
+
- Support for all the same schemas in responses as are supported in parameters.
0 commit comments