From 299635c5803db3a1c8be079762d0bb57b4f8fc54 Mon Sep 17 00:00:00 2001 From: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Date: Mon, 7 Feb 2022 09:38:55 +0200 Subject: [PATCH] docs: add password example to dataset import API (#18580) --- 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 6b45900edba2..a4a301b71a10 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 ea05ce9cacdd..d5c04809beba 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 79c4ff7460b4..1b8b408c1ca9 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 ce8ce55cc25b..b94b9ca12482 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 a4d74cc5c087..04df2345c1c2 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?