Skip to content

Commit bd03e36

Browse files
fix: Project Collection Tag (#50)
1 parent c52621d commit bd03e36

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

project.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ type Project struct {
4040
ParentRef *ParentRef `json:"parent,omitempty"`
4141
LastBOMImport int `json:"lastBomImport"`
4242
ExternalReferences []ExternalReference `json:"externalReferences,omitempty"`
43-
CollectionLogic CollectionLogic `json:"collectionLogic,omitempty"`
44-
CollectionTag string `json:"collectionTag,omitempty"`
43+
CollectionLogic *CollectionLogic `json:"collectionLogic,omitempty"` // Since v4.13.0
44+
CollectionTag *Tag `json:"collectionTag,omitempty"` // Since v4.13.0
4545
}
4646

4747
type ParentRef struct {

project_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func TestProjectService_CreateWithCollection(t *testing.T) {
4343
Name: "acme-app",
4444
Version: "1.0.0",
4545
Active: true,
46-
CollectionLogic: CollectionLogicAggregateDirectChildren,
46+
CollectionLogic: &CollectionLogicAggregateDirectChildren,
4747
})
4848
require.NoError(t, err)
4949

@@ -55,7 +55,8 @@ func TestProjectService_CreateWithCollection(t *testing.T) {
5555
Name: "acme-app-2",
5656
Version: "1.0.0",
5757
Active: true,
58-
CollectionLogic: CollectionLogicAggregateDirectChildrenWithTag,
58+
CollectionLogic: &CollectionLogicAggregateDirectChildrenWithTag,
59+
CollectionTag: &Tag{Name: tag},
5960
})
6061
require.NoError(t, err)
6162

0 commit comments

Comments
 (0)