From e795920a6331c40ebeda93a7a7df8b553ac026a6 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 12:41:34 +0000 Subject: [PATCH 1/2] Update documentation for customers clarifying that our post endpoint is avail in fed (#2543) Co-authored-by: ci.datadog-api-spec --- .generated-info | 4 ++-- .generator/schemas/v2/openapi.yaml | 4 +--- lib/datadog_api_client/v2/api/events_api.rb | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.generated-info b/.generated-info index 6aeaeb58e5e8..4165807dd3fe 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "2ffdc3f", - "generated": "2025-07-16 19:14:13.100" + "spec_repo_commit": "671ba51", + "generated": "2025-07-16 20:16:53.066" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2ee20dab08f3..affbc2622b22 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -48677,9 +48677,7 @@ paths: for more details.\n\n\u274C For use cases involving other event categories, use the V1 endpoint or reach out to [support](https://www.datadoghq.com/support/).\n\n\u274C Notifications are not yet supported for events sent to this endpoint. Use - the V1 endpoint for notification functionality.\n\n\u274C This endpoint is - not available for the Government (US1-FED) site. Contact your account representative - for more information." + the V1 endpoint for notification functionality." operationId: CreateEvent requestBody: content: diff --git a/lib/datadog_api_client/v2/api/events_api.rb b/lib/datadog_api_client/v2/api/events_api.rb index 41e912e90650..076ee38f506e 100644 --- a/lib/datadog_api_client/v2/api/events_api.rb +++ b/lib/datadog_api_client/v2/api/events_api.rb @@ -43,8 +43,6 @@ def create_event(body, opts = {}) # # ❌ Notifications are not yet supported for events sent to this endpoint. Use the V1 endpoint for notification functionality. # - # ❌ This endpoint is not available for the Government (US1-FED) site. Contact your account representative for more information. - # # @param body [EventCreateRequestPayload] Event creation request payload. # @param opts [Hash] the optional parameters # @return [Array<(EventCreateResponsePayload, Integer, Hash)>] EventCreateResponsePayload data, response status code and response headers From 94c276dfb250d00bb921aacb59ff671d308c4623 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 13:24:35 +0000 Subject: [PATCH 2/2] Sync OpenAPI specification for (spec-v1-dashboard_sharing.yaml) (#2546) * handle multiple auth * Regenerate client from commit 0becaa3 of spec repo --------- Co-authored-by: skarimo Co-authored-by: ci.datadog-api-spec --- .generated-info | 4 +-- .generator/schemas/v1/openapi.yaml | 30 ++++++++++++++++++----- .generator/src/generator/cli.py | 1 + .generator/src/generator/openapi.py | 12 +++++++++ .generator/src/generator/templates/api.j2 | 2 +- 5 files changed, 40 insertions(+), 9 deletions(-) diff --git a/.generated-info b/.generated-info index 4165807dd3fe..28a92f49c9b8 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "671ba51", - "generated": "2025-07-16 20:16:53.066" + "spec_repo_commit": "0becaa3", + "generated": "2025-07-17 13:13:07.458" } diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index e713722382cc..6511a44e0429 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -25773,6 +25773,10 @@ paths: appKeyAuth: [] - AuthZ: - dashboards_public_share + - AuthZ: + - dashboards_embed_share + - AuthZ: + - dashboards_invite_share summary: Create a shared dashboard tags: - Dashboards @@ -25781,6 +25785,8 @@ paths: operator: OR permissions: - dashboards_public_share + - dashboards_embed_share + - dashboards_invite_share /api/v1/dashboard/public/{token}: delete: description: Revoke the public URL for a dashboard (rendering it private) associated @@ -25819,6 +25825,10 @@ paths: appKeyAuth: [] - AuthZ: - dashboards_public_share + - AuthZ: + - dashboards_embed_share + - AuthZ: + - dashboards_invite_share summary: Revoke a shared dashboard URL tags: - Dashboards @@ -25826,6 +25836,8 @@ paths: operator: OR permissions: - dashboards_public_share + - dashboards_embed_share + - dashboards_invite_share get: description: Fetch an existing shared dashboard's sharing metadata associated with the specified token. @@ -25936,6 +25948,10 @@ paths: appKeyAuth: [] - AuthZ: - dashboards_public_share + - AuthZ: + - dashboards_embed_share + - AuthZ: + - dashboards_invite_share summary: Update a shared dashboard tags: - Dashboards @@ -25944,6 +25960,8 @@ paths: operator: OR permissions: - dashboards_public_share + - dashboards_embed_share + - dashboards_invite_share /api/v1/dashboard/public/{token}/invitation: delete: description: Revoke previously sent invitation emails and active sessions used @@ -25991,7 +26009,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - dashboards_public_share + - dashboards_invite_share summary: Revoke shared dashboard invitations tags: - Dashboards @@ -25999,7 +26017,7 @@ paths: x-permission: operator: OR permissions: - - dashboards_public_share + - dashboards_invite_share get: description: Describe the invitations that exist for the given shared dashboard (paginated). @@ -26050,14 +26068,14 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - dashboards_public_share + - dashboards_invite_share summary: Get all invitations for a shared dashboard tags: - Dashboards x-permission: operator: OR permissions: - - dashboards_public_share + - dashboards_invite_share post: description: Send emails to specified email addresses containing links to access a given authenticated shared dashboard. Email addresses must already belong @@ -26115,7 +26133,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - dashboards_public_share + - dashboards_invite_share summary: Send shared dashboard invitation email tags: - Dashboards @@ -26123,7 +26141,7 @@ paths: x-permission: operator: OR permissions: - - dashboards_public_share + - dashboards_invite_share /api/v1/dashboard/{dashboard_id}: delete: description: Delete a dashboard using the specified ID. diff --git a/.generator/src/generator/cli.py b/.generator/src/generator/cli.py index 91f6d216994c..0be45612a0d3 100644 --- a/.generator/src/generator/cli.py +++ b/.generator/src/generator/cli.py @@ -51,6 +51,7 @@ def cli(specs, output): env.globals["get_default"] = openapi.get_default env.globals["get_container"] = openapi.get_container env.globals["get_type_at_path"] = openapi.get_type_at_path + env.globals["get_security_names"] = openapi.get_security_names api_j2 = env.get_template("api.j2") model_j2 = env.get_template("model.j2") diff --git a/.generator/src/generator/openapi.py b/.generator/src/generator/openapi.py index d863b5ca4a7b..e385f0870b3d 100644 --- a/.generator/src/generator/openapi.py +++ b/.generator/src/generator/openapi.py @@ -502,3 +502,15 @@ def get_type_at_path(operation, attribute_path): for attr in attribute_path.split("."): content = content["properties"][attr] return get_name(content.get("items")) + + +def get_security_names(security): + if security is None: + return [] + + auth_names = set() + for auth in security: + for key in auth.keys() if isinstance(auth, dict) else [auth]: + auth_names.add(key) + + return list(auth_names) diff --git a/.generator/src/generator/templates/api.j2 b/.generator/src/generator/templates/api.j2 index 555ca5aa2f84..355f89f29371 100644 --- a/.generator/src/generator/templates/api.j2 +++ b/.generator/src/generator/templates/api.j2 @@ -195,7 +195,7 @@ module {{ module_name }}::{{ version|upper }} # auth_names {%- set authMethods = operation.security if "security" in operation else openapi.security %} - auth_names = opts[:debug_auth_names] || [{% for auth in (authMethods or []) %}:{{ ", :".join(auth.keys()) }}{%- if not loop.last %}, {% endif %}{% endfor %}] + auth_names = opts[:debug_auth_names] || [{% for auth in get_security_names(authMethods)|sort %}:{{ auth }}{%- if not loop.last %}, {% endif %}{% endfor %}] new_options = opts.merge( :operation => :{{ operation.operationId|snake_case }},