Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -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"
}
30 changes: 24 additions & 6 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -25819,13 +25825,19 @@ paths:
appKeyAuth: []
- AuthZ:
- dashboards_public_share
- AuthZ:
- dashboards_embed_share
- AuthZ:
- dashboards_invite_share
summary: Revoke a shared dashboard URL
tags:
- Dashboards
x-permission:
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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -25991,15 +26009,15 @@ paths:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- dashboards_public_share
- dashboards_invite_share
summary: Revoke shared dashboard invitations
tags:
- Dashboards
x-codegen-request-body-name: body
x-permission:
operator: OR
permissions:
- dashboards_public_share
- dashboards_invite_share
get:
description: Describe the invitations that exist for the given shared dashboard
(paginated).
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -26115,15 +26133,15 @@ paths:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- dashboards_public_share
- dashboards_invite_share
summary: Send shared dashboard invitation email
tags:
- Dashboards
x-codegen-request-body-name: body
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.
Expand Down
1 change: 1 addition & 0 deletions .generator/src/generator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
12 changes: 12 additions & 0 deletions .generator/src/generator/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion .generator/src/generator/templates/api.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 }},
Expand Down
Loading