From 755bb5c6280a648d0a02a287d728d69ceb1602f8 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 20:57:26 +0000 Subject: [PATCH] Remove js codeblock prefix from Notebooks API Spec (#2701) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v1/openapi.yaml | 6 +++--- ...eate-a-notebook-returns-OK-response.frozen | 2 +- .../Create-a-notebook-returns-OK-response.yml | 19 ++++++++++++------- .../Update-a-notebook-returns-OK-response.yml | 4 ++-- .../v1/logs-pipelines/CreateLogsPipeline.rb | 4 ++-- .../v1/logs-pipelines/UpdateLogsPipeline.rb | 4 ++-- examples/v1/notebooks/CreateNotebook.rb | 2 +- examples/v1/notebooks/UpdateNotebook.rb | 2 +- features/v1/logs_pipelines.feature | 8 ++++---- features/v1/notebooks.feature | 14 +++++++------- 10 files changed, 35 insertions(+), 30 deletions(-) diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 84a7c25d04e5..6f6f29cece06 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -9572,7 +9572,7 @@ components: text: '## Some test markdown - ```js + ``` var x, y; @@ -9814,7 +9814,7 @@ components: text: '## Some test markdown - ```js + ``` var x, y; @@ -9974,7 +9974,7 @@ components: text: '## Some test markdown - ```js + ``` var x, y; diff --git a/cassettes/features/v1/notebooks/Create-a-notebook-returns-OK-response.frozen b/cassettes/features/v1/notebooks/Create-a-notebook-returns-OK-response.frozen index cf29490a0111..73e25c10492e 100644 --- a/cassettes/features/v1/notebooks/Create-a-notebook-returns-OK-response.frozen +++ b/cassettes/features/v1/notebooks/Create-a-notebook-returns-OK-response.frozen @@ -1 +1 @@ -2022-05-12T09:50:05.590Z \ No newline at end of file +2025-10-03T14:49:56.873Z \ No newline at end of file diff --git a/cassettes/features/v1/notebooks/Create-a-notebook-returns-OK-response.yml b/cassettes/features/v1/notebooks/Create-a-notebook-returns-OK-response.yml index 696a8a7126b8..f6cae52cf02c 100644 --- a/cassettes/features/v1/notebooks/Create-a-notebook-returns-OK-response.yml +++ b/cassettes/features/v1/notebooks/Create-a-notebook-returns-OK-response.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Thu, 12 May 2022 09:50:05 GMT +- recorded_at: Fri, 03 Oct 2025 14:49:56 GMT request: body: encoding: UTF-8 string: '{"data":{"attributes":{"cells":[{"attributes":{"definition":{"text":"## - Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```","type":"markdown"}},"type":"notebook_cells"},{"attributes":{"definition":{"requests":[{"display_type":"line","q":"avg:system.load.1{*}","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"type":"timeseries","yaxis":{"scale":"linear"}},"graph_size":"m","split_by":{"keys":[],"tags":[]},"time":null},"type":"notebook_cells"}],"name":"Test-Create_a_notebook_returns_OK_response-1652349005","status":"published","time":{"live_span":"1h"}},"type":"notebooks"}}' + Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```","type":"markdown"}},"type":"notebook_cells"},{"attributes":{"definition":{"requests":[{"display_type":"line","q":"avg:system.load.1{*}","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"type":"timeseries","yaxis":{"scale":"linear"}},"graph_size":"m","split_by":{"keys":[],"tags":[]},"time":null},"type":"notebook_cells"}],"name":"Test-Create_a_notebook_returns_OK_response-1759502996","status":"published","time":{"live_span":"1h"}},"type":"notebooks"}}' headers: Accept: - application/json @@ -15,27 +15,32 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"notebooks","id":2466031,"attributes":{"name":"Test-Create_a_notebook_returns_OK_response-1652349005","cells":[{"attributes":{"definition":{"text":"## - Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```","type":"markdown"}},"type":"notebook_cells","id":"1eb30d08"},{"attributes":{"definition":{"requests":[{"q":"avg:system.load.1{*}","style":{"line_width":"normal","palette":"dog_classic","line_type":"solid"},"display_type":"line"}],"type":"timeseries","show_legend":true,"yaxis":{"scale":"linear"}},"graph_size":"m","split_by":{"keys":[],"tags":[]},"time":null},"type":"notebook_cells","id":"k0c63hgi"}],"time":{"live_span":"1h"},"metadata":{"is_favorite":false,"is_template":false,"type":null,"take_snapshots":false},"template_variables":[],"status":"published","modified":"2022-05-12T09:50:06.026505+00:00","created":"2022-05-12T09:50:06.026505+00:00","author":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"status":"Active"}}}}' + string: '{"data":{"type":"notebooks","id":13244449,"attributes":{"name":"Test-Create_a_notebook_returns_OK_response-1759502996","cells":[{"type":"notebook_cells","id":"p2ywawtx","attributes":{"definition":{"type":"markdown","text":"## + Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```"}}},{"type":"notebook_cells","attributes":{"time":null,"split_by":{"keys":[],"tags":[]},"definition":{"type":"timeseries","requests":[{"display_type":"line","q":"avg:system.load.1{*}","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"yaxis":{"scale":"linear"}},"graph_size":"m"},"id":"g9sa14n1"}],"time":{"live_span":"1h"},"metadata":{"take_snapshots":false,"is_template":false,"is_favorite":false,"type":null},"template_variables":[],"status":"published","modified":"2025-10-03T14:49:57.096812+00:00","created":"2025-10-03T14:49:57.096812+00:00","deleted":null,"tags":null,"author":{"name":"CI + Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","created_at":"2020-12-29T22:58:44.733921+00:00","email":"team-intg-tools-libs-spam@datadoghq.com","icon":"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro","title":null,"verified":true,"disabled":false,"status":"Active"}}}} + + ' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Thu, 12 May 2022 09:50:05 GMT +- recorded_at: Fri, 03 Oct 2025 14:49:56 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v1/notebooks/2466031 + uri: https://api.datadoghq.com/api/v1/notebooks/13244449 response: body: encoding: UTF-8 string: '' - headers: {} + headers: + Content-Type: + - text/html; charset=utf-8 status: code: 204 message: No Content diff --git a/cassettes/features/v1/notebooks/Update-a-notebook-returns-OK-response.yml b/cassettes/features/v1/notebooks/Update-a-notebook-returns-OK-response.yml index f7f31d08c213..46318fe70559 100644 --- a/cassettes/features/v1/notebooks/Update-a-notebook-returns-OK-response.yml +++ b/cassettes/features/v1/notebooks/Update-a-notebook-returns-OK-response.yml @@ -28,7 +28,7 @@ http_interactions: body: encoding: UTF-8 string: '{"data":{"attributes":{"cells":[{"attributes":{"definition":{"text":"## - Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```","type":"markdown"}},"type":"notebook_cells"},{"attributes":{"definition":{"requests":[{"display_type":"line","q":"avg:system.load.1{*}","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"type":"timeseries","yaxis":{"scale":"linear"}},"graph_size":"m","split_by":{"keys":[],"tags":[]},"time":null},"type":"notebook_cells"}],"name":"Test-Update_a_notebook_returns_OK_response-1652349010-updated","status":"published","time":{"live_span":"1h"}},"type":"notebooks"}}' + Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```","type":"markdown"}},"type":"notebook_cells"},{"attributes":{"definition":{"requests":[{"display_type":"line","q":"avg:system.load.1{*}","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"type":"timeseries","yaxis":{"scale":"linear"}},"graph_size":"m","split_by":{"keys":[],"tags":[]},"time":null},"type":"notebook_cells"}],"name":"Test-Update_a_notebook_returns_OK_response-1652349010-updated","status":"published","time":{"live_span":"1h"}},"type":"notebooks"}}' headers: Accept: - application/json @@ -40,7 +40,7 @@ http_interactions: body: encoding: UTF-8 string: '{"data":{"type":"notebooks","id":2466034,"attributes":{"name":"Test-Update_a_notebook_returns_OK_response-1652349010-updated","cells":[{"attributes":{"definition":{"text":"## - Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```","type":"markdown"}},"type":"notebook_cells","id":"7th9aiq2"},{"attributes":{"definition":{"requests":[{"q":"avg:system.load.1{*}","style":{"line_width":"normal","palette":"dog_classic","line_type":"solid"},"display_type":"line"}],"type":"timeseries","show_legend":true,"yaxis":{"scale":"linear"}},"graph_size":"m","split_by":{"keys":[],"tags":[]},"time":null},"type":"notebook_cells","id":"dvsx205s"}],"time":{"live_span":"1h"},"metadata":{"is_favorite":false,"is_template":false,"type":null,"take_snapshots":false},"template_variables":[],"status":"published","modified":"2022-05-12T09:50:10.903600+00:00","created":"2022-05-12T09:50:10.418530+00:00","author":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"status":"Active"}}}}' + Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```","type":"markdown"}},"type":"notebook_cells","id":"7th9aiq2"},{"attributes":{"definition":{"requests":[{"q":"avg:system.load.1{*}","style":{"line_width":"normal","palette":"dog_classic","line_type":"solid"},"display_type":"line"}],"type":"timeseries","show_legend":true,"yaxis":{"scale":"linear"}},"graph_size":"m","split_by":{"keys":[],"tags":[]},"time":null},"type":"notebook_cells","id":"dvsx205s"}],"time":{"live_span":"1h"},"metadata":{"is_favorite":false,"is_template":false,"type":null,"take_snapshots":false},"template_variables":[],"status":"published","modified":"2022-05-12T09:50:10.903600+00:00","created":"2022-05-12T09:50:10.418530+00:00","author":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"disabled":false,"status":"Active"}}}}' headers: Content-Type: - application/json diff --git a/examples/v1/logs-pipelines/CreateLogsPipeline.rb b/examples/v1/logs-pipelines/CreateLogsPipeline.rb index d6646a9fc3f9..78104004e3d2 100644 --- a/examples/v1/logs-pipelines/CreateLogsPipeline.rb +++ b/examples/v1/logs-pipelines/CreateLogsPipeline.rb @@ -11,8 +11,8 @@ processors: [ DatadogAPIClient::V1::LogsGrokParser.new({ grok: DatadogAPIClient::V1::LogsGrokParserRules.new({ - match_rules: 'rule_name_1 foo\nrule_name_2 bar\n', - support_rules: 'rule_name_1 foo\nrule_name_2 bar\n', + match_rules: 'rule_name_1 foo\nrule_name_2 bar', + support_rules: 'rule_name_1 foo\nrule_name_2 bar', }), is_enabled: false, samples: [], diff --git a/examples/v1/logs-pipelines/UpdateLogsPipeline.rb b/examples/v1/logs-pipelines/UpdateLogsPipeline.rb index 74765e7967e5..48a5147133f4 100644 --- a/examples/v1/logs-pipelines/UpdateLogsPipeline.rb +++ b/examples/v1/logs-pipelines/UpdateLogsPipeline.rb @@ -11,8 +11,8 @@ processors: [ DatadogAPIClient::V1::LogsGrokParser.new({ grok: DatadogAPIClient::V1::LogsGrokParserRules.new({ - match_rules: 'rule_name_1 foo\nrule_name_2 bar\n', - support_rules: 'rule_name_1 foo\nrule_name_2 bar\n', + match_rules: 'rule_name_1 foo\nrule_name_2 bar', + support_rules: 'rule_name_1 foo\nrule_name_2 bar', }), is_enabled: false, samples: [], diff --git a/examples/v1/notebooks/CreateNotebook.rb b/examples/v1/notebooks/CreateNotebook.rb index ccbc7b3a0038..8b9ed30788a5 100644 --- a/examples/v1/notebooks/CreateNotebook.rb +++ b/examples/v1/notebooks/CreateNotebook.rb @@ -10,7 +10,7 @@ DatadogAPIClient::V1::NotebookCellCreateRequest.new({ attributes: DatadogAPIClient::V1::NotebookMarkdownCellAttributes.new({ definition: DatadogAPIClient::V1::NotebookMarkdownCellDefinition.new({ - text: '## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```', + text: '## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```', type: DatadogAPIClient::V1::NotebookMarkdownCellDefinitionType::MARKDOWN, }), }), diff --git a/examples/v1/notebooks/UpdateNotebook.rb b/examples/v1/notebooks/UpdateNotebook.rb index b9b257c1288f..af14e2f8d4ef 100644 --- a/examples/v1/notebooks/UpdateNotebook.rb +++ b/examples/v1/notebooks/UpdateNotebook.rb @@ -13,7 +13,7 @@ DatadogAPIClient::V1::NotebookCellCreateRequest.new({ attributes: DatadogAPIClient::V1::NotebookMarkdownCellAttributes.new({ definition: DatadogAPIClient::V1::NotebookMarkdownCellDefinition.new({ - text: '## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```', + text: '## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```', type: DatadogAPIClient::V1::NotebookMarkdownCellDefinitionType::MARKDOWN, }), }), diff --git a/features/v1/logs_pipelines.feature b/features/v1/logs_pipelines.feature index 66305bbbaf2c..cdb150dd6edf 100644 --- a/features/v1/logs_pipelines.feature +++ b/features/v1/logs_pipelines.feature @@ -24,14 +24,14 @@ Feature: Logs Pipelines @generated @skip @team:DataDog/event-platform-experience Scenario: Create a pipeline returns "Bad Request" response Given new "CreateLogsPipeline" request - And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} + And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/event-platform-experience Scenario: Create a pipeline returns "OK" response Given new "CreateLogsPipeline" request - And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} + And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} When the request is sent Then the response status is 200 OK @@ -128,7 +128,7 @@ Feature: Logs Pipelines Scenario: Update a pipeline returns "Bad Request" response Given new "UpdateLogsPipeline" request And request contains "pipeline_id" parameter from "REPLACE.ME" - And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} + And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} When the request is sent Then the response status is 400 Bad Request @@ -136,7 +136,7 @@ Feature: Logs Pipelines Scenario: Update a pipeline returns "OK" response Given new "UpdateLogsPipeline" request And request contains "pipeline_id" parameter from "REPLACE.ME" - And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} + And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar", "support_rules": "rule_name_1 foo\nrule_name_2 bar"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []} When the request is sent Then the response status is 200 OK diff --git a/features/v1/notebooks.feature b/features/v1/notebooks.feature index 2788eb421e5c..3ff8343c9b19 100644 --- a/features/v1/notebooks.feature +++ b/features/v1/notebooks.feature @@ -13,19 +13,19 @@ Feature: Notebooks @generated @skip @team:DataDog/notebooks Scenario: Create a notebook returns "Bad Request" response Given new "CreateNotebook" request - And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} When the request is sent Then the response status is 400 Bad Request @team:DataDog/notebooks Scenario: Create a notebook returns "OK" response Given new "CreateNotebook" request - And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "name": "{{ unique }}", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "name": "{{ unique }}", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "notebooks" And the response "data.attributes.name" is equal to "{{ unique }}" - And the response "data.attributes.cells[0].attributes.definition.text" is equal to "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```" + And the response "data.attributes.cells[0].attributes.definition.text" is equal to "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```" @skip @team:DataDog/notebooks Scenario: Delete a notebook returns "Bad Request" response @@ -98,7 +98,7 @@ Feature: Notebooks Scenario: Update a notebook returns "Bad Request" response Given new "UpdateNotebook" request And request contains "notebook_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} When the request is sent Then the response status is 400 Bad Request @@ -106,7 +106,7 @@ Feature: Notebooks Scenario: Update a notebook returns "Conflict" response Given new "UpdateNotebook" request And request contains "notebook_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} When the request is sent Then the response status is 409 Conflict @@ -114,7 +114,7 @@ Feature: Notebooks Scenario: Update a notebook returns "Not Found" response Given new "UpdateNotebook" request And request contains "notebook_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} When the request is sent Then the response status is 404 Not Found @@ -123,7 +123,7 @@ Feature: Notebooks Given new "UpdateNotebook" request And there is a valid "notebook" in the system And request contains "notebook_id" parameter from "notebook.data.id" - And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "name": "{{ unique }}-updated", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "name": "{{ unique }}-updated", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} When the request is sent Then the response status is 200 OK And the response "data.attributes.name" is equal to "{{ unique }}-updated"