legit-api-client 1.1.4463__py3-none-any.whl → 1.1.4568__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of legit-api-client might be problematic. Click here for more details.
- legit_api_client/__init__.py +5 -1
- legit_api_client/api_client.py +4 -4
- legit_api_client/configuration.py +4 -2
- legit_api_client/exceptions.py +6 -3
- legit_api_client/models/__init__.py +2 -0
- legit_api_client/models/control_classification.py +2 -0
- legit_api_client/models/control_source_type.py +1 -0
- legit_api_client/models/customer_facing_issue_dto.py +9 -2
- legit_api_client/models/repository_automatic_business_impact_factor.py +43 -0
- legit_api_client/models/repository_context_field_dto.py +102 -0
- legit_api_client/models/repository_dto.py +16 -1
- legit_api_client/models/scm_type.py +1 -0
- legit_api_client/models/sdlc_asset_type.py +1 -0
- legit_api_client/models/secrets_data_dto.py +9 -2
- legit_api_client/rest.py +7 -2
- {legit_api_client-1.1.4463.dist-info → legit_api_client-1.1.4568.dist-info}/METADATA +5 -3
- {legit_api_client-1.1.4463.dist-info → legit_api_client-1.1.4568.dist-info}/RECORD +19 -17
- {legit_api_client-1.1.4463.dist-info → legit_api_client-1.1.4568.dist-info}/WHEEL +0 -0
- {legit_api_client-1.1.4463.dist-info → legit_api_client-1.1.4568.dist-info}/top_level.txt +0 -0
legit_api_client/__init__.py
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
__version__ = "1.1.
|
|
17
|
+
__version__ = "1.1.4568"
|
|
18
18
|
|
|
19
19
|
# Define package exports
|
|
20
20
|
__all__ = [
|
|
@@ -196,6 +196,8 @@ __all__ = [
|
|
|
196
196
|
"ProductUnitType",
|
|
197
197
|
"ProgrammingLanguage",
|
|
198
198
|
"RepositoriesToContainersOperationDto",
|
|
199
|
+
"RepositoryAutomaticBusinessImpactFactor",
|
|
200
|
+
"RepositoryContextFieldDto",
|
|
199
201
|
"RepositoryControlDto",
|
|
200
202
|
"RepositoryDirectory",
|
|
201
203
|
"RepositoryDto",
|
|
@@ -414,6 +416,8 @@ from legit_api_client.models.product_unit_name_dto import ProductUnitNameDto as
|
|
|
414
416
|
from legit_api_client.models.product_unit_type import ProductUnitType as ProductUnitType
|
|
415
417
|
from legit_api_client.models.programming_language import ProgrammingLanguage as ProgrammingLanguage
|
|
416
418
|
from legit_api_client.models.repositories_to_containers_operation_dto import RepositoriesToContainersOperationDto as RepositoriesToContainersOperationDto
|
|
419
|
+
from legit_api_client.models.repository_automatic_business_impact_factor import RepositoryAutomaticBusinessImpactFactor as RepositoryAutomaticBusinessImpactFactor
|
|
420
|
+
from legit_api_client.models.repository_context_field_dto import RepositoryContextFieldDto as RepositoryContextFieldDto
|
|
417
421
|
from legit_api_client.models.repository_control_dto import RepositoryControlDto as RepositoryControlDto
|
|
418
422
|
from legit_api_client.models.repository_directory import RepositoryDirectory as RepositoryDirectory
|
|
419
423
|
from legit_api_client.models.repository_dto import RepositoryDto as RepositoryDto
|
legit_api_client/api_client.py
CHANGED
|
@@ -91,7 +91,7 @@ class ApiClient:
|
|
|
91
91
|
self.default_headers[header_name] = header_value
|
|
92
92
|
self.cookie = cookie
|
|
93
93
|
# Set default User-Agent.
|
|
94
|
-
self.user_agent = 'OpenAPI-Generator/1.1.
|
|
94
|
+
self.user_agent = 'OpenAPI-Generator/1.1.4568/python'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
def __enter__(self):
|
|
@@ -312,7 +312,7 @@ class ApiClient:
|
|
|
312
312
|
return_data = self.__deserialize_file(response_data)
|
|
313
313
|
elif response_type is not None:
|
|
314
314
|
match = None
|
|
315
|
-
content_type = response_data.
|
|
315
|
+
content_type = response_data.headers.get('content-type')
|
|
316
316
|
if content_type is not None:
|
|
317
317
|
match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
|
|
318
318
|
encoding = match.group(1) if match else "utf-8"
|
|
@@ -329,7 +329,7 @@ class ApiClient:
|
|
|
329
329
|
return ApiResponse(
|
|
330
330
|
status_code = response_data.status,
|
|
331
331
|
data = return_data,
|
|
332
|
-
headers = response_data.
|
|
332
|
+
headers = response_data.headers,
|
|
333
333
|
raw_data = response_data.data
|
|
334
334
|
)
|
|
335
335
|
|
|
@@ -701,7 +701,7 @@ class ApiClient:
|
|
|
701
701
|
os.close(fd)
|
|
702
702
|
os.remove(path)
|
|
703
703
|
|
|
704
|
-
content_disposition = response.
|
|
704
|
+
content_disposition = response.headers.get("Content-Disposition")
|
|
705
705
|
if content_disposition:
|
|
706
706
|
m = re.search(
|
|
707
707
|
r'filename=[\'"]?([^\'"\s]+)[\'"]?',
|
|
@@ -164,7 +164,7 @@ class Configuration:
|
|
|
164
164
|
:param ca_cert_data: verify the peer using concatenated CA certificate data
|
|
165
165
|
in PEM (str) or DER (bytes) format.
|
|
166
166
|
:param cert_file: the path to a client certificate file, for mTLS.
|
|
167
|
-
:param key_file: the path to a client key file, for mTLS.
|
|
167
|
+
:param key_file: the path to a client key file, for mTLS.
|
|
168
168
|
|
|
169
169
|
:Example:
|
|
170
170
|
"""
|
|
@@ -486,6 +486,7 @@ class Configuration:
|
|
|
486
486
|
password = ""
|
|
487
487
|
if self.password is not None:
|
|
488
488
|
password = self.password
|
|
489
|
+
|
|
489
490
|
return urllib3.util.make_headers(
|
|
490
491
|
basic_auth=username + ':' + password
|
|
491
492
|
).get('authorization')
|
|
@@ -515,7 +516,7 @@ class Configuration:
|
|
|
515
516
|
"OS: {env}\n"\
|
|
516
517
|
"Python Version: {pyversion}\n"\
|
|
517
518
|
"Version of the API: 1.0\n"\
|
|
518
|
-
"SDK Package Version: 1.1.
|
|
519
|
+
"SDK Package Version: 1.1.4568".\
|
|
519
520
|
format(env=sys.platform, pyversion=sys.version)
|
|
520
521
|
|
|
521
522
|
def get_host_settings(self) -> List[HostSetting]:
|
|
@@ -563,6 +564,7 @@ class Configuration:
|
|
|
563
564
|
variable_name, variable['default_value'])
|
|
564
565
|
|
|
565
566
|
if 'enum_values' in variable \
|
|
567
|
+
and variable['enum_values'] \
|
|
566
568
|
and used_value not in variable['enum_values']:
|
|
567
569
|
raise ValueError(
|
|
568
570
|
"The variable `{0}` in the host URL has invalid value "
|
legit_api_client/exceptions.py
CHANGED
|
@@ -128,7 +128,7 @@ class ApiException(OpenApiException):
|
|
|
128
128
|
self.body = http_resp.data.decode('utf-8')
|
|
129
129
|
except Exception:
|
|
130
130
|
pass
|
|
131
|
-
self.headers = http_resp.
|
|
131
|
+
self.headers = http_resp.headers
|
|
132
132
|
|
|
133
133
|
@classmethod
|
|
134
134
|
def from_response(
|
|
@@ -169,8 +169,11 @@ class ApiException(OpenApiException):
|
|
|
169
169
|
error_message += "HTTP response headers: {0}\n".format(
|
|
170
170
|
self.headers)
|
|
171
171
|
|
|
172
|
-
if self.
|
|
173
|
-
error_message += "HTTP response body: {0}\n".format(self.
|
|
172
|
+
if self.body:
|
|
173
|
+
error_message += "HTTP response body: {0}\n".format(self.body)
|
|
174
|
+
|
|
175
|
+
if self.data:
|
|
176
|
+
error_message += "HTTP response data: {0}\n".format(self.data)
|
|
174
177
|
|
|
175
178
|
return error_message
|
|
176
179
|
|
|
@@ -162,6 +162,8 @@ from legit_api_client.models.product_unit_name_dto import ProductUnitNameDto
|
|
|
162
162
|
from legit_api_client.models.product_unit_type import ProductUnitType
|
|
163
163
|
from legit_api_client.models.programming_language import ProgrammingLanguage
|
|
164
164
|
from legit_api_client.models.repositories_to_containers_operation_dto import RepositoriesToContainersOperationDto
|
|
165
|
+
from legit_api_client.models.repository_automatic_business_impact_factor import RepositoryAutomaticBusinessImpactFactor
|
|
166
|
+
from legit_api_client.models.repository_context_field_dto import RepositoryContextFieldDto
|
|
165
167
|
from legit_api_client.models.repository_control_dto import RepositoryControlDto
|
|
166
168
|
from legit_api_client.models.repository_directory import RepositoryDirectory
|
|
167
169
|
from legit_api_client.models.repository_dto import RepositoryDto
|
|
@@ -107,6 +107,8 @@ class ControlClassification(str, Enum):
|
|
|
107
107
|
DYNATRACESCA = 'DynatraceSca'
|
|
108
108
|
FORTIFYSCC = 'FortifyScc'
|
|
109
109
|
BRIGHTSECURITY = 'BrightSecurity'
|
|
110
|
+
AWSSECURITYHUB = 'AwsSecurityHub'
|
|
111
|
+
CYTRIX = 'Cytrix'
|
|
110
112
|
|
|
111
113
|
@classmethod
|
|
112
114
|
def from_json(cls, json_str: str) -> Self:
|
|
@@ -67,6 +67,7 @@ class ControlSourceType(str, Enum):
|
|
|
67
67
|
DYNATRACEINTEGRATION = 'DynatraceIntegration'
|
|
68
68
|
FORTIFYSCCINTEGRATION = 'FortifySccIntegration'
|
|
69
69
|
BRIGHTSECURITYINTEGRATION = 'BrightSecurityIntegration'
|
|
70
|
+
CYTRIXINTEGRATION = 'CytrixIntegration'
|
|
70
71
|
|
|
71
72
|
@classmethod
|
|
72
73
|
def from_json(cls, json_str: str) -> Self:
|
|
@@ -65,7 +65,8 @@ class CustomerFacingIssueDto(BaseModel):
|
|
|
65
65
|
assigned_user_id: Optional[StrictStr] = Field(default=None, description="ID of the user assigned to handle this issue (if applicable)", alias="assignedUserId")
|
|
66
66
|
sources: Optional[List[SourceDto]] = Field(default=None, description="The sources the issue originated from")
|
|
67
67
|
product_units: Optional[List[ProductUnitIssueDto]] = Field(default=None, alias="productUnits")
|
|
68
|
-
|
|
68
|
+
remediation_steps: Optional[List[StrictStr]] = Field(default=None, description="Remediation steps for resolving the issue", alias="remediationSteps")
|
|
69
|
+
__properties: ClassVar[List[str]] = ["id", "title", "detectedAt", "lastClosedAt", "lastActionTime", "status", "issueType", "severity", "policySeverity", "closingReason", "closingLocation", "statusChangedNote", "snoozedType", "snoozedUntil", "score", "secretsDataDto", "dependencyVulnerabilityDataDto", "dastDataDto", "originId", "originType", "originLink", "actionId", "policyName", "assignedUserId", "sources", "productUnits", "remediationSteps"]
|
|
69
70
|
|
|
70
71
|
model_config = ConfigDict(
|
|
71
72
|
populate_by_name=True,
|
|
@@ -229,6 +230,11 @@ class CustomerFacingIssueDto(BaseModel):
|
|
|
229
230
|
if self.product_units is None and "product_units" in self.model_fields_set:
|
|
230
231
|
_dict['productUnits'] = None
|
|
231
232
|
|
|
233
|
+
# set to None if remediation_steps (nullable) is None
|
|
234
|
+
# and model_fields_set contains the field
|
|
235
|
+
if self.remediation_steps is None and "remediation_steps" in self.model_fields_set:
|
|
236
|
+
_dict['remediationSteps'] = None
|
|
237
|
+
|
|
232
238
|
return _dict
|
|
233
239
|
|
|
234
240
|
@classmethod
|
|
@@ -266,7 +272,8 @@ class CustomerFacingIssueDto(BaseModel):
|
|
|
266
272
|
"policyName": obj.get("policyName"),
|
|
267
273
|
"assignedUserId": obj.get("assignedUserId"),
|
|
268
274
|
"sources": [SourceDto.from_dict(_item) for _item in obj["sources"]] if obj.get("sources") is not None else None,
|
|
269
|
-
"productUnits": [ProductUnitIssueDto.from_dict(_item) for _item in obj["productUnits"]] if obj.get("productUnits") is not None else None
|
|
275
|
+
"productUnits": [ProductUnitIssueDto.from_dict(_item) for _item in obj["productUnits"]] if obj.get("productUnits") is not None else None,
|
|
276
|
+
"remediationSteps": obj.get("remediationSteps")
|
|
270
277
|
})
|
|
271
278
|
return _obj
|
|
272
279
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Inventory
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class RepositoryAutomaticBusinessImpactFactor(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
RepositoryAutomaticBusinessImpactFactor
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
UNKNOWN = 'Unknown'
|
|
30
|
+
DEPLOYEDTOCLOUD = 'DeployedToCloud'
|
|
31
|
+
NETWORKFACING = 'NetworkFacing'
|
|
32
|
+
USINGAI = 'UsingAI'
|
|
33
|
+
ISOPENSOURCE = 'IsOpenSource'
|
|
34
|
+
HANDLINGSENSITIVEDATA = 'HandlingSensitiveData'
|
|
35
|
+
REVENUEGENERATING = 'RevenueGenerating'
|
|
36
|
+
EXPOSINGAPI = 'ExposingApi'
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
def from_json(cls, json_str: str) -> Self:
|
|
40
|
+
"""Create an instance of RepositoryAutomaticBusinessImpactFactor from a JSON string"""
|
|
41
|
+
return cls(json.loads(json_str))
|
|
42
|
+
|
|
43
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Inventory
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from legit_api_client.models.repository_automatic_business_impact_factor import RepositoryAutomaticBusinessImpactFactor
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class RepositoryContextFieldDto(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
RepositoryContextFieldDto
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
factor: Optional[RepositoryAutomaticBusinessImpactFactor] = None
|
|
31
|
+
automatic_value: Optional[StrictBool] = Field(default=None, alias="automaticValue")
|
|
32
|
+
manual_value: Optional[StrictBool] = Field(default=None, alias="manualValue")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["factor", "automaticValue", "manualValue"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of RepositoryContextFieldDto from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# set to None if automatic_value (nullable) is None
|
|
75
|
+
# and model_fields_set contains the field
|
|
76
|
+
if self.automatic_value is None and "automatic_value" in self.model_fields_set:
|
|
77
|
+
_dict['automaticValue'] = None
|
|
78
|
+
|
|
79
|
+
# set to None if manual_value (nullable) is None
|
|
80
|
+
# and model_fields_set contains the field
|
|
81
|
+
if self.manual_value is None and "manual_value" in self.model_fields_set:
|
|
82
|
+
_dict['manualValue'] = None
|
|
83
|
+
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of RepositoryContextFieldDto from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({
|
|
96
|
+
"factor": obj.get("factor"),
|
|
97
|
+
"automaticValue": obj.get("automaticValue"),
|
|
98
|
+
"manualValue": obj.get("manualValue")
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|
|
@@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, Stri
|
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
22
|
from legit_api_client.models.collaborator_dto import CollaboratorDto
|
|
23
23
|
from legit_api_client.models.product_unit_name_dto import ProductUnitNameDto
|
|
24
|
+
from legit_api_client.models.repository_context_field_dto import RepositoryContextFieldDto
|
|
24
25
|
from legit_api_client.models.repository_group_dto import RepositoryGroupDto
|
|
25
26
|
from legit_api_client.models.repository_visibility import RepositoryVisibility
|
|
26
27
|
from legit_api_client.models.tag_dto import TagDto
|
|
@@ -40,12 +41,13 @@ class RepositoryDto(BaseModel):
|
|
|
40
41
|
owner: Optional[CollaboratorDto] = None
|
|
41
42
|
tags: Optional[List[TagDto]] = None
|
|
42
43
|
product_units: Optional[List[ProductUnitNameDto]] = Field(default=None, alias="productUnits")
|
|
44
|
+
context_fields: Optional[List[RepositoryContextFieldDto]] = Field(default=None, alias="contextFields")
|
|
43
45
|
issues_count: Optional[StrictInt] = Field(default=None, alias="issuesCount")
|
|
44
46
|
lines_count: Optional[StrictInt] = Field(default=None, alias="linesCount")
|
|
45
47
|
score: Optional[Union[StrictFloat, StrictInt]] = None
|
|
46
48
|
score_out_of100: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="scoreOutOf100")
|
|
47
49
|
group: Optional[RepositoryGroupDto] = None
|
|
48
|
-
__properties: ClassVar[List[str]] = ["id", "name", "url", "visibility", "isActive", "isArchived", "owner", "tags", "productUnits", "issuesCount", "linesCount", "score", "scoreOutOf100", "group"]
|
|
50
|
+
__properties: ClassVar[List[str]] = ["id", "name", "url", "visibility", "isActive", "isArchived", "owner", "tags", "productUnits", "contextFields", "issuesCount", "linesCount", "score", "scoreOutOf100", "group"]
|
|
49
51
|
|
|
50
52
|
model_config = ConfigDict(
|
|
51
53
|
populate_by_name=True,
|
|
@@ -105,6 +107,13 @@ class RepositoryDto(BaseModel):
|
|
|
105
107
|
if _item_product_units:
|
|
106
108
|
_items.append(_item_product_units.to_dict())
|
|
107
109
|
_dict['productUnits'] = _items
|
|
110
|
+
# override the default output from pydantic by calling `to_dict()` of each item in context_fields (list)
|
|
111
|
+
_items = []
|
|
112
|
+
if self.context_fields:
|
|
113
|
+
for _item_context_fields in self.context_fields:
|
|
114
|
+
if _item_context_fields:
|
|
115
|
+
_items.append(_item_context_fields.to_dict())
|
|
116
|
+
_dict['contextFields'] = _items
|
|
108
117
|
# override the default output from pydantic by calling `to_dict()` of group
|
|
109
118
|
if self.group:
|
|
110
119
|
_dict['group'] = self.group.to_dict()
|
|
@@ -148,6 +157,11 @@ class RepositoryDto(BaseModel):
|
|
|
148
157
|
if self.product_units is None and "product_units" in self.model_fields_set:
|
|
149
158
|
_dict['productUnits'] = None
|
|
150
159
|
|
|
160
|
+
# set to None if context_fields (nullable) is None
|
|
161
|
+
# and model_fields_set contains the field
|
|
162
|
+
if self.context_fields is None and "context_fields" in self.model_fields_set:
|
|
163
|
+
_dict['contextFields'] = None
|
|
164
|
+
|
|
151
165
|
# set to None if lines_count (nullable) is None
|
|
152
166
|
# and model_fields_set contains the field
|
|
153
167
|
if self.lines_count is None and "lines_count" in self.model_fields_set:
|
|
@@ -189,6 +203,7 @@ class RepositoryDto(BaseModel):
|
|
|
189
203
|
"owner": CollaboratorDto.from_dict(obj["owner"]) if obj.get("owner") is not None else None,
|
|
190
204
|
"tags": [TagDto.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None,
|
|
191
205
|
"productUnits": [ProductUnitNameDto.from_dict(_item) for _item in obj["productUnits"]] if obj.get("productUnits") is not None else None,
|
|
206
|
+
"contextFields": [RepositoryContextFieldDto.from_dict(_item) for _item in obj["contextFields"]] if obj.get("contextFields") is not None else None,
|
|
192
207
|
"issuesCount": obj.get("issuesCount"),
|
|
193
208
|
"linesCount": obj.get("linesCount"),
|
|
194
209
|
"score": obj.get("score"),
|
|
@@ -33,7 +33,8 @@ class SecretsDataDto(BaseModel):
|
|
|
33
33
|
validity_status: Optional[SecretIssueValidityStatus] = Field(default=None, description="Status of the secret validity", alias="validityStatus")
|
|
34
34
|
validity_check_time: Optional[datetime] = Field(default=None, description="Timestamp when the validity was last checked", alias="validityCheckTime")
|
|
35
35
|
verified_validation_url: Optional[StrictStr] = Field(default=None, description="URL used to verify the validity of the secret", alias="verifiedValidationUrl")
|
|
36
|
-
|
|
36
|
+
commit_author_names: Optional[List[StrictStr]] = Field(default=None, description="Names of commit authors who committed this secret", alias="commitAuthorNames")
|
|
37
|
+
__properties: ClassVar[List[str]] = ["aiValidationResult", "validityStatus", "validityCheckTime", "verifiedValidationUrl", "commitAuthorNames"]
|
|
37
38
|
|
|
38
39
|
model_config = ConfigDict(
|
|
39
40
|
populate_by_name=True,
|
|
@@ -89,6 +90,11 @@ class SecretsDataDto(BaseModel):
|
|
|
89
90
|
if self.verified_validation_url is None and "verified_validation_url" in self.model_fields_set:
|
|
90
91
|
_dict['verifiedValidationUrl'] = None
|
|
91
92
|
|
|
93
|
+
# set to None if commit_author_names (nullable) is None
|
|
94
|
+
# and model_fields_set contains the field
|
|
95
|
+
if self.commit_author_names is None and "commit_author_names" in self.model_fields_set:
|
|
96
|
+
_dict['commitAuthorNames'] = None
|
|
97
|
+
|
|
92
98
|
return _dict
|
|
93
99
|
|
|
94
100
|
@classmethod
|
|
@@ -104,7 +110,8 @@ class SecretsDataDto(BaseModel):
|
|
|
104
110
|
"aiValidationResult": obj.get("aiValidationResult"),
|
|
105
111
|
"validityStatus": obj.get("validityStatus"),
|
|
106
112
|
"validityCheckTime": obj.get("validityCheckTime"),
|
|
107
|
-
"verifiedValidationUrl": obj.get("verifiedValidationUrl")
|
|
113
|
+
"verifiedValidationUrl": obj.get("verifiedValidationUrl"),
|
|
114
|
+
"commitAuthorNames": obj.get("commitAuthorNames")
|
|
108
115
|
})
|
|
109
116
|
return _obj
|
|
110
117
|
|
legit_api_client/rest.py
CHANGED
|
@@ -48,12 +48,17 @@ class RESTResponse(io.IOBase):
|
|
|
48
48
|
self.data = self.response.data
|
|
49
49
|
return self.data
|
|
50
50
|
|
|
51
|
+
@property
|
|
52
|
+
def headers(self):
|
|
53
|
+
"""Returns a dictionary of response headers."""
|
|
54
|
+
return self.response.headers
|
|
55
|
+
|
|
51
56
|
def getheaders(self):
|
|
52
|
-
"""Returns a dictionary of the response headers."""
|
|
57
|
+
"""Returns a dictionary of the response headers; use ``headers`` instead."""
|
|
53
58
|
return self.response.headers
|
|
54
59
|
|
|
55
60
|
def getheader(self, name, default=None):
|
|
56
|
-
"""Returns a given response header."""
|
|
61
|
+
"""Returns a given response header; use ``headers.get()`` instead."""
|
|
57
62
|
return self.response.headers.get(name, default)
|
|
58
63
|
|
|
59
64
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: legit_api_client
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.4568
|
|
4
4
|
Summary: Inventory
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: OpenAPI Generator community
|
|
@@ -22,8 +22,8 @@ No description provided (generated by Openapi Generator https://github.com/opena
|
|
|
22
22
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
23
23
|
|
|
24
24
|
- API version: 1.0
|
|
25
|
-
- Package version: 1.1.
|
|
26
|
-
- Generator version: 7.
|
|
25
|
+
- Package version: 1.1.4568
|
|
26
|
+
- Generator version: 7.18.0
|
|
27
27
|
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
28
28
|
|
|
29
29
|
## Requirements.
|
|
@@ -366,6 +366,8 @@ Class | Method | HTTP request | Description
|
|
|
366
366
|
- [ProductUnitType](docs/ProductUnitType.md)
|
|
367
367
|
- [ProgrammingLanguage](docs/ProgrammingLanguage.md)
|
|
368
368
|
- [RepositoriesToContainersOperationDto](docs/RepositoriesToContainersOperationDto.md)
|
|
369
|
+
- [RepositoryAutomaticBusinessImpactFactor](docs/RepositoryAutomaticBusinessImpactFactor.md)
|
|
370
|
+
- [RepositoryContextFieldDto](docs/RepositoryContextFieldDto.md)
|
|
369
371
|
- [RepositoryControlDto](docs/RepositoryControlDto.md)
|
|
370
372
|
- [RepositoryDirectory](docs/RepositoryDirectory.md)
|
|
371
373
|
- [RepositoryDto](docs/RepositoryDto.md)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
legit_api_client/__init__.py,sha256=
|
|
2
|
-
legit_api_client/api_client.py,sha256=
|
|
1
|
+
legit_api_client/__init__.py,sha256=dOIhB5c3zfd1tRPEagFRX8nAd2n4B6lMJXgJF1KevUQ,29081
|
|
2
|
+
legit_api_client/api_client.py,sha256=8hYKF4C4uZtCWkR4reLhCggK7E5Mo4_2WklnnU7Z-4I,27804
|
|
3
3
|
legit_api_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
-
legit_api_client/configuration.py,sha256=
|
|
5
|
-
legit_api_client/exceptions.py,sha256=
|
|
4
|
+
legit_api_client/configuration.py,sha256=OvyPewKxLSvBB3LV4HM3xLyW7Tf--0oeg2RHM1ayHYc,18537
|
|
5
|
+
legit_api_client/exceptions.py,sha256=FQhdQym8Gv0T7Q5dppOeb-yBbB_jgov4wNAmRaz1EM0,6538
|
|
6
6
|
legit_api_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
legit_api_client/rest.py,sha256=
|
|
7
|
+
legit_api_client/rest.py,sha256=4g4Zi4xX1187Af75nEgTesIYeIJmdpV0pWws4VM2iD0,9657
|
|
8
8
|
legit_api_client/api/__init__.py,sha256=qujrNT-z3igma0Ie6S699yl61_QMenwg3BEMOOHchVM,1387
|
|
9
9
|
legit_api_client/api/amazon_ecr_key_integration_api.py,sha256=MiQ4bzBxPHeaHv-YWHFXNemQK5Q19NBPR_YrhST8bqU,10476
|
|
10
10
|
legit_api_client/api/amazon_ecr_role_integration_api.py,sha256=M4I_SpnGVUHXu-6i47mxbR0Dye62uM7nVOXnpc0opxk,10488
|
|
@@ -26,7 +26,7 @@ legit_api_client/api/saved_queries_api.py,sha256=fSrPQjxbno6q8nDInlugohVoBE9BedR
|
|
|
26
26
|
legit_api_client/api/sdlc_assets_api.py,sha256=AkWc7Vr3HhLiEw21SYnIEoBWpUiBaQYM6snqshNoUhE,39773
|
|
27
27
|
legit_api_client/api/tags_api.py,sha256=Rs5-RyIDxQKrDgAFl-RazKhbgbv_q0Q-3wBYeXhSUjE,32570
|
|
28
28
|
legit_api_client/api/workspaces_api.py,sha256=Eb_BTJkE-zt5fnGEY6wnHH6OHp_nboh9TEsOGyxI-eg,85370
|
|
29
|
-
legit_api_client/models/__init__.py,sha256=
|
|
29
|
+
legit_api_client/models/__init__.py,sha256=tr3_hQNwnunWahV0chP3mcKNw681iCi_qM1mMbJcGpo,15808
|
|
30
30
|
legit_api_client/models/add_issue_comment_dto.py,sha256=yXcBOfZzi0UcojpCcFqpO_umOpZZp53qCX3GY4x2DaQ,2575
|
|
31
31
|
legit_api_client/models/ai_secret_validation_result.py,sha256=Qniyaz_12c-6iexAtQFVaHfJ_MFCImjckv4e_xxFToc,877
|
|
32
32
|
legit_api_client/models/amazon_ecr_key_integration_create_dto.py,sha256=Inj8_WcHKM26G26o730PYiuPsD2wMP0RLOnjnf-Pw2E,4616
|
|
@@ -64,8 +64,8 @@ legit_api_client/models/container_image_dto.py,sha256=lAZ9QUozOd7Up-5Fz55spEbJNq
|
|
|
64
64
|
legit_api_client/models/container_image_version_dto.py,sha256=iBQRJ44IQFJiuxWkF5yQDeMcBBZTmz-61LQE6itGREo,3719
|
|
65
65
|
legit_api_client/models/container_to_cloud_resource_operation_dto.py,sha256=SUcFWAEIpXh-mtJ42poGk8x_8cmwEeomWFVE68U-Lnc,3336
|
|
66
66
|
legit_api_client/models/container_to_repository_operation_dto.py,sha256=Tb1WkEeuMlGIIKnye1HjjJ2hGyxtkvFBfP-FQb7rv54,3293
|
|
67
|
-
legit_api_client/models/control_classification.py,sha256=
|
|
68
|
-
legit_api_client/models/control_source_type.py,sha256=
|
|
67
|
+
legit_api_client/models/control_classification.py,sha256=Q0lPBdqlLyiA_zUkB9gS-axViXk8h4mpiye_qUql_rk,3698
|
|
68
|
+
legit_api_client/models/control_source_type.py,sha256=9s7g4yfzqTRNXK1iyvk7uLQIFez7OCNzXDNWl6U7Uww,2704
|
|
69
69
|
legit_api_client/models/control_type.py,sha256=RaLY3-aMAnyQ6vboN3dsxLmsPvDc05re45BwVwSb7ew,1132
|
|
70
70
|
legit_api_client/models/correlated_cloud_instance.py,sha256=oNI24xF5yU0B6IuN8_DspjUoD60sDzrZ1ZedxYMEo6s,2999
|
|
71
71
|
legit_api_client/models/correlated_repository_dto.py,sha256=bA6j87oQvIEP0uxq3jWKAxMOkK399IOQJ8XdrGIsVvc,2999
|
|
@@ -90,7 +90,7 @@ legit_api_client/models/customer_facing_dependency_dto.py,sha256=01o67I5vIc3NysT
|
|
|
90
90
|
legit_api_client/models/customer_facing_dependency_dto_customer_facing_cursor_paged_dto.py,sha256=QpQdpwYbyecJ6Asm1ucgXkZ1D73KpsmUuE4lBZeW7RU,3931
|
|
91
91
|
legit_api_client/models/customer_facing_dependency_license.py,sha256=YSCTQja0U4xcEFUzSMgyftyjN8ptUmyqXdYxVVHaY18,2925
|
|
92
92
|
legit_api_client/models/customer_facing_issue_action_dto.py,sha256=OOxwHnVPcNVts8PN09__rvGOBAg4PrTJsr0Iv88iQ9o,3528
|
|
93
|
-
legit_api_client/models/customer_facing_issue_dto.py,sha256=
|
|
93
|
+
legit_api_client/models/customer_facing_issue_dto.py,sha256=W90B-TaPnTTLTxJtk5rkhq46UOoKNq_1_Cu1vlbYLhs,15753
|
|
94
94
|
legit_api_client/models/customer_facing_issue_to_action_history_dto.py,sha256=D2iXGCUNSIix_Xgd_Ij7D7d9K_1cwyVYMMtP22cYqQ0,3888
|
|
95
95
|
legit_api_client/models/customer_facing_issue_to_additional_data_dto.py,sha256=KkVdverEeT1mY6Heb3tqSAJq8bI0bXCUVtaRd34Bw-8,3517
|
|
96
96
|
legit_api_client/models/customer_facing_issue_to_comments_dto.py,sha256=DzB6uoOz-UJtGW6s2Wv-daSxw0i0xTo-oZ38zbkMaE4,3790
|
|
@@ -176,12 +176,14 @@ legit_api_client/models/product_unit_name_dto.py,sha256=VjVxN-BlyG_ki-PB05sz7q9M
|
|
|
176
176
|
legit_api_client/models/product_unit_type.py,sha256=pypSeYTKM9TkuFmkLm-aHCaKTDWH5WZ26JnKdSVvKQk,914
|
|
177
177
|
legit_api_client/models/programming_language.py,sha256=DM_lfSwVgsCEOly6yn3wcE7ETPJ4h-JZkBQQS32Tch0,1350
|
|
178
178
|
legit_api_client/models/repositories_to_containers_operation_dto.py,sha256=PzNKcI9EfIzEjJWxe5FkWeE6Pf3iHnTB5r0gH8txtyw,3734
|
|
179
|
+
legit_api_client/models/repository_automatic_business_impact_factor.py,sha256=rePWxXvt9XHHh_fdBW0mYGaYx7grjz_0P-_t40ZkIto,1072
|
|
180
|
+
legit_api_client/models/repository_context_field_dto.py,sha256=SHWt5dVYU0KfMwRNJzrwYLnQpIUtgVhYS1QYfOy0zYo,3492
|
|
179
181
|
legit_api_client/models/repository_control_dto.py,sha256=gZI8FoMGjUW7y1_KFpqFfRE2IJDkwFrbP1L51eE_0vE,4280
|
|
180
182
|
legit_api_client/models/repository_directory.py,sha256=NF2zHDfvf8MeH0PCjMsLMiUm3GpsKJJGS3BKrJ70uKw,3151
|
|
181
|
-
legit_api_client/models/repository_dto.py,sha256=
|
|
183
|
+
legit_api_client/models/repository_dto.py,sha256=a_v_g2JsxLQ3OQ1kfWqzAfEx9JZrEWuzwuITJ-9E5H0,9356
|
|
182
184
|
legit_api_client/models/repository_group_dto.py,sha256=XIe4BIAYHWyrKyM1bJ7ghQHkAHSLthc1YYydchfRKl8,3381
|
|
183
185
|
legit_api_client/models/repository_visibility.py,sha256=2xUvIxsmwWKee8OINo5PNYAZif_i43Yu3SWBXdCq2qg,801
|
|
184
|
-
legit_api_client/models/scm_type.py,sha256
|
|
186
|
+
legit_api_client/models/scm_type.py,sha256=-X_GfBARFIzkhh5TPciM_yM6cuLY67cwbmajqqs46Zo,4240
|
|
185
187
|
legit_api_client/models/sdlc_asset_dto.py,sha256=uNbgb783VmQrMkotIYI8JtUKMeoZtyfyDsrqk0KinIU,5377
|
|
186
188
|
legit_api_client/models/sdlc_asset_graph_asset_dto.py,sha256=ufGlqWG69_QGicpWGIeVIWDyWm7JPBJOvp-QhrTQs58,4221
|
|
187
189
|
legit_api_client/models/sdlc_asset_graph_dto.py,sha256=eURM_sRA3TDZjVd6Vp_UjHumtgwVAOQ4kxkMfVAG4KI,4034
|
|
@@ -189,9 +191,9 @@ legit_api_client/models/sdlc_asset_graph_evidence_dto.py,sha256=1Hr4eW-Ho3oFQnlO
|
|
|
189
191
|
legit_api_client/models/sdlc_asset_graph_link_dto.py,sha256=rmFoLCNsfhPF2JDhVRrogBGHA_wpuDzDhYcNDGf226E,4229
|
|
190
192
|
legit_api_client/models/sdlc_asset_graph_link_dto_evidences.py,sha256=v9VbaZaqCC4ybrVrU96uR7DKvby2k65blR8EeboWwoM,4292
|
|
191
193
|
legit_api_client/models/sdlc_asset_meta_type.py,sha256=bpFEpe-3XJD_l0Q-QDbzRpP35uW1qshycaywMbrPCqw,1200
|
|
192
|
-
legit_api_client/models/sdlc_asset_type.py,sha256=
|
|
194
|
+
legit_api_client/models/sdlc_asset_type.py,sha256=GU2xw3YVTRgCZNCxvtipNO_EK76ZcRBHybN0HfM9jOo,4652
|
|
193
195
|
legit_api_client/models/secret_issue_validity_status.py,sha256=bQep4aVRfc-nqrYunzUkCSTFnL_vjojvt8dKV7tQYmo,1008
|
|
194
|
-
legit_api_client/models/secrets_data_dto.py,sha256=
|
|
196
|
+
legit_api_client/models/secrets_data_dto.py,sha256=m3kjVVD4YKhdrCVwRvJuVbrs-FEdzyQbUz8Q4c0z-HI,4899
|
|
195
197
|
legit_api_client/models/severity.py,sha256=9EWzcMpoR05-DNp19iEfCxFxHJJqlYjRksVzzzoq47g,775
|
|
196
198
|
legit_api_client/models/snoozed_type.py,sha256=CkGMSlP_bGbMiqhO9ir5mqwBr1ziZVVOknr8NCkwKCc,778
|
|
197
199
|
legit_api_client/models/source_dto.py,sha256=l3Hb17WQlEbD2kP--Oj9Q8I71d39Qni3Yx0G1iFsRns,3318
|
|
@@ -209,7 +211,7 @@ legit_api_client/models/workspace_group_tree_node_dto.py,sha256=zV5vmSc0bjqkH7hS
|
|
|
209
211
|
legit_api_client/models/workspace_hierarchy_dto.py,sha256=qU9eTOHNh3d-XeOM6CbrkTLEwSX0cdjJkbVb03GHS_Y,4522
|
|
210
212
|
legit_api_client/models/workspace_tree_node_dto.py,sha256=TlM1PPVbuGDQKlgl3Ht_EEj8lJLMqTdVE3_k8QFJldE,3527
|
|
211
213
|
legit_api_client/models/workspace_type.py,sha256=d-Dy1JkWLAZgZgTHMTaF01QT2Cv1Eexg6HqcKqPEOjs,756
|
|
212
|
-
legit_api_client-1.1.
|
|
213
|
-
legit_api_client-1.1.
|
|
214
|
-
legit_api_client-1.1.
|
|
215
|
-
legit_api_client-1.1.
|
|
214
|
+
legit_api_client-1.1.4568.dist-info/METADATA,sha256=pzLr3TnN-jijEgQRi6J0CTFjsqiqKIVyD73Nn2QxH-4,32968
|
|
215
|
+
legit_api_client-1.1.4568.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
216
|
+
legit_api_client-1.1.4568.dist-info/top_level.txt,sha256=3k94tIhdKXTBXkGPCBDQSOnARVo5IwVYlyIfQ18xaDM,17
|
|
217
|
+
legit_api_client-1.1.4568.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|