Skip to content

chore: return error for untested fields in tools.yaml #239

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

Merged
merged 6 commits into from
Feb 3, 2025
Merged

Conversation

Yuan325
Copy link
Contributor

@Yuan325 Yuan325 commented Jan 28, 2025

This only checks within SourceConfig, ToolConfig, and AuthSourceConfig.

Error when an unknown field is provided: 2025-01-27T22:43:46.988401-08:00 ERROR "unable to parse tool file at \"tools.yaml\": unable to parse as \"cloud-sql-postgres\": [2:1] unknown field \"extra\"\n 1 | database: test_database\n> 2 | extra: here\n ^\n 3 | instance: toolbox-cloudsql\n 4 | kind: cloud-sql-postgres\n 5 | password: postgres\n 6 | "

Error when a required field is not provided: 2025-01-27T17:49:47.584846-08:00 ERROR "unable to parse tool file at \"tools.yaml\": validation failed: Key: 'Config.Region' Error:Field validation for 'Region' failed on the 'required' tag"

@Yuan325 Yuan325 requested a review from a team as a code owner January 28, 2025 01:48
@Yuan325 Yuan325 marked this pull request as draft January 28, 2025 01:48
@Yuan325 Yuan325 force-pushed the yaml-update branch 6 times, most recently from 2d6747f to d359b51 Compare February 3, 2025 20:57
@Yuan325 Yuan325 marked this pull request as ready for review February 3, 2025 21:09
@Yuan325 Yuan325 merged commit a0ac533 into main Feb 3, 2025
8 checks passed
@Yuan325 Yuan325 deleted the yaml-update branch February 3, 2025 23:30
jeffreyrubi pushed a commit to jeffreyrubi/genai-toolbox that referenced this pull request Jun 7, 2025
Tested locally to confirm the changes resolve the issue. Working as expected,
jeffreyrubi pushed a commit to jeffreyrubi/genai-toolbox that referenced this pull request Jun 7, 2025
This only checks within `SourceConfig`, `ToolConfig`, and
`AuthSourceConfig`.

Error when an unknown field is provided:
`2025-01-27T22:43:46.988401-08:00 ERROR "unable to parse tool file at
\"tools.yaml\": unable to parse as \"cloud-sql-postgres\": [2:1] unknown
field \"extra\"\n 1 | database: test_database\n> 2 | extra: here\n ^\n 3
| instance: toolbox-cloudsql\n 4 | kind: cloud-sql-postgres\n 5 |
password: postgres\n 6 | "`

Error when a required field is not provided:
`2025-01-27T17:49:47.584846-08:00 ERROR "unable to parse tool file at
\"tools.yaml\": validation failed: Key: 'Config.Region' Error:Field
validation for 'Region' failed on the 'required' tag"`

---------

Co-authored-by: Kurtis Van Gent <[email protected]>
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.

2 participants