-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Pydantic v2 support for OpenAPI Specs #11936
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
dosubot
bot
added
the
🤖:improvement
Medium size change to existing code to handle new use-cases
label
Oct 17, 2023
- switching to openapi-pydantic, a fork of openapi-schema-pydantic that was updated for pydantic v2 - overridding OpenApiSpec.openapi typehint to support older specs (e.g. klarna is 3.0.1) - removing Pydantic v1/v2 branching logic
kreneskyp
force-pushed
the
openapi_pydantic_v2
branch
from
October 18, 2023 01:24
b46d38e
to
9261ab7
Compare
Thanks @kreneskyp will review tomorrow |
eyurtsev
approved these changes
Oct 19, 2023
Thanks @eyurtsev! 🚀 |
ghost
mentioned this pull request
Oct 21, 2023
14 tasks
14 tasks
hoanq1811
pushed a commit
to hoanq1811/langchain
that referenced
this pull request
Feb 2, 2024
- **Description:** Adding Pydantic v2 support for OpenAPI Specs - **Issue:** - OpenAPI spec support was disabled because `openapi-schema-pydantic` doesn't support Pydantic v2: langchain-ai#9205 - Caused errors in `get_openapi_chain` - This may be the cause of langchain-ai#9520. - **Tag maintainer:** @eyurtsev - **Twitter handle:** kreneskyp The root cause was that `openapi-schema-pydantic` hasn't been updated in some time but [openapi-pydantic](https://github.com/mike-oakley/openapi-pydantic) forked and updated the project.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description: Adding Pydantic v2 support for OpenAPI Specs
Issue:
OpenAPI spec support was disabled because
openapi-schema-pydantic
doesn't support Pydantic v2:Wrap OpenAPI features in conditionals for pydantic v2 compatibility #9205
Caused errors in
get_openapi_chain
This may be the cause of AttributeError: 'super' object has no attribute 'parse_obj' when using OpenAPISpec.from_file #9520.
Tag maintainer: @eyurtsev
Twitter handle: kreneskyp
The root cause was that
openapi-schema-pydantic
hasn't been updated in some time but openapi-pydantic forked and updated the project.