Skip to content

fix: Add missing name tag to schema annotations. #380

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shukladivyansh
Copy link
Contributor

Without this tag, we get errors like google/adk-java#152

@shukladivyansh shukladivyansh changed the title Add missing name tag to schema annotations. fix: Add missing name tag to schema annotations. Jun 6, 2025
Copy link
Member

@vorburger vorburger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with this. This repetiion should not be required; see google/adk-java#152 (comment).

@shukladivyansh
Copy link
Contributor Author

cc @Sita04

@glaforge
Copy link

glaforge commented Jun 7, 2025

Currently, you have to 1) either provide a name attribute, or indeed 2) use -parameter.

I didn't check, but if name is always required, regardless of whether the user specifies -parameter or not, then I would think it's a bug.

IMHO the logic should be: if the name is specified, use it (as you may want to override the actual parameter name), or else if the name can be found by reflection (because -parameter is set) then use that, otherwise throw an error.

@glaforge
Copy link

glaforge commented Jun 7, 2025

Historical notes: A bit before the release of 0.1.0, no error was thrown when the name attribute wasn't specified. But if -parameter wasn't set, a generic name like arg0 was used instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants