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
Optional args #111
Comments
Add a possible reference https://json-schema.org/understanding-json-schema/reference/combining.html#oneof |
You mean individual optional arguments? Yeah those are not supported yet. It's only because I haven't gotten to it. The API currently assumes all method args are required and are plain JSON serializable types like (dict, list, string, ...). I should add that to the documentation I think. This wasn't so much a design decision but just that I haven't explored it yet. I will tinker with this to see how the API can be adjusted to allow optional args. |
Yes, because after Python 3.10, the |
Hello, I noticed that in version 1.3, the
help
method converts Python objects into a JSON structure. However, the current implementation prevents the use ofUnionType
in action definitions, which makes the args unable to be optional.I looked at the code, and the main reason for this is:
When the argument type is a
UnionType
,sig_annotation
does not have the__name__
attribute.Is this a design decision?
The text was updated successfully, but these errors were encountered: