feat: Upgrade internal Pydantic use to v2. Thanks @KristinnVikar!#779
feat: Upgrade internal Pydantic use to v2. Thanks @KristinnVikar!#779dbanty merged 17 commits intoopenapi-generators:mainfrom
Conversation
Looking at tests shows me that str as key instead of ClassName is more expected?
|
Local tests seem to be mostly working, only tests failing are So I went about a different approach to roughly match the content of the GeneratorError instead of exact match (Since the Pydantic version is included in GeneratorError.detail) |
Codecov Report
@@ Coverage Diff @@
## main #779 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 49 49
Lines 1971 1918 -53
=========================================
- Hits 1971 1918 -53
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
* Schema union ordering try Schema before Reference * Support for boolean values in Schema.enum * Missing default=None in SecurityScheme.security_scheme_in which is enforced by Pydantic V2 * Update Pydantic to V2.1.1
|
Did some minor fixes with missing default in Field & schema ordering. Running it on the project I'm using this tool for seems to work just fine as of this last commit! Hoping someone else can test it as well to see if there's any issues I need to fix! |
|
Thanks for this @KristinnVikar! Just wanted to drop a link to some thoughts I had written on another thread about the motivation for this change |
For what it's worth, I have tested it for my use cases and did not encounter any issues :) |
dbanty
left a comment
There was a problem hiding this comment.
Thanks so much for doing this!
Inital changes required for Pydantic v2 support, both hand updating + bump pydantic
Blockers
Currently
142 out of 449 tests are failing, all of which are due to the issue above.