Skip to content

Commit

Permalink
🐛 add missing fields to schema merge
Browse files Browse the repository at this point in the history
We never merged the Name and the min version

Signed-off-by: Dominik Richter <[email protected]>
  • Loading branch information
arlimus committed Sep 19, 2023
1 parent e46f977 commit 36f6b14
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions providers-sdk/v1/resources/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,21 @@ func (s *Schema) Add(other *Schema) *Schema {
existing.IsExtension = v.IsExtension
existing.Provider = v.Provider
existing.Init = v.Init
} else if !v.IsExtension {
// TODO: clean up any resource that clashes right now. There are a few
// implicit extensions that cause this behavior at the moment.
// log.Warn().Str("resource", k).Msg("found a resource that is not flagged as `extends` properly")
}
// TODO: clean up any resource that clashes right now. There are a few
// implicit extensions that cause this behavior at the moment.
// log.Warn().Str("resource", k).Msg("found a resource that is not flagged as `extends` properly")
// else if !v.IsExtension {}

if v.Title != "" {
existing.Title = v.Title
}
if v.Name != "" {
existing.Name = v.Name
}
if v.MinMondooVersion != "" {
existing.MinMondooVersion = v.MinMondooVersion
}
if v.Desc != "" {
existing.Desc = v.Desc
}
Expand Down

0 comments on commit 36f6b14

Please sign in to comment.