Skip to content

Commit 3a126bc

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Fix Org Groups pagination response shape (DataDog#3279)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent db6ab71 commit 3a126bc

9 files changed

Lines changed: 412 additions & 66 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 120 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52255,6 +52255,8 @@ components:
5225552255
items:
5225652256
$ref: "#/components/schemas/OrgGroupMembershipData"
5225752257
type: array
52258+
links:
52259+
$ref: "#/components/schemas/OrgGroupPaginationLinks"
5225852260
meta:
5225952261
$ref: "#/components/schemas/OrgGroupPaginationMeta"
5226052262
required:
@@ -52372,6 +52374,8 @@ components:
5237252374
items:
5237352375
$ref: "#/components/schemas/OrgGroupMembershipData"
5237452376
type: array
52377+
links:
52378+
$ref: "#/components/schemas/OrgGroupPaginationLinks"
5237552379
meta:
5237652380
$ref: "#/components/schemas/OrgGroupPaginationMeta"
5237752381
required:
@@ -52472,24 +52476,71 @@ components:
5247252476
required:
5247352477
- data
5247452478
type: object
52479+
OrgGroupPaginationLinks:
52480+
description: Pagination links for navigating between pages of an org group list response.
52481+
properties:
52482+
first:
52483+
description: Link to the first page.
52484+
type: string
52485+
last:
52486+
description: Link to the last page.
52487+
type: string
52488+
next:
52489+
description: Link to the next page.
52490+
nullable: true
52491+
type: string
52492+
prev:
52493+
description: Link to the previous page.
52494+
nullable: true
52495+
type: string
52496+
self:
52497+
description: Link to the current page.
52498+
type: string
52499+
type: object
5247552500
OrgGroupPaginationMeta:
52476-
description: Pagination metadata.
52501+
description: Pagination metadata for org group list responses.
5247752502
properties:
5247852503
page:
5247952504
$ref: "#/components/schemas/OrgGroupPaginationMetaPage"
52480-
required:
52481-
- page
5248252505
type: object
5248352506
OrgGroupPaginationMetaPage:
52484-
description: Page-based pagination details.
52507+
description: Page-based pagination details for org group list responses.
5248552508
properties:
52486-
total_count:
52487-
description: The total number of items.
52488-
example: 42
52509+
first_number:
52510+
description: First page number.
5248952511
format: int64
5249052512
type: integer
52491-
required:
52492-
- total_count
52513+
last_number:
52514+
description: Last page number.
52515+
format: int64
52516+
nullable: true
52517+
type: integer
52518+
next_number:
52519+
description: Next page number.
52520+
format: int64
52521+
nullable: true
52522+
type: integer
52523+
number:
52524+
description: Page number.
52525+
format: int64
52526+
type: integer
52527+
prev_number:
52528+
description: Previous page number.
52529+
format: int64
52530+
nullable: true
52531+
type: integer
52532+
size:
52533+
description: Page size.
52534+
format: int64
52535+
type: integer
52536+
total:
52537+
description: Total number of results.
52538+
format: int64
52539+
type: integer
52540+
type:
52541+
description: Pagination type.
52542+
example: "number_size"
52543+
type: string
5249352544
type: object
5249452545
OrgGroupPolicyAttributes:
5249552546
description: Attributes of an org group policy.
@@ -52679,6 +52730,8 @@ components:
5267952730
items:
5268052731
$ref: "#/components/schemas/OrgGroupPolicyData"
5268152732
type: array
52733+
links:
52734+
$ref: "#/components/schemas/OrgGroupPaginationLinks"
5268252735
meta:
5268352736
$ref: "#/components/schemas/OrgGroupPaginationMeta"
5268452737
required:
@@ -52792,6 +52845,8 @@ components:
5279252845
items:
5279352846
$ref: "#/components/schemas/OrgGroupPolicyOverrideData"
5279452847
type: array
52848+
links:
52849+
$ref: "#/components/schemas/OrgGroupPaginationLinks"
5279552850
meta:
5279652851
$ref: "#/components/schemas/OrgGroupPaginationMeta"
5279752852
required:
@@ -111991,9 +112046,22 @@ paths:
111991112046
id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
111992112047
type: org_groups
111993112048
type: org_group_memberships
112049+
links:
112050+
first: "https://api.datadoghq.com/api/v2/org_group_memberships?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
112051+
last: "https://api.datadoghq.com/api/v2/org_group_memberships?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
112052+
next:
112053+
prev:
112054+
self: "https://api.datadoghq.com/api/v2/org_group_memberships?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
111994112055
meta:
111995112056
page:
111996-
total_count: 1
112057+
first_number: 0
112058+
last_number: 0
112059+
next_number:
112060+
number: 0
112061+
prev_number:
112062+
size: 50
112063+
total: 1
112064+
type: number_size
111997112065
schema:
111998112066
$ref: "#/components/schemas/OrgGroupMembershipListResponse"
111999112067
description: OK
@@ -112292,9 +112360,22 @@ paths:
112292112360
id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
112293112361
type: org_groups
112294112362
type: org_group_policies
112363+
links:
112364+
first: "https://api.datadoghq.com/api/v2/org_group_policies?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
112365+
last: "https://api.datadoghq.com/api/v2/org_group_policies?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
112366+
next:
112367+
prev:
112368+
self: "https://api.datadoghq.com/api/v2/org_group_policies?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
112295112369
meta:
112296112370
page:
112297-
total_count: 1
112371+
first_number: 0
112372+
last_number: 0
112373+
next_number:
112374+
number: 0
112375+
prev_number:
112376+
size: 50
112377+
total: 1
112378+
type: number_size
112298112379
schema:
112299112380
$ref: "#/components/schemas/OrgGroupPolicyListResponse"
112300112381
description: OK
@@ -112683,9 +112764,22 @@ paths:
112683112764
id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789"
112684112765
type: org_group_policies
112685112766
type: org_group_policy_overrides
112767+
links:
112768+
first: "https://api.datadoghq.com/api/v2/org_group_policy_overrides?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
112769+
last: "https://api.datadoghq.com/api/v2/org_group_policy_overrides?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
112770+
next:
112771+
prev:
112772+
self: "https://api.datadoghq.com/api/v2/org_group_policy_overrides?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
112686112773
meta:
112687112774
page:
112688-
total_count: 1
112775+
first_number: 0
112776+
last_number: 0
112777+
next_number:
112778+
number: 0
112779+
prev_number:
112780+
size: 50
112781+
total: 1
112782+
type: number_size
112689112783
schema:
112690112784
$ref: "#/components/schemas/OrgGroupPolicyOverrideListResponse"
112691112785
description: OK
@@ -113024,9 +113118,22 @@ paths:
113024113118
owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890"
113025113119
id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
113026113120
type: org_groups
113121+
links:
113122+
first: "https://api.datadoghq.com/api/v2/org_groups?page%5Bnumber%5D=0&page%5Bsize%5D=50"
113123+
last: "https://api.datadoghq.com/api/v2/org_groups?page%5Bnumber%5D=0&page%5Bsize%5D=50"
113124+
next:
113125+
prev:
113126+
self: "https://api.datadoghq.com/api/v2/org_groups?page%5Bnumber%5D=0&page%5Bsize%5D=50"
113027113127
meta:
113028113128
page:
113029-
total_count: 1
113129+
first_number: 0
113130+
last_number: 0
113131+
next_number:
113132+
number: 0
113133+
prev_number:
113134+
size: 50
113135+
total: 1
113136+
type: number_size
113030113137
schema:
113031113138
$ref: "#/components/schemas/OrgGroupListResponse"
113032113139
description: OK

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4368,6 +4368,7 @@ def overrides
43684368
"v2.org_group_membership_update_data" => "OrgGroupMembershipUpdateData",
43694369
"v2.org_group_membership_update_relationships" => "OrgGroupMembershipUpdateRelationships",
43704370
"v2.org_group_membership_update_request" => "OrgGroupMembershipUpdateRequest",
4371+
"v2.org_group_pagination_links" => "OrgGroupPaginationLinks",
43714372
"v2.org_group_pagination_meta" => "OrgGroupPaginationMeta",
43724373
"v2.org_group_pagination_meta_page" => "OrgGroupPaginationMetaPage",
43734374
"v2.org_group_policy_attributes" => "OrgGroupPolicyAttributes",

lib/datadog_api_client/v2/models/org_group_list_response.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ class OrgGroupListResponse
2727
# Related resources included in the response when requested with the `include` parameter.
2828
attr_accessor :included
2929

30-
# Pagination metadata.
30+
# Pagination links for navigating between pages of an org group list response.
31+
attr_accessor :links
32+
33+
# Pagination metadata for org group list responses.
3134
attr_accessor :meta
3235

3336
attr_accessor :additional_properties
@@ -38,6 +41,7 @@ def self.attribute_map
3841
{
3942
:'data' => :'data',
4043
:'included' => :'included',
44+
:'links' => :'links',
4145
:'meta' => :'meta'
4246
}
4347
end
@@ -48,6 +52,7 @@ def self.openapi_types
4852
{
4953
:'data' => :'Array<OrgGroupData>',
5054
:'included' => :'Array<OrgGroupMembershipData>',
55+
:'links' => :'OrgGroupPaginationLinks',
5156
:'meta' => :'OrgGroupPaginationMeta'
5257
}
5358
end
@@ -82,6 +87,10 @@ def initialize(attributes = {})
8287
end
8388
end
8489

90+
if attributes.key?(:'links')
91+
self.links = attributes[:'links']
92+
end
93+
8594
if attributes.key?(:'meta')
8695
self.meta = attributes[:'meta']
8796
end
@@ -133,6 +142,7 @@ def ==(o)
133142
self.class == o.class &&
134143
data == o.data &&
135144
included == o.included &&
145+
links == o.links &&
136146
meta == o.meta &&
137147
additional_properties == o.additional_properties
138148
end
@@ -141,7 +151,7 @@ def ==(o)
141151
# @return [Integer] Hash code
142152
# @!visibility private
143153
def hash
144-
[data, included, meta, additional_properties].hash
154+
[data, included, links, meta, additional_properties].hash
145155
end
146156
end
147157
end

lib/datadog_api_client/v2/models/org_group_membership_list_response.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ class OrgGroupMembershipListResponse
2424
# An array of org group memberships.
2525
attr_reader :data
2626

27-
# Pagination metadata.
27+
# Pagination links for navigating between pages of an org group list response.
28+
attr_accessor :links
29+
30+
# Pagination metadata for org group list responses.
2831
attr_accessor :meta
2932

3033
attr_accessor :additional_properties
@@ -34,6 +37,7 @@ class OrgGroupMembershipListResponse
3437
def self.attribute_map
3538
{
3639
:'data' => :'data',
40+
:'links' => :'links',
3741
:'meta' => :'meta'
3842
}
3943
end
@@ -43,6 +47,7 @@ def self.attribute_map
4347
def self.openapi_types
4448
{
4549
:'data' => :'Array<OrgGroupMembershipData>',
50+
:'links' => :'OrgGroupPaginationLinks',
4651
:'meta' => :'OrgGroupPaginationMeta'
4752
}
4853
end
@@ -71,6 +76,10 @@ def initialize(attributes = {})
7176
end
7277
end
7378

79+
if attributes.key?(:'links')
80+
self.links = attributes[:'links']
81+
end
82+
7483
if attributes.key?(:'meta')
7584
self.meta = attributes[:'meta']
7685
end
@@ -121,6 +130,7 @@ def ==(o)
121130
return true if self.equal?(o)
122131
self.class == o.class &&
123132
data == o.data &&
133+
links == o.links &&
124134
meta == o.meta &&
125135
additional_properties == o.additional_properties
126136
end
@@ -129,7 +139,7 @@ def ==(o)
129139
# @return [Integer] Hash code
130140
# @!visibility private
131141
def hash
132-
[data, meta, additional_properties].hash
142+
[data, links, meta, additional_properties].hash
133143
end
134144
end
135145
end

0 commit comments

Comments
 (0)