Skip to content

Commit aa7b37c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Remove js codeblock prefix from Notebooks API Spec (#950)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent eb56078 commit aa7b37c

10 files changed

+37
-37
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.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ async fn main() {
1616
LogsGrokParser::new(
1717
LogsGrokParserRules::new(
1818
r#"rule_name_1 foo
19-
rule_name_2 bar
20-
"#
21-
.to_string(),
19+
rule_name_2 bar"#
20+
.to_string(),
2221
)
2322
.support_rules(
2423
r#"rule_name_1 foo
25-
rule_name_2 bar
26-
"#
27-
.to_string(),
24+
rule_name_2 bar"#
25+
.to_string(),
2826
),
2927
"message".to_string(),
3028
LogsGrokParserType::GROK_PARSER,

examples/v1_logs-pipelines_UpdateLogsPipeline.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ async fn main() {
1616
LogsGrokParser::new(
1717
LogsGrokParserRules::new(
1818
r#"rule_name_1 foo
19-
rule_name_2 bar
20-
"#
21-
.to_string(),
19+
rule_name_2 bar"#
20+
.to_string(),
2221
)
2322
.support_rules(
2423
r#"rule_name_1 foo
25-
rule_name_2 bar
26-
"#
27-
.to_string(),
24+
rule_name_2 bar"#
25+
.to_string(),
2826
),
2927
"message".to_string(),
3028
LogsGrokParserType::GROK_PARSER,

examples/v1_notebooks_CreateNotebook.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async fn main() {
3737
NotebookMarkdownCellAttributes::new(NotebookMarkdownCellDefinition::new(
3838
r#"## Some test markdown
3939
40-
```js
40+
```
4141
var x, y;
4242
x = 5;
4343
y = 6;

examples/v1_notebooks_UpdateNotebook.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async fn main() {
4242
NotebookMarkdownCellDefinition::new(
4343
r#"## Some test markdown
4444
45-
```js
45+
```
4646
var x, y;
4747
x = 5;
4848
y = 6;
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/scenarios/cassettes/v1/notebooks/Create-a-notebook-returns-OK-response.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"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\"}}",
6+
"string": "{\"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\":\"Test-Create_a_notebook_returns_OK_response-1759502996\",\"status\":\"published\",\"time\":{\"live_span\":\"1h\"}},\"type\":\"notebooks\"}}",
77
"encoding": null
88
},
99
"headers": {
@@ -19,7 +19,7 @@
1919
},
2020
"response": {
2121
"body": {
22-
"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\":\"[email protected]\",\"email\":\"[email protected]\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"disabled\":false,\"status\":\"Active\"}}}}",
22+
"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\":\"[email protected]\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"title\":null,\"verified\":true,\"disabled\":false,\"status\":\"Active\"}}}}\n",
2323
"encoding": null
2424
},
2525
"headers": {
@@ -32,7 +32,7 @@
3232
"message": "OK"
3333
}
3434
},
35-
"recorded_at": "Thu, 12 May 2022 09:50:05 GMT"
35+
"recorded_at": "Fri, 03 Oct 2025 14:49:56 GMT"
3636
},
3737
{
3838
"request": {
@@ -43,20 +43,24 @@
4343
]
4444
},
4545
"method": "delete",
46-
"uri": "https://api.datadoghq.com/api/v1/notebooks/2466031"
46+
"uri": "https://api.datadoghq.com/api/v1/notebooks/13244449"
4747
},
4848
"response": {
4949
"body": {
5050
"string": "",
5151
"encoding": null
5252
},
53-
"headers": {},
53+
"headers": {
54+
"Content-Type": [
55+
"text/html; charset=utf-8"
56+
]
57+
},
5458
"status": {
5559
"code": 204,
5660
"message": "No Content"
5761
}
5862
},
59-
"recorded_at": "Thu, 12 May 2022 09:50:05 GMT"
63+
"recorded_at": "Fri, 03 Oct 2025 14:49:56 GMT"
6064
}
6165
],
6266
"recorded_with": "VCR 6.0.0"

tests/scenarios/cassettes/v1/notebooks/Update-a-notebook-returns-OK-response.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
{
3838
"request": {
3939
"body": {
40-
"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\"}}",
40+
"string": "{\"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\":\"Test-Update_a_notebook_returns_OK_response-1652349010-updated\",\"status\":\"published\",\"time\":{\"live_span\":\"1h\"}},\"type\":\"notebooks\"}}",
4141
"encoding": null
4242
},
4343
"headers": {
@@ -53,7 +53,7 @@
5353
},
5454
"response": {
5555
"body": {
56-
"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\":\"[email protected]\",\"email\":\"[email protected]\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"disabled\":false,\"status\":\"Active\"}}}}",
56+
"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```\\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\":\"[email protected]\",\"email\":\"[email protected]\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"disabled\":false,\"status\":\"Active\"}}}}",
5757
"encoding": null
5858
},
5959
"headers": {

tests/scenarios/features/v1/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)