-
-
Notifications
You must be signed in to change notification settings - Fork 232
fix: type schema description not work #462
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
fix: type schema description not work #462
Conversation
WalkthroughThe change in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #462 +/- ##
=======================================
Coverage 92.77% 92.77%
=======================================
Files 21 21
Lines 3571 3572 +1
=======================================
+ Hits 3313 3314 +1
Misses 220 220
Partials 38 38 ☔ 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.
Actionable comments posted: 0
Outside diff range and nitpick comments (3)
schema.go (3)
Line range hint
64-64: Resolve undefined function and constants.+ import "your_package" // Ensure this package contains the required functions and constants - marshalJSON([]jsonFieldInfo{ + your_package.marshalJSON([]jsonFieldInfo{ - omitNever, + your_package.omitNever, - omitEmpty, + your_package.omitEmpty, - omitNil, + your_package.omitNil,The
marshalJSONfunction and constants likeomitNever,omitEmpty, andomitNilare not defined in the provided code or standard library. Ensure these are defined in your project or imported from the correct package.Also applies to: 65-65, 66-66, 161-161, 162-162, 163-163, 169-169, 172-172
Line range hint
205-205: Resolve undefined functionmapTo.+ import "your_package" // Ensure this package contains the required functions - strings.Join(mapTo(s.Enum, func(v any) string { + strings.Join(your_package.mapTo(s.Enum, func(v any) string {The
mapTofunction is used here but is not defined in the provided code or standard library. Ensure it is correctly defined or imported.
Line range hint
625-625: EnsureRegistrytype is defined or imported.+ import "your_package" // Ensure this package contains the `Registry` type - func (s *Schema) MarshalJSON() ([]byte, error) { + func (s *Schema) MarshalJSON(r your_package.Registry) ([]byte, error) {The
Registrytype is referenced multiple times but is not defined in the provided code. Ensure it is correctly defined or imported.Also applies to: 348-348, 438-438
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- schema.go (1 hunks)
Additional context used
golangci-lint
schema.go
625-625: undefined: Registry
348-348: undefined: Registry
438-438: undefined: Registry
64-64: undefined: marshalJSON
65-65: undefined: omitNever
66-66: undefined: omitEmpty
161-161: undefined: marshalJSON
162-162: undefined: omitEmpty
163-163: undefined: omitEmpty
169-169: undefined: omitNil
172-172: undefined: omitNil
205-205: undefined: mapTo
Additional comments not posted (1)
schema.go (1)
491-493: Ensure theDescriptionfield is correctly updated from thedoctag.This change correctly implements the logic to set the
Descriptionfield of the schema based on thedoctag of the struct field. This aligns with the PR's objective to fix the type schema description issue.
danielgtaylor
left a comment
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.
Thanks! 👍
Summary by CodeRabbit
Descriptionfield to ensure it updates only when the tag value is not empty.