Skip to content

Commit

Permalink
ignore AdditionalProperties when checking struct field tags
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
codeboten committed Dec 17, 2024
1 parent 9a64e34 commit 9d5aa39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions component/componenttest/configtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ func checkStructFieldTags(f reflect.StructField) error {
default:
fieldTag := tagParts[0]
if !configFieldTagRegExp.MatchString(fieldTag) {
if f.Name == "AdditionalProperties" {
return nil
}
return fmt.Errorf(
"field %q has config tag %q which doesn't satisfy %q",
f.Name,
Expand Down

0 comments on commit 9d5aa39

Please sign in to comment.