swagger: agent, correctly capitalize eventBasedHold param - #4898
Conversation
All SM agent handlers expect eventBasedHold, not EventBasedHold. This was overlooked because our hold test interceptor works on swagger models, so it was consistent in the client and test interceptor interaction. Since our gcs mock does not support holds, we didn't spot it until we executed tests against the real gcs.
There was a problem hiding this comment.
🟢 Ready to approve
The schema and generated models now consistently match the agent handler contract.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Corrects the agent Swagger contract so event-based hold fields match the lower-camel-case parameter expected by agent handlers.
Changes:
- Renames both affected JSON properties to
eventBasedHold. - Regenerates corresponding agent model tags.
File summaries
| File | Description |
|---|---|
v3/swagger/agent.json |
Corrects both schema property names. |
v3/swagger/gen/agent/models/check_permissions_options.go |
Updates the generated request JSON tag. |
v3/swagger/gen/agent/models/list_item.go |
Updates the generated response JSON tag. |
Review details
Files not reviewed (2)
- v3/swagger/gen/agent/models/check_permissions_options.go: Generated file
- v3/swagger/gen/agent/models/list_item.go: Generated file
- Files reviewed: 1/3 changed files
- Comments generated: 0
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
VAveryanov8
left a comment
There was a problem hiding this comment.
Do you think it's possible (worth) to adjust our integration tests somehow to catch similar issue in the future?
So in general such a thing would be caught in most other cases, but here we lack gcs mock support for event based holds and both SM client and SM test interceptor operate on the same swagger file, so this failure wasn't caught there. I can extend the interceptor to have some simple validation on the json fields returned from SM agent in the PR which will bump swagger dep in the main module. |
All SM agent handlers expect eventBasedHold, not EventBasedHold. This was overlooked because our hold test interceptor works on swagger models, so it was consistent in the client and test interceptor interaction. Since our gcs mock does not support holds, we didn't spot it until we executed tests against the real gcs.