Skip to content

Commit 15abb7a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Remove js codeblock prefix from Notebooks API Spec (#3388)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 9f5763c commit 15abb7a

File tree

10 files changed

+33
-32
lines changed

10 files changed

+33
-32
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.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ func main() {
2323
LogsGrokParser: &datadogV1.LogsGrokParser{
2424
Grok: datadogV1.LogsGrokParserRules{
2525
MatchRules: `rule_name_1 foo
26-
rule_name_2 bar
27-
`,
26+
rule_name_2 bar`,
2827
SupportRules: datadog.PtrString(`rule_name_1 foo
29-
rule_name_2 bar
30-
`),
28+
rule_name_2 bar`),
3129
},
3230
IsEnabled: datadog.PtrBool(false),
3331
Samples: []string{},

examples/v1/logs-pipelines/UpdateLogsPipeline.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ func main() {
2323
LogsGrokParser: &datadogV1.LogsGrokParser{
2424
Grok: datadogV1.LogsGrokParserRules{
2525
MatchRules: `rule_name_1 foo
26-
rule_name_2 bar
27-
`,
26+
rule_name_2 bar`,
2827
SupportRules: datadog.PtrString(`rule_name_1 foo
29-
rule_name_2 bar
30-
`),
28+
rule_name_2 bar`),
3129
},
3230
IsEnabled: datadog.PtrBool(false),
3331
Samples: []string{},

examples/v1/notebooks/CreateNotebook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func main() {
2323
Definition: datadogV1.NotebookMarkdownCellDefinition{
2424
Text: `## Some test markdown
2525
26-
` + "```" + `js
26+
` + "```" + `
2727
var x, y;
2828
x = 5;
2929
y = 6;

examples/v1/notebooks/UpdateNotebook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func main() {
2828
Definition: datadogV1.NotebookMarkdownCellDefinition{
2929
Text: `## Some test markdown
3030
31-
` + "```" + `js
31+
` + "```" + `
3232
var x, y;
3333
x = 5;
3434
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/TestScenarios/v1/Feature_Notebooks/Scenario_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: |
4-
{"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"}}
4+
{"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"}}
55
form: {}
66
headers:
77
Accept:
@@ -12,8 +12,11 @@ interactions:
1212
method: POST
1313
url: https://api.datadoghq.com/api/v1/notebooks
1414
response:
15-
body: '{"data":{"type":"notebooks","id":2466031,"attributes":{"name":"Test-Create_a_notebook_returns_OK_response-1652349005","cells":[{"attributes":{"definition":{"text":"##
16-
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"}}}}'
15+
body: '{"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":"##
16+
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
17+
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"}}}}
18+
19+
'
1720
code: 200
1821
duration: 0ms
1922
headers:
@@ -28,11 +31,13 @@ interactions:
2831
- '*/*'
2932
id: 1
3033
method: DELETE
31-
url: https://api.datadoghq.com/api/v1/notebooks/2466031
34+
url: https://api.datadoghq.com/api/v1/notebooks/13244449
3235
response:
3336
body: ''
3437
code: 204
3538
duration: 0ms
36-
headers: {}
39+
headers:
40+
Content-Type:
41+
- text/html; charset=utf-8
3742
status: 204 No Content
3843
version: 2

tests/scenarios/cassettes/TestScenarios/v1/Feature_Notebooks/Scenario_Update_a_notebook_returns_OK_response.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ interactions:
2222
status: 200 OK
2323
- request:
2424
body: |
25-
{"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"}}
25+
{"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"}}
2626
form: {}
2727
headers:
2828
Accept:
@@ -34,7 +34,7 @@ interactions:
3434
url: https://api.datadoghq.com/api/v1/notebooks/2466034
3535
response:
3636
body: '{"data":{"type":"notebooks","id":2466034,"attributes":{"name":"Test-Update_a_notebook_returns_OK_response-1652349010-updated","cells":[{"attributes":{"definition":{"text":"##
37-
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"}}}}'
37+
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"}}}}'
3838
code: 200
3939
duration: 0ms
4040
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)