diff --git a/superset/dashboards/api.py b/superset/dashboards/api.py index 2e94e2883..cba1fa74e 100644 --- a/superset/dashboards/api.py +++ b/superset/dashboards/api.py @@ -139,7 +139,6 @@ class DashboardRestApi(BaseSupersetModelRestApi): base_filters = [["slice", DashboardFilter, lambda: []]] - openapi_spec_tag = "Dashboards" order_rel_fields = { "slices": ("slice_name", "asc"), "owners": ("first_name", "asc"), @@ -149,6 +148,12 @@ class DashboardRestApi(BaseSupersetModelRestApi): } allowed_rel_fields = {"owners"} + openapi_spec_tag = "Dashboards" + apispec_parameter_schemas = { + "get_delete_ids_schema": get_delete_ids_schema, + "get_export_ids_schema": get_export_ids_schema, + "thumbnail_query_schema": thumbnail_query_schema, + } openapi_spec_methods = openapi_spec_methods_override """ Overrides GET methods OpenApi descriptions """ @@ -354,9 +359,7 @@ class DashboardRestApi(BaseSupersetModelRestApi): content: application/json: schema: - type: array - items: - type: integer + $ref: '#/components/schemas/get_delete_ids_schema' responses: 200: description: Dashboard bulk delete @@ -413,9 +416,7 @@ class DashboardRestApi(BaseSupersetModelRestApi): content: application/json: schema: - type: array - items: - type: integer + $ref: '#/components/schemas/get_export_ids_schema' responses: 200: description: Dashboard export @@ -475,11 +476,7 @@ class DashboardRestApi(BaseSupersetModelRestApi): content: application/json: schema: - type: object - properties: - force: - type: boolean - default: false + $ref: '#/components/schemas/thumbnail_query_schema' responses: 200: description: Dashboard thumbnail image