Version 3.1, using openapi 7.16#37
Conversation
Reviewer's GuideClient regenerated with OpenAPI Generator 7.16, updating the OpenAPI document version to 2.8.1 and SDK version to 3.1.0 across all modules and tests, and improving type comparisons in the deserializer for more accurate identity checks. Class diagram for updated deserialization logic in ApiClientclassDiagram
class ApiClient {
__deserialize(data, klass)
__deserialize_primitive(data, klass)
__deserialize_object(data)
__deserialize_date(data)
__deserialize_datetime(data)
__deserialize_enum(data, klass)
}
ApiClient : PRIMITIVE_TYPES
ApiClient : __deserialize now uses 'is' for type checks
ApiClient : Handles object, datetime.date, datetime.datetime, decimal.Decimal with 'is' identity checks
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull Request Overview
This PR updates the OpenAPI-generated Python client from version 2.8.0 to 2.8.1, regenerated using OpenAPI Generator 7.16.0 (up from 7.15.0). The changes include version string updates across all generated files, removal of lazy import infrastructure, and minor code style improvements in deserialization logic.
Reviewed Changes
Copilot reviewed 108 out of 108 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| regenerate-client.sh | Updates OpenAPI Generator version to 7.16.0 |
| ibutsu_client/configuration.py | Updates API version string to 2.8.1 |
| ibutsu_client/api_client.py | Updates version and improves equality checks using is operator |
| ibutsu_client/init.py | Removes lazy import conditional logic, simplifies imports |
| ibutsu_client/api/init.py | Removes lazy import infrastructure |
| ibutsu_client/models/init.py | Removes lazy import infrastructure |
| All other files | Updates OpenAPI document version comment from 2.8.0 to 2.8.1 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `ibutsu_client/api_client.py:430-431` </location>
<code_context>
- elif klass == object:
+ elif klass is object:
return self.__deserialize_object(data)
- elif klass == datetime.date:
+ elif klass is datetime.date:
return self.__deserialize_date(data)
- elif klass == datetime.datetime:
</code_context>
<issue_to_address>
**suggestion:** Changed type comparison to 'is' for datetime.date, which is more robust.
If 'klass' might be a subclass of 'datetime.date', 'is' will not match; ensure subclassing is not expected.
```suggestion
elif klass == datetime.date:
return self.__deserialize_date(data)
```
</issue_to_address>
### Comment 2
<location> `ibutsu_client/api_client.py:432-433` </location>
<code_context>
- elif klass == datetime.date:
+ elif klass is datetime.date:
return self.__deserialize_date(data)
- elif klass == datetime.datetime:
+ elif klass is datetime.datetime:
return self.__deserialize_datetime(data)
- elif klass == decimal.Decimal:
</code_context>
<issue_to_address>
**suggestion:** Type comparison for datetime.datetime now uses 'is', which is more idiomatic.
If you need to support subclasses of datetime.datetime, use 'issubclass' for broader compatibility.
```suggestion
elif isinstance(klass, type) and issubclass(klass, datetime.datetime):
return self.__deserialize_datetime(data)
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Regenerate the Python SDK using OpenAPI Generator 7.16.0 with the OpenAPI spec bumped to 2.8.1, update client version to 3.1.0, and refine deserialization type checks.
Bug Fixes:
Enhancements:
Build:
Tests: