mirror of https://github.com/apache/superset.git
refactor: dashboards OpenAPI spec (#10301)
* refactor: dashboards OpenAPI spec * small fix
This commit is contained in:
parent
96e0da9fea
commit
3922348351
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue