Skip to content
Snippets Groups Projects
Commit 64cf2cc0 authored by Cam Saül's avatar Cam Saül
Browse files

Make Card/Dashboard description blankable

parent d2390468
No related branches found
No related tags found
No related merge requests found
# API Documentation for Metabase v0.23.0-snapshot
# API Documentation for Metabase v0.24.0-snapshot
## `GET /api/activity/`
......@@ -150,6 +150,8 @@ Run the query associated with a Card.
* **`parameters`**
* **`ignore_cache`** value may be nil, or if non-nil, value must be a boolean.
## `POST /api/card/:card-id/query/csv`
......@@ -193,7 +195,7 @@ Update a `Card`.
* **`visualization_settings`** value may be nil, or if non-nil, value must be a map.
* **`description`** value may be nil, or if non-nil, value must be a non-blank string.
* **`description`** value may be nil, or if non-nil, value must be a string.
* **`archived`** value may be nil, or if non-nil, value must be a boolean.
......@@ -420,7 +422,7 @@ Update a `Dashboard`.
* **`points_of_interest`** value may be nil, or if non-nil, value must be a non-blank string.
* **`description`** value may be nil, or if non-nil, value must be a non-blank string.
* **`description`** value may be nil, or if non-nil, value must be a string.
* **`show_in_getting_started`** value may be nil, or if non-nil, value must be a non-blank string.
......@@ -587,7 +589,7 @@ You must be a superuser to do this.
## `POST /api/dataset/`
Execute an MQL query and retrieve the results as JSON.
Execute a query and retrieve the results in the usual format.
##### PARAMS:
......@@ -1286,6 +1288,8 @@ Create a new `Pulse`.
* **`channels`** value must be an array. Each value must be a map. The array cannot be empty.
* **`skip_if_empty`** value must be a boolean.
## `POST /api/pulse/test`
......@@ -1299,6 +1303,8 @@ Test send an unsaved pulse.
* **`channels`** value must be an array. Each value must be a map. The array cannot be empty.
* **`skip_if_empty`** value must be a boolean.
## `PUT /api/pulse/:id`
......@@ -1314,6 +1320,8 @@ Update a `Pulse` with ID.
* **`channels`** value must be an array. Each value must be a map. The array cannot be empty.
* **`skip_if_empty`** value must be a boolean.
## `GET /api/revision/`
......@@ -1482,8 +1490,6 @@ Send a reset email when user has forgotten their password.
* **`remote-address`**
* **`request`**
## `POST /api/session/google_auth`
......@@ -1561,8 +1567,6 @@ Special endpoint for creating the first user during setup.
* **`first_name`** value must be a non-blank string.
* **`request`**
* **`password`** Insufficient password strength
* **`name`**
......@@ -1786,7 +1790,7 @@ Update a user's password.
## `PUT /api/user/:id/qbnewb`
Indicate that a user has been informed about the vast intricacies of 'the' QueryBuilder.
Indicate that a user has been informed about the vast intricacies of 'the' Query Builder.
##### PARAMS:
......
......@@ -232,7 +232,7 @@
{name (s/maybe su/NonBlankString)
dataset_query (s/maybe su/Map)
display (s/maybe su/NonBlankString)
description (s/maybe su/NonBlankString)
description (s/maybe s/Str)
visualization_settings (s/maybe su/Map)
archived (s/maybe s/Bool)
enable_embedding (s/maybe s/Bool)
......
......@@ -73,7 +73,7 @@
but to change the value of `enable_embedding` you must be a superuser."
[id :as {{:keys [description name parameters caveats points_of_interest show_in_getting_started enable_embedding embedding_params], :as dashboard} :body}]
{name (s/maybe su/NonBlankString)
description (s/maybe su/NonBlankString)
description (s/maybe s/Str)
caveats (s/maybe su/NonBlankString)
points_of_interest (s/maybe su/NonBlankString)
show_in_getting_started (s/maybe su/NonBlankString)
......
......@@ -254,6 +254,13 @@
((user->client :rasta) :put 200 (str "card/" (u/get-id card)) {:description nil})
(db/select-one-field :description Card :id (u/get-id card))))
;; description should be blankable as well
(expect
""
(with-temp-card [card {:description "What a nice Card"}]
((user->client :rasta) :put 200 (str "card/" (u/get-id card)) {:description ""})
(db/select-one-field :description Card :id (u/get-id card))))
;; Can we update a card's embedding_params?
(expect
{:abc "enabled"}
......
......@@ -166,6 +166,12 @@
((user->client :rasta) :put 200 (str "dashboard/" (u/get-id dashboard)) {:description nil})
(db/select-one-field :description Dashboard :id (u/get-id dashboard))))
(expect
""
(tt/with-temp Dashboard [dashboard {:description "What a nice Dashboard"}]
((user->client :rasta) :put 200 (str "dashboard/" (u/get-id dashboard)) {:description ""})
(db/select-one-field :description Dashboard :id (u/get-id dashboard))))
;; ## DELETE /api/dashboard/:id
(expect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment