-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update pydantic to v2 and update datamodel-code-generator to 0.25.6 #408
Conversation
…_to_0.21.4 Update datamodel code generator to 0.21.4
Some test fixes
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Fix versions in pre-commit
Some packages updated
Restore code-cov upload
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #408 +/- ##
==========================================
+ Coverage 92.16% 92.26% +0.10%
==========================================
Files 6 5 -1
Lines 383 401 +18
==========================================
+ Hits 353 370 +17
- Misses 30 31 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for the great PR. |
|
||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 # nosemgrep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the feature I wanted, and I would like to adopt it in datamodel-code-generator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, please do. We use this also in our open source project FastStream - https://github.com/airtai/faststream/blob/main/.github/workflows/test.yaml#L476
data_type = self.parse_schema(name, schema, [*path, name]) | ||
data_type = self._collapse_root_model(data_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously, if it were datamodel-code-generator, I would make it optional, but for this project, it should be standard for convenience reasons.
I saw your PR #379 and I needed this feature.
Also I needed pydantic v2 support.
I forked your branch, installed pydantic v2 and fixed the bugs.
@koxudaxi Please take a look and let me know this is fine or not.