Skip to content

Commit 2fbece2

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Make modified by field nullable for get all API keys (#2053)
* Regenerate client from commit a3f2b7d2 of spec repo * pre-commit fixes --------- Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 0034201 commit 2fbece2

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-07-19 18:52:07.831612",
8-
"spec_repo_commit": "be099b30"
7+
"regenerated": "2024-07-19 19:37:56.446276",
8+
"spec_repo_commit": "a3f2b7d2"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-19 18:52:07.850438",
13-
"spec_repo_commit": "be099b30"
12+
"regenerated": "2024-07-19 19:37:56.463967",
13+
"spec_repo_commit": "a3f2b7d2"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ components:
684684
created_by:
685685
$ref: '#/components/schemas/RelationshipToUser'
686686
modified_by:
687-
$ref: '#/components/schemas/RelationshipToUser'
687+
$ref: '#/components/schemas/NullableRelationshipToUser'
688688
type: object
689689
APIKeyResponse:
690690
description: Response for retrieving an API key.

src/datadog_api_client/v2/model/api_key_relationships.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,26 @@
88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11+
none_type,
1112
unset,
1213
UnsetType,
1314
)
1415

1516

1617
if TYPE_CHECKING:
1718
from datadog_api_client.v2.model.relationship_to_user import RelationshipToUser
19+
from datadog_api_client.v2.model.nullable_relationship_to_user import NullableRelationshipToUser
1820

1921

2022
class APIKeyRelationships(ModelNormal):
2123
@cached_property
2224
def openapi_types(_):
2325
from datadog_api_client.v2.model.relationship_to_user import RelationshipToUser
26+
from datadog_api_client.v2.model.nullable_relationship_to_user import NullableRelationshipToUser
2427

2528
return {
2629
"created_by": (RelationshipToUser,),
27-
"modified_by": (RelationshipToUser,),
30+
"modified_by": (NullableRelationshipToUser,),
2831
}
2932

3033
attribute_map = {
@@ -35,7 +38,7 @@ def openapi_types(_):
3538
def __init__(
3639
self_,
3740
created_by: Union[RelationshipToUser, UnsetType] = unset,
38-
modified_by: Union[RelationshipToUser, UnsetType] = unset,
41+
modified_by: Union[NullableRelationshipToUser, none_type, UnsetType] = unset,
3942
**kwargs,
4043
):
4144
"""
@@ -45,7 +48,7 @@ def __init__(
4548
:type created_by: RelationshipToUser, optional
4649
4750
:param modified_by: Relationship to user.
48-
:type modified_by: RelationshipToUser, optional
51+
:type modified_by: NullableRelationshipToUser, none_type, optional
4952
"""
5053
if created_by is not unset:
5154
kwargs["created_by"] = created_by

0 commit comments

Comments
 (0)