Skip to content

Commit 290e2b2

Browse files
api-clients-generation-pipeline[bot]skarimoci.datadog-api-spec
authored
Sync OpenAPI specification for (spec-v1-dashboard_sharing.yaml) (#3011)
* handle multiple auth * Regenerate client from commit 0becaa3 of spec repo --------- Co-authored-by: skarimo <[email protected]> Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 82c572e commit 290e2b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+420
-389
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "671ba51",
3-
"generated": "2025-07-16 20:18:30.103"
2+
"spec_repo_commit": "0becaa3",
3+
"generated": "2025-07-17 13:14:16.680"
44
}

.generator/schemas/v1/openapi.yaml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25773,6 +25773,10 @@ paths:
2577325773
appKeyAuth: []
2577425774
- AuthZ:
2577525775
- dashboards_public_share
25776+
- AuthZ:
25777+
- dashboards_embed_share
25778+
- AuthZ:
25779+
- dashboards_invite_share
2577625780
summary: Create a shared dashboard
2577725781
tags:
2577825782
- Dashboards
@@ -25781,6 +25785,8 @@ paths:
2578125785
operator: OR
2578225786
permissions:
2578325787
- dashboards_public_share
25788+
- dashboards_embed_share
25789+
- dashboards_invite_share
2578425790
/api/v1/dashboard/public/{token}:
2578525791
delete:
2578625792
description: Revoke the public URL for a dashboard (rendering it private) associated
@@ -25819,13 +25825,19 @@ paths:
2581925825
appKeyAuth: []
2582025826
- AuthZ:
2582125827
- dashboards_public_share
25828+
- AuthZ:
25829+
- dashboards_embed_share
25830+
- AuthZ:
25831+
- dashboards_invite_share
2582225832
summary: Revoke a shared dashboard URL
2582325833
tags:
2582425834
- Dashboards
2582525835
x-permission:
2582625836
operator: OR
2582725837
permissions:
2582825838
- dashboards_public_share
25839+
- dashboards_embed_share
25840+
- dashboards_invite_share
2582925841
get:
2583025842
description: Fetch an existing shared dashboard's sharing metadata associated
2583125843
with the specified token.
@@ -25936,6 +25948,10 @@ paths:
2593625948
appKeyAuth: []
2593725949
- AuthZ:
2593825950
- dashboards_public_share
25951+
- AuthZ:
25952+
- dashboards_embed_share
25953+
- AuthZ:
25954+
- dashboards_invite_share
2593925955
summary: Update a shared dashboard
2594025956
tags:
2594125957
- Dashboards
@@ -25944,6 +25960,8 @@ paths:
2594425960
operator: OR
2594525961
permissions:
2594625962
- dashboards_public_share
25963+
- dashboards_embed_share
25964+
- dashboards_invite_share
2594725965
/api/v1/dashboard/public/{token}/invitation:
2594825966
delete:
2594925967
description: Revoke previously sent invitation emails and active sessions used
@@ -25991,15 +26009,15 @@ paths:
2599126009
- apiKeyAuth: []
2599226010
appKeyAuth: []
2599326011
- AuthZ:
25994-
- dashboards_public_share
26012+
- dashboards_invite_share
2599526013
summary: Revoke shared dashboard invitations
2599626014
tags:
2599726015
- Dashboards
2599826016
x-codegen-request-body-name: body
2599926017
x-permission:
2600026018
operator: OR
2600126019
permissions:
26002-
- dashboards_public_share
26020+
- dashboards_invite_share
2600326021
get:
2600426022
description: Describe the invitations that exist for the given shared dashboard
2600526023
(paginated).
@@ -26050,14 +26068,14 @@ paths:
2605026068
- apiKeyAuth: []
2605126069
appKeyAuth: []
2605226070
- AuthZ:
26053-
- dashboards_public_share
26071+
- dashboards_invite_share
2605426072
summary: Get all invitations for a shared dashboard
2605526073
tags:
2605626074
- Dashboards
2605726075
x-permission:
2605826076
operator: OR
2605926077
permissions:
26060-
- dashboards_public_share
26078+
- dashboards_invite_share
2606126079
post:
2606226080
description: Send emails to specified email addresses containing links to access
2606326081
a given authenticated shared dashboard. Email addresses must already belong
@@ -26115,15 +26133,15 @@ paths:
2611526133
- apiKeyAuth: []
2611626134
appKeyAuth: []
2611726135
- AuthZ:
26118-
- dashboards_public_share
26136+
- dashboards_invite_share
2611926137
summary: Send shared dashboard invitation email
2612026138
tags:
2612126139
- Dashboards
2612226140
x-codegen-request-body-name: body
2612326141
x-permission:
2612426142
operator: OR
2612526143
permissions:
26126-
- dashboards_public_share
26144+
- dashboards_invite_share
2612726145
/api/v1/dashboard/{dashboard_id}:
2612826146
delete:
2612926147
description: Delete a dashboard using the specified ID.

.generator/src/generator/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def cli(specs, output):
6767
env.globals["get_accessors"] = openapi.get_accessors
6868
env.globals["get_default"] = openapi.get_default
6969
env.globals["get_container_type"] = openapi.get_container_type
70+
env.globals["get_security_names"] = openapi.get_security_names
7071

7172
api_j2 = env.get_template("Api.j2")
7273
model_j2 = env.get_template("model.j2")

.generator/src/generator/openapi.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,18 @@ def get_container_type(operation, attribute_path, stop=None):
589589
return type_to_java(parameter)
590590

591591

592+
def get_security_names(security):
593+
if security is None:
594+
return []
595+
596+
auth_names = set()
597+
for auth in security:
598+
for key in auth.keys() if isinstance(auth, dict) else [auth]:
599+
auth_names.add(key)
600+
601+
return list(auth_names)
602+
603+
592604
class Operation:
593605
def __init__(self, name, spec, method, path):
594606
self.name = name

.generator/src/generator/templates/Api.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ public class {{ name }} {
379379
if ({{ name|variable_name }} != null) { localVarFormParams.put("{{ name }}", {{ name|variable_name }}); }
380380
{%- endfor %}
381381

382-
Invocation.Builder builder = apiClient.createBuilder("{{ version }}.{{ name }}.{{ operationId }}", localVarPath, {% if queryParams %}localVarQueryParams{% else %}new ArrayList<Pair>(){% endif %}, localVarHeaderParams, new HashMap<String, String>(), new String[] { {%- for mediaType in operation|accept_headers %}"{{ mediaType }}"{% if loop.nextitem %}, {% endif %}{% endfor %} }, new String[] { {% for authMethod in authMethods|reverse %}{%- for name in authMethod %}"{{ name }}"{% if loop.nextitem %}, {% endif %}{% endfor %}{% if loop.nextitem %}, {% endif %}{% endfor %} });
382+
Invocation.Builder builder = apiClient.createBuilder("{{ version }}.{{ name }}.{{ operationId }}", localVarPath, {% if queryParams %}localVarQueryParams{% else %}new ArrayList<Pair>(){% endif %}, localVarHeaderParams, new HashMap<String, String>(), new String[] { {%- for mediaType in operation|accept_headers %}"{{ mediaType }}"{% if loop.nextitem %}, {% endif %}{% endfor %} }, new String[] { {% for name in get_security_names(authMethods)|sort %}"{{ name }}"{% if loop.nextitem %}, {% endif %}{% endfor %} });
383383
return apiClient.invokeAPI("{{ method.upper() }}", builder, localVarHeaderParams, new String[] { {%- if operation.requestBody is defined %} {%- for mediaType in operation.requestBody.content.keys() %}"{{ mediaType }}"{% if loop.nextitem %}, {% endif %}{%- endfor %}{%- endif %} }, localVarPostBody,{% if formParams %}localVarFormParams{% else %}new HashMap<String, Object>(){% endif %} , {% if operation.requestBody %}{% if operation.requestBody.nullable %}true{% else %}false{% endif %}{% else %}false{% endif %}, {% if returnType %}new GenericType<{{ returnType }}>() {}{% else %}null{% endif %});
384384
}
385385

src/main/java/com/datadog/api/client/v1/api/DashboardListsApi.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public ApiResponse<DashboardList> createDashboardListWithHttpInfo(DashboardList
112112
localVarHeaderParams,
113113
new HashMap<String, String>(),
114114
new String[] {"application/json"},
115-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
115+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
116116
return apiClient.invokeAPI(
117117
"POST",
118118
builder,
@@ -245,7 +245,7 @@ public ApiResponse<DashboardListDeleteResponse> deleteDashboardListWithHttpInfo(
245245
localVarHeaderParams,
246246
new HashMap<String, String>(),
247247
new String[] {"application/json"},
248-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
248+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
249249
return apiClient.invokeAPI(
250250
"DELETE",
251251
builder,
@@ -381,7 +381,7 @@ public ApiResponse<DashboardList> getDashboardListWithHttpInfo(Long listId) thro
381381
localVarHeaderParams,
382382
new HashMap<String, String>(),
383383
new String[] {"application/json"},
384-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
384+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
385385
return apiClient.invokeAPI(
386386
"GET",
387387
builder,
@@ -504,7 +504,7 @@ public ApiResponse<DashboardListListResponse> listDashboardListsWithHttpInfo()
504504
localVarHeaderParams,
505505
new HashMap<String, String>(),
506506
new String[] {"application/json"},
507-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
507+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
508508
return apiClient.invokeAPI(
509509
"GET",
510510
builder,
@@ -638,7 +638,7 @@ public ApiResponse<DashboardList> updateDashboardListWithHttpInfo(Long listId, D
638638
localVarHeaderParams,
639639
new HashMap<String, String>(),
640640
new String[] {"application/json"},
641-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
641+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
642642
return apiClient.invokeAPI(
643643
"PUT",
644644
builder,

src/main/java/com/datadog/api/client/v1/api/DashboardsApi.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public ApiResponse<Dashboard> createDashboardWithHttpInfo(Dashboard body) throws
125125
localVarHeaderParams,
126126
new HashMap<String, String>(),
127127
new String[] {"application/json"},
128-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
128+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
129129
return apiClient.invokeAPI(
130130
"POST",
131131
builder,
@@ -257,7 +257,7 @@ public ApiResponse<SharedDashboard> createPublicDashboardWithHttpInfo(SharedDash
257257
localVarHeaderParams,
258258
new HashMap<String, String>(),
259259
new String[] {"application/json"},
260-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
260+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
261261
return apiClient.invokeAPI(
262262
"POST",
263263
builder,
@@ -304,7 +304,7 @@ public CompletableFuture<ApiResponse<SharedDashboard>> createPublicDashboardWith
304304
localVarHeaderParams,
305305
new HashMap<String, String>(),
306306
new String[] {"application/json"},
307-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
307+
new String[] {"AuthZ", "AuthZ", "AuthZ", "apiKeyAuth", "appKeyAuth"});
308308
} catch (ApiException ex) {
309309
CompletableFuture<ApiResponse<SharedDashboard>> result = new CompletableFuture<>();
310310
result.completeExceptionally(ex);
@@ -391,7 +391,7 @@ public ApiResponse<DashboardDeleteResponse> deleteDashboardWithHttpInfo(String d
391391
localVarHeaderParams,
392392
new HashMap<String, String>(),
393393
new String[] {"application/json"},
394-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
394+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
395395
return apiClient.invokeAPI(
396396
"DELETE",
397397
builder,
@@ -526,7 +526,7 @@ public ApiResponse<Void> deleteDashboardsWithHttpInfo(DashboardBulkDeleteRequest
526526
localVarHeaderParams,
527527
new HashMap<String, String>(),
528528
new String[] {"*/*"},
529-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
529+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
530530
return apiClient.invokeAPI(
531531
"DELETE",
532532
builder,
@@ -660,7 +660,7 @@ public ApiResponse<DeleteSharedDashboardResponse> deletePublicDashboardWithHttpI
660660
localVarHeaderParams,
661661
new HashMap<String, String>(),
662662
new String[] {"application/json"},
663-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
663+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
664664
return apiClient.invokeAPI(
665665
"DELETE",
666666
builder,
@@ -710,7 +710,7 @@ public ApiResponse<DeleteSharedDashboardResponse> deletePublicDashboardWithHttpI
710710
localVarHeaderParams,
711711
new HashMap<String, String>(),
712712
new String[] {"application/json"},
713-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
713+
new String[] {"AuthZ", "AuthZ", "AuthZ", "apiKeyAuth", "appKeyAuth"});
714714
} catch (ApiException ex) {
715715
CompletableFuture<ApiResponse<DeleteSharedDashboardResponse>> result =
716716
new CompletableFuture<>();
@@ -810,7 +810,7 @@ public ApiResponse<Void> deletePublicDashboardInvitationWithHttpInfo(
810810
localVarHeaderParams,
811811
new HashMap<String, String>(),
812812
new String[] {"*/*"},
813-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
813+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
814814
return apiClient.invokeAPI(
815815
"DELETE",
816816
builder,
@@ -959,7 +959,7 @@ public ApiResponse<Dashboard> getDashboardWithHttpInfo(String dashboardId) throw
959959
localVarHeaderParams,
960960
new HashMap<String, String>(),
961961
new String[] {"application/json"},
962-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
962+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
963963
return apiClient.invokeAPI(
964964
"GET",
965965
builder,
@@ -1098,7 +1098,7 @@ public ApiResponse<SharedDashboard> getPublicDashboardWithHttpInfo(String token)
10981098
localVarHeaderParams,
10991099
new HashMap<String, String>(),
11001100
new String[] {"application/json"},
1101-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
1101+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
11021102
return apiClient.invokeAPI(
11031103
"GET",
11041104
builder,
@@ -1308,7 +1308,7 @@ public ApiResponse<SharedDashboardInvites> getPublicDashboardInvitationsWithHttp
13081308
localVarHeaderParams,
13091309
new HashMap<String, String>(),
13101310
new String[] {"application/json"},
1311-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
1311+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
13121312
return apiClient.invokeAPI(
13131313
"GET",
13141314
builder,
@@ -1593,7 +1593,7 @@ public ApiResponse<DashboardSummary> listDashboardsWithHttpInfo(
15931593
localVarHeaderParams,
15941594
new HashMap<String, String>(),
15951595
new String[] {"application/json"},
1596-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
1596+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
15971597
return apiClient.invokeAPI(
15981598
"GET",
15991599
builder,
@@ -1726,7 +1726,7 @@ public ApiResponse<Void> restoreDashboardsWithHttpInfo(DashboardRestoreRequest b
17261726
localVarHeaderParams,
17271727
new HashMap<String, String>(),
17281728
new String[] {"*/*"},
1729-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
1729+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
17301730
return apiClient.invokeAPI(
17311731
"PATCH",
17321732
builder,
@@ -1873,7 +1873,7 @@ public ApiResponse<SharedDashboardInvites> sendPublicDashboardInvitationWithHttp
18731873
localVarHeaderParams,
18741874
new HashMap<String, String>(),
18751875
new String[] {"application/json"},
1876-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
1876+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
18771877
return apiClient.invokeAPI(
18781878
"POST",
18791879
builder,
@@ -2031,7 +2031,7 @@ public ApiResponse<Dashboard> updateDashboardWithHttpInfo(String dashboardId, Da
20312031
localVarHeaderParams,
20322032
new HashMap<String, String>(),
20332033
new String[] {"application/json"},
2034-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
2034+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
20352035
return apiClient.invokeAPI(
20362036
"PUT",
20372037
builder,
@@ -2189,7 +2189,7 @@ public ApiResponse<SharedDashboard> updatePublicDashboardWithHttpInfo(
21892189
localVarHeaderParams,
21902190
new HashMap<String, String>(),
21912191
new String[] {"application/json"},
2192-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
2192+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
21932193
return apiClient.invokeAPI(
21942194
"PUT",
21952195
builder,
@@ -2248,7 +2248,7 @@ public CompletableFuture<ApiResponse<SharedDashboard>> updatePublicDashboardWith
22482248
localVarHeaderParams,
22492249
new HashMap<String, String>(),
22502250
new String[] {"application/json"},
2251-
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
2251+
new String[] {"AuthZ", "AuthZ", "AuthZ", "apiKeyAuth", "appKeyAuth"});
22522252
} catch (ApiException ex) {
22532253
CompletableFuture<ApiResponse<SharedDashboard>> result = new CompletableFuture<>();
22542254
result.completeExceptionally(ex);

0 commit comments

Comments
 (0)