Skip to content

Commit

Permalink
Regenerate client from commit 0563dbc3 of spec repo (#1210)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: skarimo <40482491+skarimo@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 1, 2023
1 parent 81ab921 commit 4fe5268
Show file tree
Hide file tree
Showing 12 changed files with 533 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.4",
"regenerated": "2023-02-01 09:26:43.902164",
"spec_repo_commit": "a0ca58a8"
"regenerated": "2023-02-01 12:21:37.018659",
"spec_repo_commit": "0563dbc3"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-02-01 09:26:43.913917",
"spec_repo_commit": "a0ca58a8"
"regenerated": "2023-02-01 12:21:37.033033",
"spec_repo_commit": "0563dbc3"
}
}
}
60 changes: 60 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8725,6 +8725,65 @@ components:
page:
$ref: '#/components/schemas/Pagination'
type: object
RunWorkflowWidgetDefinition:
description: Run workflow is widget that allows you to run a workflow from a
dashboard.
properties:
custom_links:
description: List of custom links.
items:
$ref: '#/components/schemas/WidgetCustomLink'
type: array
inputs:
description: Array of workflow inputs to map to dashboard template variables.
items:
$ref: '#/components/schemas/RunWorkflowWidgetInput'
type: array
time:
$ref: '#/components/schemas/WidgetTime'
title:
description: Title of your widget.
type: string
title_align:
$ref: '#/components/schemas/WidgetTextAlign'
title_size:
description: Size of the title.
type: string
type:
$ref: '#/components/schemas/RunWorkflowWidgetDefinitionType'
workflow_id:
description: Workflow id.
example: <workflow_id>
type: string
required:
- type
- workflow_id
type: object
RunWorkflowWidgetDefinitionType:
default: run_workflow
description: Type of the run workflow widget.
enum:
- run_workflow
example: run_workflow
type: string
x-enum-varnames:
- RUN_WORKFLOW
RunWorkflowWidgetInput:
description: Object to map a dashboard template variable to a workflow input.
properties:
name:
description: Name of the workflow input.
example: Environment
type: string
value:
description: Dashboard template variable. Can be suffixed with '.value'
or '.key'.
example: $env.value
type: string
required:
- name
- value
type: object
SLOBulkDelete:
additionalProperties:
description: An array of all SLO timeframes.
Expand Down Expand Up @@ -18278,6 +18337,7 @@ components:
- $ref: '#/components/schemas/MonitorSummaryWidgetDefinition'
- $ref: '#/components/schemas/NoteWidgetDefinition'
- $ref: '#/components/schemas/QueryValueWidgetDefinition'
- $ref: '#/components/schemas/RunWorkflowWidgetDefinition'
- $ref: '#/components/schemas/ScatterPlotWidgetDefinition'
- $ref: '#/components/schemas/SLOWidgetDefinition'
- $ref: '#/components/schemas/SLOListWidgetDefinition'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-01-26T10:05:59.820Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions examples/v1/dashboards/CreateDashboard_2610827685.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Create a new dashboard with run-workflow widget

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::DashboardsAPI.new

body = DatadogAPIClient::V1::Dashboard.new({
title: "Example-Create_a_new_dashboard_with_run_workflow_widget",
description: "",
widgets: [
DatadogAPIClient::V1::Widget.new({
layout: DatadogAPIClient::V1::WidgetLayout.new({
x: 0,
y: 0,
width: 47,
height: 15,
}),
definition: DatadogAPIClient::V1::RunWorkflowWidgetDefinition.new({
title: "Run workflow title",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
time: DatadogAPIClient::V1::WidgetTime.new({}),
type: DatadogAPIClient::V1::RunWorkflowWidgetDefinitionType::RUN_WORKFLOW,
workflow_id: "2e055f16-8b6a-4cdd-b452-17a34c44b160",
inputs: [
DatadogAPIClient::V1::RunWorkflowWidgetInput.new({
name: "environment",
value: "$env.value",
}),
],
}),
}),
],
template_variables: [],
layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE,
is_read_only: false,
notify_list: [],
})
p api_instance.create_dashboard(body)
10 changes: 10 additions & 0 deletions features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,16 @@ Feature: Dashboards
When the request is sent
Then the response status is 200 OK

@team:DataDog/dashboards
Scenario: Create a new dashboard with run-workflow widget
Given new "CreateDashboard" request
And body from file "dashboards_json_payload/run_workflow_widget.json"
When the request is sent
Then the response status is 200 OK
And the response "widgets[0].definition.type" is equal to "run_workflow"
And the response "widgets[0].definition.workflow_id" is equal to "2e055f16-8b6a-4cdd-b452-17a34c44b160"
And the response "widgets[0].definition.inputs[0]" is equal to {"name": "environment", "value": "$env.value"}

@team:DataDog/dashboards
Scenario: Create a new dashboard with scatterplot widget
Given new "CreateDashboard" request
Expand Down
32 changes: 32 additions & 0 deletions features/v1/dashboards_json_payload/run_workflow_widget.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"title": "{{ unique }}",
"description": "",
"widgets": [
{
"layout": {
"x": 0,
"y": 0,
"width": 47,
"height": 15
},
"definition": {
"title": "Run workflow title",
"title_size": "16",
"title_align": "left",
"time": {},
"type": "run_workflow",
"workflow_id": "2e055f16-8b6a-4cdd-b452-17a34c44b160",
"inputs": [
{
"name": "environment",
"value": "$env.value"
}
]
}
}
],
"template_variables": [],
"layout_type": "free",
"is_read_only": false,
"notify_list": []
}
3 changes: 3 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@ def overrides
"v1.query_value_widget_request" => "QueryValueWidgetRequest",
"v1.reference_table_logs_lookup_processor" => "ReferenceTableLogsLookupProcessor",
"v1.response_meta_attributes" => "ResponseMetaAttributes",
"v1.run_workflow_widget_definition" => "RunWorkflowWidgetDefinition",
"v1.run_workflow_widget_definition_type" => "RunWorkflowWidgetDefinitionType",
"v1.run_workflow_widget_input" => "RunWorkflowWidgetInput",
"v1.scatterplot_dimension" => "ScatterplotDimension",
"v1.scatter_plot_request" => "ScatterPlotRequest",
"v1.scatterplot_table_request" => "ScatterplotTableRequest",
Expand Down
Loading

0 comments on commit 4fe5268

Please sign in to comment.