-
-
Notifications
You must be signed in to change notification settings - Fork 232
feat: param query support deepObject style #711
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #711 +/- ##
==========================================
+ Coverage 92.78% 92.90% +0.11%
==========================================
Files 22 22
Lines 5062 5174 +112
==========================================
+ Hits 4697 4807 +110
- Misses 314 315 +1
- Partials 51 52 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: | ||
| v, err := strconv.ParseInt(value, 10, 64) | ||
| if err != nil { | ||
| return errors.New("invalid integer") |
Copilot
AI
Feb 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message 'invalid integer' is too generic. Consider specifying the field name in the error message.
| return errors.New("invalid integer") | |
| return fmt.Errorf("invalid integer for field '%s'", fieldName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is okay because the error gets added with additional context to the response using the PathBuffer and current value. No need to be more specific here!
Response
{ "$schema": "http://127.0.0.1:8888/schemas/GreetingOutputBody.json", "person": { "name": "foo", "age": 20 }, "map": { "a": "foo", "b": "foo2" } }