Skip to content

Commit 6440f9d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Enable route for auto merging (#2082)
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 38d3ad9 commit 6440f9d

File tree

7 files changed

+37
-29
lines changed

7 files changed

+37
-29
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-08-01 21:20:11.603374",
8-
"spec_repo_commit": "55d5616e"
7+
"regenerated": "2024-08-02 13:54:00.520765",
8+
"spec_repo_commit": "74b2ffcb"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-08-01 21:20:11.620598",
13-
"spec_repo_commit": "55d5616e"
12+
"regenerated": "2024-08-02 13:54:00.538746",
13+
"spec_repo_commit": "74b2ffcb"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17235,8 +17235,6 @@ components:
1723517235
properties:
1723617236
permissions:
1723717237
$ref: '#/components/schemas/RelationshipToPermissions'
17238-
users:
17239-
$ref: '#/components/schemas/RelationshipToUsers'
1724017238
type: object
1724117239
RoleResponse:
1724217240
description: Response containing information about a single role.
@@ -17266,6 +17264,11 @@ components:
1726617264
name:
1726717265
description: Name of the role.
1726817266
type: string
17267+
user_count:
17268+
description: The user count.
17269+
format: int32
17270+
maximum: 2147483647
17271+
type: integer
1726917272
type: object
1727017273
RoleUpdateData:
1727117274
description: Data related to the update of a role.
@@ -24040,6 +24043,10 @@ components:
2404024043
have permission to edit those SLOs.
2404124044
slos_read: View SLOs and status corrections.
2404224045
slos_write: Create, edit, and delete SLOs.
24046+
synthetics_default_settings_read: View the default settings for Synthetic
24047+
Monitoring.
24048+
synthetics_default_settings_write: Edit the default settings for Synthetic
24049+
Monitoring.
2404324050
synthetics_global_variable_read: View, search, and use Synthetics global
2404424051
variables.
2404524052
synthetics_global_variable_write: Create, edit, and delete global variables
@@ -38068,6 +38075,11 @@ paths:
3806838075
$ref: '#/components/responses/ForbiddenResponse'
3806938076
'429':
3807038077
$ref: '#/components/responses/TooManyRequestsResponse'
38078+
security:
38079+
- apiKeyAuth: []
38080+
appKeyAuth: []
38081+
- AuthZ:
38082+
- workflows_read
3807138083
summary: List workflow instances
3807238084
tags:
3807338085
- Workflow Automation

examples/v2/roles/CreateRole.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from datadog_api_client.v2.model.permissions_type import PermissionsType
88
from datadog_api_client.v2.model.relationship_to_permission_data import RelationshipToPermissionData
99
from datadog_api_client.v2.model.relationship_to_permissions import RelationshipToPermissions
10-
from datadog_api_client.v2.model.relationship_to_users import RelationshipToUsers
1110
from datadog_api_client.v2.model.role_create_attributes import RoleCreateAttributes
1211
from datadog_api_client.v2.model.role_create_data import RoleCreateData
1312
from datadog_api_client.v2.model.role_create_request import RoleCreateRequest
@@ -27,9 +26,6 @@
2726
),
2827
],
2928
),
30-
users=RelationshipToUsers(
31-
data=[],
32-
),
3329
),
3430
type=RolesType.ROLES,
3531
),

src/datadog_api_client/v2/api/workflow_automation_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def __init__(self, api_client=None):
115115
self._list_workflow_instances_endpoint = _Endpoint(
116116
settings={
117117
"response_type": (WorkflowListInstancesResponse,),
118-
"auth": ["apiKeyAuth", "appKeyAuth"],
118+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
119119
"endpoint_path": "/api/v2/workflows/{workflow_id}/instances",
120120
"operation_id": "list_workflow_instances",
121121
"http_method": "GET",

src/datadog_api_client/v2/model/role_relationships.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,42 +15,28 @@
1515

1616
if TYPE_CHECKING:
1717
from datadog_api_client.v2.model.relationship_to_permissions import RelationshipToPermissions
18-
from datadog_api_client.v2.model.relationship_to_users import RelationshipToUsers
1918

2019

2120
class RoleRelationships(ModelNormal):
2221
@cached_property
2322
def openapi_types(_):
2423
from datadog_api_client.v2.model.relationship_to_permissions import RelationshipToPermissions
25-
from datadog_api_client.v2.model.relationship_to_users import RelationshipToUsers
2624

2725
return {
2826
"permissions": (RelationshipToPermissions,),
29-
"users": (RelationshipToUsers,),
3027
}
3128

3229
attribute_map = {
3330
"permissions": "permissions",
34-
"users": "users",
3531
}
3632

37-
def __init__(
38-
self_,
39-
permissions: Union[RelationshipToPermissions, UnsetType] = unset,
40-
users: Union[RelationshipToUsers, UnsetType] = unset,
41-
**kwargs,
42-
):
33+
def __init__(self_, permissions: Union[RelationshipToPermissions, UnsetType] = unset, **kwargs):
4334
"""
4435
Relationships of the role object.
4536
4637
:param permissions: Relationship to multiple permissions objects.
4738
:type permissions: RelationshipToPermissions, optional
48-
49-
:param users: Relationship to users.
50-
:type users: RelationshipToUsers, optional
5139
"""
5240
if permissions is not unset:
5341
kwargs["permissions"] = permissions
54-
if users is not unset:
55-
kwargs["users"] = users
5642
super().__init__(kwargs)

src/datadog_api_client/v2/model/role_update_attributes.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,26 @@
1515

1616

1717
class RoleUpdateAttributes(ModelNormal):
18+
validations = {
19+
"user_count": {
20+
"inclusive_maximum": 2147483647,
21+
},
22+
}
23+
1824
@cached_property
1925
def openapi_types(_):
2026
return {
2127
"created_at": (datetime,),
2228
"modified_at": (datetime,),
2329
"name": (str,),
30+
"user_count": (int,),
2431
}
2532

2633
attribute_map = {
2734
"created_at": "created_at",
2835
"modified_at": "modified_at",
2936
"name": "name",
37+
"user_count": "user_count",
3038
}
3139
read_only_vars = {
3240
"created_at",
@@ -38,6 +46,7 @@ def __init__(
3846
created_at: Union[datetime, UnsetType] = unset,
3947
modified_at: Union[datetime, UnsetType] = unset,
4048
name: Union[str, UnsetType] = unset,
49+
user_count: Union[int, UnsetType] = unset,
4150
**kwargs,
4251
):
4352
"""
@@ -51,11 +60,16 @@ def __init__(
5160
5261
:param name: Name of the role.
5362
:type name: str, optional
63+
64+
:param user_count: The user count.
65+
:type user_count: int, optional
5466
"""
5567
if created_at is not unset:
5668
kwargs["created_at"] = created_at
5769
if modified_at is not unset:
5870
kwargs["modified_at"] = modified_at
5971
if name is not unset:
6072
kwargs["name"] = name
73+
if user_count is not unset:
74+
kwargs["user_count"] = user_count
6175
super().__init__(kwargs)

tests/v2/features/roles.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ Feature: Roles
8181
@generated @skip @team:DataDog/aaa-core-access
8282
Scenario: Create role returns "Bad Request" response
8383
Given new "CreateRole" request
84-
And body with value {"data": {"attributes": {"name": "developers"}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}, "users": {"data": []}}, "type": "roles"}}
84+
And body with value {"data": {"attributes": {"name": "developers"}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}}
8585
When the request is sent
8686
Then the response status is 400 Bad Request
8787

8888
@generated @skip @team:DataDog/aaa-core-access
8989
Scenario: Create role returns "OK" response
9090
Given new "CreateRole" request
91-
And body with value {"data": {"attributes": {"name": "developers"}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}, "users": {"data": []}}, "type": "roles"}}
91+
And body with value {"data": {"attributes": {"name": "developers"}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}}
9292
When the request is sent
9393
Then the response status is 200 OK
9494

@@ -329,6 +329,6 @@ Feature: Roles
329329
Scenario: Update a role returns "Unprocessable Entity" response
330330
Given new "UpdateRole" request
331331
And request contains "role_id" parameter from "REPLACE.ME"
332-
And body with value {"data": {"attributes": {}, "id": "00000000-0000-1111-0000-000000000000", "relationships": {"permissions": {"data": [{"type": "permissions"}]}, "users": {"data": []}}, "type": "roles"}}
332+
And body with value {"data": {"attributes": {}, "id": "00000000-0000-1111-0000-000000000000", "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}}
333333
When the request is sent
334334
Then the response status is 422 Unprocessable Entity

0 commit comments

Comments
 (0)