Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
594 changes: 594 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions examples/v2/widgets/CreateWidget.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Create a widget returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::WidgetsAPI.new

body = DatadogAPIClient::V2::CreateOrUpdateWidgetRequest.new({
data: DatadogAPIClient::V2::CreateOrUpdateWidgetRequestData.new({
attributes: DatadogAPIClient::V2::CreateOrUpdateWidgetRequestAttributes.new({
definition: DatadogAPIClient::V2::WidgetDefinition.new({
title: "My Widget",
type: DatadogAPIClient::V2::WidgetType::BAR_CHART,
}),
tags: [],
}),
type: "widgets",
}),
})
p api_instance.create_widget(WidgetExperienceType::CCM_REPORTS, body)
5 changes: 5 additions & 0 deletions examples/v2/widgets/DeleteWidget.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete a widget returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::WidgetsAPI.new
api_instance.delete_widget(WidgetExperienceType::CCM_REPORTS, "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
5 changes: 5 additions & 0 deletions examples/v2/widgets/GetWidget.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a widget returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::WidgetsAPI.new
p api_instance.get_widget(WidgetExperienceType::CCM_REPORTS, "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
5 changes: 5 additions & 0 deletions examples/v2/widgets/SearchWidgets.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Search widgets returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::WidgetsAPI.new
p api_instance.search_widgets(WidgetExperienceType::CCM_REPORTS)
18 changes: 18 additions & 0 deletions examples/v2/widgets/UpdateWidget.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Update a widget returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::WidgetsAPI.new

body = DatadogAPIClient::V2::CreateOrUpdateWidgetRequest.new({
data: DatadogAPIClient::V2::CreateOrUpdateWidgetRequestData.new({
attributes: DatadogAPIClient::V2::CreateOrUpdateWidgetRequestAttributes.new({
definition: DatadogAPIClient::V2::WidgetDefinition.new({
title: "My Widget",
type: DatadogAPIClient::V2::WidgetType::BAR_CHART,
}),
tags: [],
}),
type: "widgets",
}),
})
p api_instance.update_widget(WidgetExperienceType::CCM_REPORTS, "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
28 changes: 28 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4164,6 +4164,34 @@
"v2.ListUserPermissions" => {
"user_id" => "String",
},
"v2.SearchWidgets" => {
"experience_type" => "WidgetExperienceType",
"filter_widget_type" => "WidgetType",
"filter_creator_handle" => "String",
"filter_is_favorited" => "Boolean",
"filter_title" => "String",
"filter_tags" => "String",
"sort" => "String",
"page_number" => "Integer",
"page_size" => "Integer",
},
"v2.CreateWidget" => {
"experience_type" => "WidgetExperienceType",
"body" => "CreateOrUpdateWidgetRequest",
},
"v2.DeleteWidget" => {
"experience_type" => "WidgetExperienceType",
"uuid" => "UUID",
},
"v2.GetWidget" => {
"experience_type" => "WidgetExperienceType",
"uuid" => "UUID",
},
"v2.UpdateWidget" => {
"experience_type" => "WidgetExperienceType",
"uuid" => "UUID",
"body" => "CreateOrUpdateWidgetRequest",
},
"v2.CreateWorkflow" => {
"body" => "CreateWorkflowRequest",
},
Expand Down
4 changes: 2 additions & 2 deletions features/v1/authentication.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Feature: Authentication
Given an instance of "Authentication" API
And new "Validate" request

@skip-validation @team:DataDog/credentials-management
@skip-validation @team:DataDog/credential-management
Scenario: Validate API key returns "Forbidden" response
When the request is sent
Then the response status is 403 OK

@team:DataDog/credentials-management
@team:DataDog/credential-management
Scenario: Validate API key returns "OK" response
Given a valid "apiKeyAuth" key in the system
When the request is sent
Expand Down
46 changes: 23 additions & 23 deletions features/v1/key_management.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,166 +12,166 @@ Feature: Key Management
And a valid "appKeyAuth" key in the system
And an instance of "KeyManagement" API

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Create an API key returns "Bad Request" response
Given new "CreateAPIKey" request
And body with value {"name": "example user"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Create an API key returns "OK" response
Given new "CreateAPIKey" request
And body with value {"name": "example user"}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Create an application key returns "Bad Request" response
Given new "CreateApplicationKey" request
And body with value {"name": "example user"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Create an application key returns "Conflict" response
Given new "CreateApplicationKey" request
And body with value {"name": "example user"}
When the request is sent
Then the response status is 409 Conflict

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Create an application key returns "OK" response
Given new "CreateApplicationKey" request
And body with value {"name": "example user"}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Delete an API key returns "Bad Request" response
Given new "DeleteAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Delete an API key returns "Not Found" response
Given new "DeleteAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Delete an API key returns "OK" response
Given new "DeleteAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Delete an application key returns "Not Found" response
Given new "DeleteApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Delete an application key returns "OK" response
Given new "DeleteApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Edit an API key returns "Bad Request" response
Given new "UpdateAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Edit an API key returns "Not Found" response
Given new "UpdateAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Edit an API key returns "OK" response
Given new "UpdateAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Edit an application key returns "Bad Request" response
Given new "UpdateApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Edit an application key returns "Conflict" response
Given new "UpdateApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 409 Conflict

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Edit an application key returns "Not Found" response
Given new "UpdateApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Edit an application key returns "OK" response
Given new "UpdateApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Get API key returns "Not Found" response
Given new "GetAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Get API key returns "OK" response
Given new "GetAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Get all API keys returns "OK" response
Given new "ListAPIKeys" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Get all application keys returns "OK" response
Given new "ListApplicationKeys" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Get an application key returns "Not Found" response
Given new "GetApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/credentials-management
@generated @skip @team:DataDog/credential-management
Scenario: Get an application key returns "OK" response
Given new "GetApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
Expand Down
Loading
Loading