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
feat: ignore uri tag with gin #1315
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportBase: 85.16% // Head: 85.14% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1315 +/- ##
==========================================
- Coverage 85.16% 85.14% -0.03%
==========================================
Files 19 19
Lines 3613 3621 +8
==========================================
+ Hits 3077 3083 +6
- Misses 458 459 +1
- Partials 78 79 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
field_parser.go
Outdated
@@ -21,6 +21,7 @@ const ( | |||
optionalLabel = "optional" | |||
swaggerTypeTag = "swaggertype" | |||
swaggerIgnoreTag = "swaggerignore" | |||
uriTag = "uri" |
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.
I suggest the parameter name should be ignoreTags
and should accept a comma-separated list of tags.
var ignoreTagArray = strings.Split(ignoreTags, ",") | ||
|
||
func isIgnore(tag reflect.StructTag) bool { | ||
ignoreTag, ok := tag.Lookup(swaggerIgnoreTag) |
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.
Please add unit tests to cover this function.
@@ -20,6 +20,7 @@ const ( | |||
optionalLabel = "optional" | |||
swaggerTypeTag = "swaggertype" | |||
swaggerIgnoreTag = "swaggerignore" | |||
ignoreTags = "uri" |
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 ignoredTags should be declared as a swagParam not as constant
Describe the PR
ignore uri tag with gin
Relation issue
#1302
Additional context
.