From c9b6b479f83264841ee23ce5ab583f9603848fc3 Mon Sep 17 00:00:00 2001 From: Ville Brofeldt Date: Fri, 4 Feb 2022 11:48:58 +0200 Subject: [PATCH] docs: add password example to dataset import API --- superset/charts/api.py | 7 ++++++- superset/dashboards/api.py | 7 ++++++- superset/databases/api.py | 7 ++++++- superset/datasets/api.py | 7 ++++++- superset/queries/saved_queries/api.py | 7 ++++++- 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/superset/charts/api.py b/superset/charts/api.py index 6b45900edba2c..a4a301b71a107 100644 --- a/superset/charts/api.py +++ b/superset/charts/api.py @@ -837,7 +837,12 @@ def import_(self) -> Response: type: string format: binary passwords: - description: JSON map of passwords for each file + description: >- + JSON map of passwords for each featured database in the + ZIP file. If the ZIP includes a database config in the path + `databases/MyDatabase.yaml`, the password should be provided + in the following format: + `{"databases/MyDatabase.yaml": "my_password"}`. type: string overwrite: description: overwrite existing databases? diff --git a/superset/dashboards/api.py b/superset/dashboards/api.py index ea05ce9cacdd0..d5c04809beba4 100644 --- a/superset/dashboards/api.py +++ b/superset/dashboards/api.py @@ -944,7 +944,12 @@ def import_(self) -> Response: type: string format: binary passwords: - description: JSON map of passwords for each file + description: >- + JSON map of passwords for each featured database in the + ZIP file. If the ZIP includes a database config in the path + `databases/MyDatabase.yaml`, the password should be provided + in the following format: + `{"databases/MyDatabase.yaml": "my_password"}`. type: string overwrite: description: overwrite existing databases? diff --git a/superset/databases/api.py b/superset/databases/api.py index 79c4ff7460b41..1b8b408c1ca91 100644 --- a/superset/databases/api.py +++ b/superset/databases/api.py @@ -791,7 +791,12 @@ def import_(self) -> Response: type: string format: binary passwords: - description: JSON map of passwords for each file + description: >- + JSON map of passwords for each featured database in the + ZIP file. If the ZIP includes a database config in the path + `databases/MyDatabase.yaml`, the password should be provided + in the following format: + `{"databases/MyDatabase.yaml": "my_password"}`. type: string overwrite: description: overwrite existing databases? diff --git a/superset/datasets/api.py b/superset/datasets/api.py index ce8ce55cc25b4..b94b9ca12482a 100644 --- a/superset/datasets/api.py +++ b/superset/datasets/api.py @@ -697,7 +697,12 @@ def import_(self) -> Response: type: string format: binary passwords: - description: JSON map of passwords for each file + description: >- + JSON map of passwords for each featured database in the + ZIP file. If the ZIP includes a database config in the path + `databases/MyDatabase.yaml`, the password should be provided + in the following format: + `{"databases/MyDatabase.yaml": "my_password"}`. type: string overwrite: description: overwrite existing datasets? diff --git a/superset/queries/saved_queries/api.py b/superset/queries/saved_queries/api.py index a4d74cc5c0872..04df2345c1c2f 100644 --- a/superset/queries/saved_queries/api.py +++ b/superset/queries/saved_queries/api.py @@ -293,7 +293,12 @@ def import_(self) -> Response: type: string format: binary passwords: - description: JSON map of passwords for each file + description: >- + JSON map of passwords for each featured database in the + ZIP file. If the ZIP includes a database config in the path + `databases/MyDatabase.yaml`, the password should be provided + in the following format: + `{"databases/MyDatabase.yaml": "my_password"}`. type: string overwrite: description: overwrite existing saved queries?