This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new d41f0febaee fix(api): add example to get_export_ids_schema so Swagger 
"Try it out" pre-fills a valid array (#42265)
d41f0febaee is described below

commit d41f0febaee54958a1a73d86996c01f90d750b92
Author: Abdul Rehman <[email protected]>
AuthorDate: Fri Jul 24 05:15:24 2026 +0500

    fix(api): add example to get_export_ids_schema so Swagger "Try it out" 
pre-fills a valid array (#42265)
---
 superset/annotation_layers/annotations/schemas.py |  6 +++++-
 superset/annotation_layers/schemas.py             |  6 +++++-
 superset/charts/schemas.py                        | 18 +++++++++++++++---
 superset/css_templates/schemas.py                 |  6 +++++-
 superset/dashboards/schemas.py                    | 18 +++++++++++++++---
 superset/databases/schemas.py                     |  6 +++++-
 superset/datasets/schemas.py                      | 12 ++++++++++--
 superset/queries/saved_queries/schemas.py         | 12 ++++++++++--
 superset/reports/schemas.py                       |  6 +++++-
 superset/row_level_security/schemas.py            |  6 +++++-
 superset/tasks/schemas.py                         |  6 +++++-
 superset/themes/schemas.py                        | 12 ++++++++++--
 12 files changed, 95 insertions(+), 19 deletions(-)

diff --git a/superset/annotation_layers/annotations/schemas.py 
b/superset/annotation_layers/annotations/schemas.py
index 6ca96a4a749..59c9fc96a79 100644
--- a/superset/annotation_layers/annotations/schemas.py
+++ b/superset/annotation_layers/annotations/schemas.py
@@ -38,7 +38,11 @@ openapi_spec_methods_override = {
     "info": {"get": {"summary": "Get metadata information about this API 
resource"}},
 }
 
-get_delete_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_delete_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
 
 annotation_start_dttm = "The annotation start date time"
 annotation_end_dttm = "The annotation end date time"
diff --git a/superset/annotation_layers/schemas.py 
b/superset/annotation_layers/schemas.py
index 1992d423fc4..cbcc2a26cbb 100644
--- a/superset/annotation_layers/schemas.py
+++ b/superset/annotation_layers/schemas.py
@@ -34,7 +34,11 @@ openapi_spec_methods_override = {
     "info": {"get": {"summary": "Get metadata information about this API 
resource"}},
 }
 
-get_delete_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_delete_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
 
 annotation_layer_name = "The annotation layer name"
 annotation_layer_descr = "Give a description for this annotation layer"
diff --git a/superset/charts/schemas.py b/superset/charts/schemas.py
index 97da753eed5..d50c8f4b4e4 100644
--- a/superset/charts/schemas.py
+++ b/superset/charts/schemas.py
@@ -104,7 +104,11 @@ def validate_prophet_periods(value: int) -> None:
 #
 # RISON/JSON schemas for query parameters
 #
-get_delete_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_delete_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
 
 width_height_schema = {
     "type": "array",
@@ -122,9 +126,17 @@ screenshot_query_schema = {
         "thumb_size": width_height_schema,
     },
 }
-get_export_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_export_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
 
-get_fav_star_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_fav_star_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
 
 #
 # Column schema descriptions
diff --git a/superset/css_templates/schemas.py 
b/superset/css_templates/schemas.py
index 26bcc61a756..86f7f487e20 100644
--- a/superset/css_templates/schemas.py
+++ b/superset/css_templates/schemas.py
@@ -32,4 +32,8 @@ openapi_spec_methods_override = {
     "info": {"get": {"summary": "Get metadata information about this API 
resource"}},
 }
 
-get_delete_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_delete_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
diff --git a/superset/dashboards/schemas.py b/superset/dashboards/schemas.py
index b6e60f6224e..7dbfe948951 100644
--- a/superset/dashboards/schemas.py
+++ b/superset/dashboards/schemas.py
@@ -26,9 +26,21 @@ from superset.tags.models import TagType
 from superset.utils import json
 from superset.utils.schema import validate_external_url
 
-get_delete_ids_schema = {"type": "array", "items": {"type": "integer"}}
-get_export_ids_schema = {"type": "array", "items": {"type": "integer"}}
-get_fav_star_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_delete_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
+get_export_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
+get_fav_star_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
 thumbnail_query_schema = {
     "type": "object",
     "properties": {"force": {"type": "boolean"}},
diff --git a/superset/databases/schemas.py b/superset/databases/schemas.py
index 97ca6e7733e..10a7cbac540 100644
--- a/superset/databases/schemas.py
+++ b/superset/databases/schemas.py
@@ -166,7 +166,11 @@ extra_description = markdown(
     "the default catalog when running queries and creating datasets.",
     True,
 )
-get_export_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_export_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
 sqlalchemy_uri_description = markdown(
     "Refer to the "
     "[SqlAlchemy docs]"
diff --git a/superset/datasets/schemas.py b/superset/datasets/schemas.py
index bb54c138c5c..faa1e39592a 100644
--- a/superset/datasets/schemas.py
+++ b/superset/datasets/schemas.py
@@ -36,8 +36,16 @@ from superset.models.sql_types import parse_currency_string
 from superset.subjects.schemas import SubjectResponseSchema
 from superset.utils import json
 
-get_delete_ids_schema = {"type": "array", "items": {"type": "integer"}}
-get_export_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_delete_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
+get_export_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
 get_drill_info_schema = {
     "type": "object",
     "properties": {
diff --git a/superset/queries/saved_queries/schemas.py 
b/superset/queries/saved_queries/schemas.py
index ba33e24e1da..1c31d875cfc 100644
--- a/superset/queries/saved_queries/schemas.py
+++ b/superset/queries/saved_queries/schemas.py
@@ -42,8 +42,16 @@ openapi_spec_methods_override = {
     "info": {"get": {"summary": "Get metadata information about this API 
resource"}},
 }
 
-get_delete_ids_schema = {"type": "array", "items": {"type": "integer"}}
-get_export_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_delete_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
+get_export_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
 
 
 class ImportV1SavedQuerySchema(Schema):
diff --git a/superset/reports/schemas.py b/superset/reports/schemas.py
index d9d703206bd..eadc5ee0d2c 100644
--- a/superset/reports/schemas.py
+++ b/superset/reports/schemas.py
@@ -49,7 +49,11 @@ openapi_spec_methods_override = {
     "info": {"get": {"summary": "Get metadata information about this API 
resource"}},
 }
 
-get_delete_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_delete_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
 get_slack_channels_schema = {
     "type": "object",
     "properties": {
diff --git a/superset/row_level_security/schemas.py 
b/superset/row_level_security/schemas.py
index f4b355659e1..3acce2768c4 100644
--- a/superset/row_level_security/schemas.py
+++ b/superset/row_level_security/schemas.py
@@ -58,7 +58,11 @@ group_key_description = "Filters with the same group key 
will be ORed together w
 # pylint: disable=line-too-long
 clause_description = "This is the condition that will be added to the WHERE 
clause. For example, to only return rows for a particular client, you might 
define a regular filter with the clause `client_id = 9`. To display no rows 
unless a user belongs to a RLS filter role, a base filter can be created with 
the clause `1 = 0` (always false)."  # noqa: E501
 
-get_delete_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_delete_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
 
 openapi_spec_methods_override = {
     "get": {"get": {"summary": "Get an RLS"}},
diff --git a/superset/tasks/schemas.py b/superset/tasks/schemas.py
index bf93c5d0c47..329e76d1c75 100644
--- a/superset/tasks/schemas.py
+++ b/superset/tasks/schemas.py
@@ -20,7 +20,11 @@ from marshmallow import fields, Schema
 from marshmallow.fields import Method
 
 # RISON/JSON schemas for query parameters
-get_delete_ids_schema = {"type": "array", "items": {"type": "string"}}
+get_delete_ids_schema = {
+    "type": "array",
+    "items": {"type": "string"},
+    "example": ["task_id_1", "task_id_2"],
+}
 
 # Field descriptions
 uuid_description = "The unique identifier (UUID) of the task"
diff --git a/superset/themes/schemas.py b/superset/themes/schemas.py
index 099586d025c..28e40b58c67 100644
--- a/superset/themes/schemas.py
+++ b/superset/themes/schemas.py
@@ -184,5 +184,13 @@ openapi_spec_methods_override = {
     "info": {"get": {"summary": "Get metadata information about this API 
resource"}},
 }
 
-get_delete_ids_schema = {"type": "array", "items": {"type": "integer"}}
-get_export_ids_schema = {"type": "array", "items": {"type": "integer"}}
+get_delete_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}
+get_export_ids_schema = {
+    "type": "array",
+    "items": {"type": "integer"},
+    "example": [1, 2, 3],
+}

Reply via email to