Repository navigation
Infer scalar type from anyOf members for optional parameters - #3093
Closed
DavidLeeGarrett wants to merge 1 commit into
Closed
DavidLeeGarrett wants to merge 1 commit into
DavidLeeGarrett wants to merge 1 commit into
Conversation
Optional scalar parameters (e.g. int | None) produced 'type': 'object' in parameters_json_schema because pydantic emits anyOf without a top-level type and the Vertex fallback hardcoded 'object'. Now the type is inferred from the anyOf members when they share a single non-null type, falling back to 'object' only for heterogeneous members. Fixes googleapis#3060
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Hi @DavidLeeGarrett, Kindly please resolve the conflicts |
|
This pull request has been marked as stale because it has been inactive for 14 days with no activity. It will be closed in 2 days if no further activity occurs. |
|
This pull request was closed because it has been inactive for 16 days. Please reopen or submit a new PR if you need further assistance. Thanks! |
This file contains hidden or 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
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.
Optional scalar parameters (e.g.
int | None) produced"type": "object"inparameters_json_schemabecause pydantic emitsanyOfwithout a top-level type and the Vertex fallback hardcoded"object". Now the type is inferred from theanyOfmembers when they share a single non-null type, falling back to"object"only for heterogeneous members. Addstest_function_with_optional_scalar_params.Fixes #3060.