Skip to content

Commit 14ca95b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Remove js codeblock prefix from Notebooks API Spec (#2870)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 6e8e489 commit 14ca95b

File tree

10 files changed

+33
-28
lines changed

10 files changed

+33
-28
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9572,7 +9572,7 @@ components:
95729572
text: '## Some test markdown
95739573

95749574

9575-
```js
9575+
```
95769576

95779577
var x, y;
95789578

@@ -9814,7 +9814,7 @@ components:
98149814
text: '## Some test markdown
98159815

98169816

9817-
```js
9817+
```
98189818

98199819
var x, y;
98209820

@@ -9974,7 +9974,7 @@ components:
99749974
text: '## Some test markdown
99759975

99769976

9977-
```js
9977+
```
99789978

99799979
var x, y;
99809980

examples/v1/logs-pipelines/CreateLogsPipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
processors=[
1919
LogsGrokParser(
2020
grok=LogsGrokParserRules(
21-
match_rules="rule_name_1 foo\nrule_name_2 bar\n",
22-
support_rules="rule_name_1 foo\nrule_name_2 bar\n",
21+
match_rules="rule_name_1 foo\nrule_name_2 bar",
22+
support_rules="rule_name_1 foo\nrule_name_2 bar",
2323
),
2424
is_enabled=False,
2525
samples=[],

examples/v1/logs-pipelines/UpdateLogsPipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
processors=[
1919
LogsGrokParser(
2020
grok=LogsGrokParserRules(
21-
match_rules="rule_name_1 foo\nrule_name_2 bar\n",
22-
support_rules="rule_name_1 foo\nrule_name_2 bar\n",
21+
match_rules="rule_name_1 foo\nrule_name_2 bar",
22+
support_rules="rule_name_1 foo\nrule_name_2 bar",
2323
),
2424
is_enabled=False,
2525
samples=[],

examples/v1/notebooks/CreateNotebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
NotebookCellCreateRequest(
3636
attributes=NotebookMarkdownCellAttributes(
3737
definition=NotebookMarkdownCellDefinition(
38-
text="## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```",
38+
text="## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```",
3939
type=NotebookMarkdownCellDefinitionType.MARKDOWN,
4040
),
4141
),

examples/v1/notebooks/UpdateNotebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
NotebookCellCreateRequest(
4040
attributes=NotebookMarkdownCellAttributes(
4141
definition=NotebookMarkdownCellDefinition(
42-
text="## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```",
42+
text="## Some test markdown\n\n```\nvar x, y;\nx = 5;\ny = 6;\n```",
4343
type=NotebookMarkdownCellDefinitionType.MARKDOWN,
4444
),
4545
),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2022-05-12T09:50:05.590Z
1+
2025-10-03T14:49:56.873Z

tests/v1/cassettes/test_scenarios/test_create_a_notebook_returns_ok_response.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interactions:
22
- request:
33
body: '{"data":{"attributes":{"cells":[{"attributes":{"definition":{"text":"##
4-
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"}}'
4+
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"}}'
55
headers:
66
accept:
77
- application/json
@@ -11,8 +11,11 @@ interactions:
1111
uri: https://api.datadoghq.com/api/v1/notebooks
1212
response:
1313
body:
14-
string: '{"data":{"type":"notebooks","id":2466031,"attributes":{"name":"Test-Create_a_notebook_returns_OK_response-1652349005","cells":[{"attributes":{"definition":{"text":"##
15-
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"}}}}'
14+
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":"##
15+
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
16+
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"}}}}
17+
18+
'
1619
headers:
1720
content-type:
1821
- application/json
@@ -25,11 +28,13 @@ interactions:
2528
accept:
2629
- '*/*'
2730
method: DELETE
28-
uri: https://api.datadoghq.com/api/v1/notebooks/2466031
31+
uri: https://api.datadoghq.com/api/v1/notebooks/13244449
2932
response:
3033
body:
3134
string: ''
32-
headers: {}
35+
headers:
36+
content-type:
37+
- text/html; charset=utf-8
3338
status:
3439
code: 204
3540
message: No Content

tests/v1/cassettes/test_scenarios/test_update_a_notebook_returns_ok_response.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interactions:
2121
message: OK
2222
- request:
2323
body: '{"data":{"attributes":{"cells":[{"attributes":{"definition":{"text":"##
24-
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"}}'
24+
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"}}'
2525
headers:
2626
accept:
2727
- application/json
@@ -32,7 +32,7 @@ interactions:
3232
response:
3333
body:
3434
string: '{"data":{"type":"notebooks","id":2466034,"attributes":{"name":"Test-Update_a_notebook_returns_OK_response-1652349010-updated","cells":[{"attributes":{"definition":{"text":"##
35-
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"}}}}'
35+
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"}}}}'
3636
headers:
3737
content-type:
3838
- application/json

tests/v1/features/logs_pipelines.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ Feature: Logs Pipelines
2424
@generated @skip @team:DataDog/event-platform-experience
2525
Scenario: Create a pipeline returns "Bad Request" response
2626
Given new "CreateLogsPipeline" request
27-
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": []}
27+
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": []}
2828
When the request is sent
2929
Then the response status is 400 Bad Request
3030

3131
@generated @skip @team:DataDog/event-platform-experience
3232
Scenario: Create a pipeline returns "OK" response
3333
Given new "CreateLogsPipeline" request
34-
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": []}
34+
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": []}
3535
When the request is sent
3636
Then the response status is 200 OK
3737

@@ -128,15 +128,15 @@ Feature: Logs Pipelines
128128
Scenario: Update a pipeline returns "Bad Request" response
129129
Given new "UpdateLogsPipeline" request
130130
And request contains "pipeline_id" parameter from "REPLACE.ME"
131-
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": []}
131+
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": []}
132132
When the request is sent
133133
Then the response status is 400 Bad Request
134134

135135
@generated @skip @team:DataDog/event-platform-experience
136136
Scenario: Update a pipeline returns "OK" response
137137
Given new "UpdateLogsPipeline" request
138138
And request contains "pipeline_id" parameter from "REPLACE.ME"
139-
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": []}
139+
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": []}
140140
When the request is sent
141141
Then the response status is 200 OK
142142

0 commit comments

Comments
 (0)