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 }},