Skip to content

typehints bug: schema didn't specify the schema type field #199

@dandye

Description

@dandye

Resolved with:

- comment: Optional[Union[str, Literal[""]]] = None,
+ comment: Optional[str] = None,

The problematic pattern was specifically Optional[Union[str, Literal[""]]] which combined Optional with Union with Literal for an empty string and confused the schema generator. The simple Union[str, dict] patterns are standard and should work fine.

When deployed to Agent Engine, it raises:

`do_update_security_alert` functionDeclaration `parameters.comment` schema didn\'t specify the schema type field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions