Skip to content

Commit 09f9391

Browse files
authored
Merge pull request #22 from zkarpinski/fix/missing-createdOn-key
bugfix: Missing key in inventory summary api
2 parents 9521f35 + 4de1a9c commit 09f9391

3 files changed

Lines changed: 19 additions & 6 deletions

File tree

codeinsight_sdk/__init__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1+
# _ _ _ _ ___ __ ___ __ ___ __ _
2+
# / / \ | \ |_ | |\ | (_ | /__ |_| | __ (_ | \ |/
3+
# \_ \_/ |_/ |_ _|_ | \| __) _|_ \_| | | | __) |_/ |\
4+
#
5+
"""
6+
Code Insight SDK package for Python.
7+
8+
Copyright (C) 2024 Zachary Karpinski. All Rights Reserved.
9+
10+
Basic usage:
11+
12+
>>> import codeinsight_sdk
13+
>>> client = codeinsight_sdk.CodeInsightClient(<base_url>, <api_token>)
14+
>>> print(client.projects.all())
15+
...
16+
"""
17+
118
from .client import CodeInsightClient

codeinsight_sdk/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ class ProjectInventoryItem(DataClassJsonMixin):
3838
type: str
3939
priority: str
4040
createdBy: str
41-
createdOn: str
42-
updatedOn: str
41+
createdOn: Optional[str] = None
42+
updatedOn: Optional[str] = None
4343
url: Optional[str] = None
4444
componentUrl: Optional[str] = None
4545
componentDescription: Optional[str] = None

tests/test_client.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@ def test_get_project_inventory_summary(self, client):
176176
"type":"component",
177177
"priority":"low",
178178
"createdBy":"Zach",
179-
"createdOn":"Today",
180-
"updatedOn":"Tomorrow",
181179
"componentName":"snakeyaml",
182180
"componentVersionName":"2.0"
183181
},
@@ -188,8 +186,6 @@ def test_get_project_inventory_summary(self, client):
188186
"type":"component",
189187
"priority":"low",
190188
"createdBy":"Zach",
191-
"createdOn":"Today",
192-
"updatedOn":"Tomorrow",
193189
"componentName":"snakeyaml",
194190
"componentVersionName":"2.0"
195191
}

0 commit comments

Comments
 (0)