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
851 changes: 851 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions examples/v2/app-builder/CreatePublishRequest.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Create Publish Request returns "Created" response

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

body = DatadogAPIClient::V2::CreatePublishRequestRequest.new({
data: DatadogAPIClient::V2::CreatePublishRequestRequestData.new({
attributes: DatadogAPIClient::V2::CreatePublishRequestRequestDataAttributes.new({
description: "Adds new dashboard widgets and a few bug fixes.",
title: "Release v1.2 to production",
}),
type: DatadogAPIClient::V2::PublishRequestType::PUBLISHREQUEST,
}),
})
p api_instance.create_publish_request("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
5 changes: 5 additions & 0 deletions examples/v2/app-builder/ListAppVersions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# List App Versions returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
p api_instance.list_app_versions("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
5 changes: 5 additions & 0 deletions examples/v2/app-builder/RevertApp.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Revert App returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::AppBuilderAPI.new
p api_instance.revert_app("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "version")
14 changes: 14 additions & 0 deletions examples/v2/app-builder/UpdateAppFavorite.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Update App Favorite Status returns "OK" response

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

body = DatadogAPIClient::V2::UpdateAppFavoriteRequest.new({
data: DatadogAPIClient::V2::UpdateAppFavoriteRequestData.new({
attributes: DatadogAPIClient::V2::UpdateAppFavoriteRequestDataAttributes.new({
favorite: true,
}),
type: DatadogAPIClient::V2::AppFavoriteType::FAVORITES,
}),
})
p api_instance.update_app_favorite("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
14 changes: 14 additions & 0 deletions examples/v2/app-builder/UpdateAppSelfService.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Update App Self-Service Status returns "OK" response

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

body = DatadogAPIClient::V2::UpdateAppSelfServiceRequest.new({
data: DatadogAPIClient::V2::UpdateAppSelfServiceRequestData.new({
attributes: DatadogAPIClient::V2::UpdateAppSelfServiceRequestDataAttributes.new({
self_service: true,
}),
type: DatadogAPIClient::V2::AppSelfServiceType::SELFSERVICE,
}),
})
p api_instance.update_app_self_service("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
17 changes: 17 additions & 0 deletions examples/v2/app-builder/UpdateAppTags.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Update App Tags returns "No Content" response

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

body = DatadogAPIClient::V2::UpdateAppTagsRequest.new({
data: DatadogAPIClient::V2::UpdateAppTagsRequestData.new({
attributes: DatadogAPIClient::V2::UpdateAppTagsRequestDataAttributes.new({
tags: [
"team:platform",
"service:ops",
],
}),
type: DatadogAPIClient::V2::AppTagsType::TAGS,
}),
})
api_instance.update_app_tags("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
14 changes: 14 additions & 0 deletions examples/v2/app-builder/UpdateAppVersionName.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Name App Version returns "No Content" response

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

body = DatadogAPIClient::V2::UpdateAppVersionNameRequest.new({
data: DatadogAPIClient::V2::UpdateAppVersionNameRequestData.new({
attributes: DatadogAPIClient::V2::UpdateAppVersionNameRequestDataAttributes.new({
name: "v1.2.0 - bug fix release",
}),
type: DatadogAPIClient::V2::AppVersionNameType::VERSIONNAMES,
}),
})
api_instance.update_app_version_name("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "version", body)
14 changes: 14 additions & 0 deletions examples/v2/app-builder/UpdateProtectionLevel.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Update App Protection Level returns "OK" response

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

body = DatadogAPIClient::V2::UpdateAppProtectionLevelRequest.new({
data: DatadogAPIClient::V2::UpdateAppProtectionLevelRequestData.new({
attributes: DatadogAPIClient::V2::UpdateAppProtectionLevelRequestDataAttributes.new({
protection_level: DatadogAPIClient::V2::AppProtectionLevel::APPROVAL_REQUIRED,
}),
type: DatadogAPIClient::V2::AppProtectionLevelType::PROTECTIONLEVEL,
}),
})
p api_instance.update_protection_level("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
34 changes: 34 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1352,6 +1352,40 @@
"v2.PublishApp" => {
"app_id" => "UUID",
},
"v2.UpdateAppFavorite" => {
"app_id" => "UUID",
"body" => "UpdateAppFavoriteRequest",
},
"v2.UpdateProtectionLevel" => {
"app_id" => "UUID",
"body" => "UpdateAppProtectionLevelRequest",
},
"v2.CreatePublishRequest" => {
"app_id" => "UUID",
"body" => "CreatePublishRequestRequest",
},
"v2.RevertApp" => {
"app_id" => "UUID",
"version" => "String",
},
"v2.UpdateAppSelfService" => {
"app_id" => "UUID",
"body" => "UpdateAppSelfServiceRequest",
},
"v2.UpdateAppTags" => {
"app_id" => "UUID",
"body" => "UpdateAppTagsRequest",
},
"v2.UpdateAppVersionName" => {
"app_id" => "UUID",
"version" => "String",
"body" => "UpdateAppVersionNameRequest",
},
"v2.ListAppVersions" => {
"app_id" => "UUID",
"limit" => "Integer",
"page" => "Integer",
},
"v2.ListAuditLogs" => {
"filter_query" => "String",
"filter_from" => "Time",
Expand Down
192 changes: 192 additions & 0 deletions features/v2/app_builder.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,30 @@ Feature: App Builder
Then the response status is 201 Created
And the response "data.type" is equal to "appDefinitions"

@generated @skip @team:DataDog/app-builder-backend
Scenario: Create Publish Request returns "Bad Request" response
Given new "CreatePublishRequest" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Adds new dashboard widgets and a few bug fixes.", "title": "Release v1.2 to production"}, "type": "publishRequest"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/app-builder-backend
Scenario: Create Publish Request returns "Created" response
Given new "CreatePublishRequest" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Adds new dashboard widgets and a few bug fixes.", "title": "Release v1.2 to production"}, "type": "publishRequest"}}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/app-builder-backend
Scenario: Create Publish Request returns "Not Found" response
Given new "CreatePublishRequest" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Adds new dashboard widgets and a few bug fixes.", "title": "Release v1.2 to production"}, "type": "publishRequest"}}
When the request is sent
Then the response status is 404 Not Found

@skip @team:DataDog/app-builder-backend
Scenario: Delete App returns "Bad Request" response
Given new "DeleteApp" request
Expand Down Expand Up @@ -115,6 +139,27 @@ Feature: App Builder
And the response "data.id" has the same value as "app.data.id"
And the response "data.type" is equal to "appDefinitions"

@generated @skip @team:DataDog/app-builder-backend
Scenario: List App Versions returns "Bad Request" response
Given new "ListAppVersions" request
And request contains "app_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/app-builder-backend
Scenario: List App Versions returns "Not Found" response
Given new "ListAppVersions" request
And request contains "app_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/app-builder-backend
Scenario: List App Versions returns "OK" response
Given new "ListAppVersions" request
And request contains "app_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/app-builder-backend
Scenario: List Apps returns "Bad Request" response
Given new "ListApps" request
Expand All @@ -127,6 +172,33 @@ Feature: App Builder
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/app-builder-backend
Scenario: Name App Version returns "Bad Request" response
Given new "UpdateAppVersionName" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "version" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"name": "v1.2.0 - bug fix release"}, "type": "versionNames"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/app-builder-backend
Scenario: Name App Version returns "No Content" response
Given new "UpdateAppVersionName" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "version" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"name": "v1.2.0 - bug fix release"}, "type": "versionNames"}}
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/app-builder-backend
Scenario: Name App Version returns "Not Found" response
Given new "UpdateAppVersionName" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "version" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"name": "v1.2.0 - bug fix release"}, "type": "versionNames"}}
When the request is sent
Then the response status is 404 Not Found

@skip @team:DataDog/app-builder-backend
Scenario: Publish App returns "Bad Request" response
Given new "PublishApp" request
Expand All @@ -149,6 +221,30 @@ Feature: App Builder
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/app-builder-backend
Scenario: Revert App returns "Bad Request" response
Given new "RevertApp" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "version" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/app-builder-backend
Scenario: Revert App returns "Not Found" response
Given new "RevertApp" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "version" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/app-builder-backend
Scenario: Revert App returns "OK" response
Given new "RevertApp" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "version" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@skip @team:DataDog/app-builder-backend
Scenario: Unpublish App returns "Bad Request" response
Given new "UnpublishApp" request
Expand All @@ -171,6 +267,102 @@ Feature: App Builder
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/app-builder-backend
Scenario: Update App Favorite Status returns "Bad Request" response
Given new "UpdateAppFavorite" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"favorite": true}, "type": "favorites"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/app-builder-backend
Scenario: Update App Favorite Status returns "Not Found" response
Given new "UpdateAppFavorite" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"favorite": true}, "type": "favorites"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/app-builder-backend
Scenario: Update App Favorite Status returns "OK" response
Given new "UpdateAppFavorite" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"favorite": true}, "type": "favorites"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/app-builder-backend
Scenario: Update App Protection Level returns "Bad Request" response
Given new "UpdateProtectionLevel" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"protectionLevel": "approval_required"}, "type": "protectionLevel"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/app-builder-backend
Scenario: Update App Protection Level returns "Not Found" response
Given new "UpdateProtectionLevel" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"protectionLevel": "approval_required"}, "type": "protectionLevel"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/app-builder-backend
Scenario: Update App Protection Level returns "OK" response
Given new "UpdateProtectionLevel" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"protectionLevel": "approval_required"}, "type": "protectionLevel"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/app-builder-backend
Scenario: Update App Self-Service Status returns "Bad Request" response
Given new "UpdateAppSelfService" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"selfService": true}, "type": "selfService"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/app-builder-backend
Scenario: Update App Self-Service Status returns "Not Found" response
Given new "UpdateAppSelfService" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"selfService": true}, "type": "selfService"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/app-builder-backend
Scenario: Update App Self-Service Status returns "OK" response
Given new "UpdateAppSelfService" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"selfService": true}, "type": "selfService"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/app-builder-backend
Scenario: Update App Tags returns "Bad Request" response
Given new "UpdateAppTags" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"tags": ["team:platform", "service:ops"]}, "type": "tags"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/app-builder-backend
Scenario: Update App Tags returns "No Content" response
Given new "UpdateAppTags" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"tags": ["team:platform", "service:ops"]}, "type": "tags"}}
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/app-builder-backend
Scenario: Update App Tags returns "Not Found" response
Given new "UpdateAppTags" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"tags": ["team:platform", "service:ops"]}, "type": "tags"}}
When the request is sent
Then the response status is 404 Not Found

@skip-typescript @team:DataDog/app-builder-backend
Scenario: Update App returns "Bad Request" response
Given new "UpdateApp" request
Expand Down
Loading
Loading