Skip to content

Commit 32afa13

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 502752d of spec repo
1 parent 99e124a commit 32afa13

15 files changed

Lines changed: 1074 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44815,6 +44815,57 @@ components:
4481544815
required:
4481644816
- data
4481744817
type: object
44818+
ProjectFavorite:
44819+
description: Project favorite
44820+
properties:
44821+
id:
44822+
description: The project's identifier
44823+
example: d4bbe1af-f36e-42f1-87c1-493ca35c320e
44824+
type: string
44825+
relationships:
44826+
$ref: '#/components/schemas/ProjectFavoriteRelationships'
44827+
type:
44828+
$ref: '#/components/schemas/ProjectFavoriteResourceType'
44829+
required:
44830+
- id
44831+
- type
44832+
- relationships
44833+
type: object
44834+
ProjectFavoriteRelationships:
44835+
description: Project favorite relationships
44836+
properties:
44837+
user:
44838+
$ref: '#/components/schemas/ProjectFavoriteUserRelationship'
44839+
required:
44840+
- user
44841+
type: object
44842+
ProjectFavoriteResourceType:
44843+
description: Project favorite resource type
44844+
enum:
44845+
- project_favorite
44846+
example: project_favorite
44847+
type: string
44848+
x-enum-varnames:
44849+
- PROJECT_FAVORITE
44850+
ProjectFavoriteUserRelationship:
44851+
description: Relationship to user
44852+
properties:
44853+
data:
44854+
$ref: '#/components/schemas/UserRelationshipData'
44855+
required:
44856+
- data
44857+
type: object
44858+
ProjectFavoritesResponse:
44859+
description: Response with project favorites
44860+
properties:
44861+
data:
44862+
description: Array of project favorites
44863+
items:
44864+
$ref: '#/components/schemas/ProjectFavorite'
44865+
type: array
44866+
required:
44867+
- data
44868+
type: object
4481844869
ProjectRelationship:
4481944870
description: Relationship to project
4482044871
properties:
@@ -85745,6 +85796,139 @@ paths:
8574585796
tags:
8574685797
- Rum Audience Management
8574785798
x-unstable: '**Note**: This endpoint may be subject to changes.'
85799+
/api/v2/projects/favorites:
85800+
get:
85801+
description: Get all projects marked as favorite by the current user
85802+
operationId: ListUserProjectFavorites
85803+
responses:
85804+
'200':
85805+
content:
85806+
application/json:
85807+
schema:
85808+
$ref: '#/components/schemas/ProjectFavoritesResponse'
85809+
description: OK
85810+
'400':
85811+
content:
85812+
application/json:
85813+
schema:
85814+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85815+
description: Bad Request
85816+
'401':
85817+
content:
85818+
application/json:
85819+
schema:
85820+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85821+
description: Unauthorized
85822+
'403':
85823+
content:
85824+
application/json:
85825+
schema:
85826+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85827+
description: Forbidden
85828+
'429':
85829+
$ref: '#/components/responses/TooManyRequestsResponse'
85830+
security:
85831+
- apiKeyAuth: []
85832+
appKeyAuth: []
85833+
- AuthZ:
85834+
- cases_read
85835+
summary: Get user's project favorites
85836+
tags:
85837+
- Case Management
85838+
x-unstable: '**Note**: This endpoint is in preview and is subject to change.
85839+
85840+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
85841+
/api/v2/projects/{project_id}/favorites:
85842+
delete:
85843+
description: Remove a project from the current user's favorites
85844+
operationId: UnfavoriteProject
85845+
parameters:
85846+
- $ref: '#/components/parameters/ProjectIDPathParameter'
85847+
responses:
85848+
'204':
85849+
description: No Content
85850+
'400':
85851+
content:
85852+
application/json:
85853+
schema:
85854+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85855+
description: Bad Request
85856+
'401':
85857+
content:
85858+
application/json:
85859+
schema:
85860+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85861+
description: Unauthorized
85862+
'403':
85863+
content:
85864+
application/json:
85865+
schema:
85866+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85867+
description: Forbidden
85868+
'404':
85869+
content:
85870+
application/json:
85871+
schema:
85872+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85873+
description: Not Found
85874+
'429':
85875+
$ref: '#/components/responses/TooManyRequestsResponse'
85876+
security:
85877+
- apiKeyAuth: []
85878+
appKeyAuth: []
85879+
- AuthZ:
85880+
- cases_write
85881+
summary: Remove project from favorites
85882+
tags:
85883+
- Case Management
85884+
x-unstable: '**Note**: This endpoint is in preview and is subject to change.
85885+
85886+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
85887+
post:
85888+
description: Add a project to the current user's favorites
85889+
operationId: FavoriteProject
85890+
parameters:
85891+
- $ref: '#/components/parameters/ProjectIDPathParameter'
85892+
responses:
85893+
'204':
85894+
description: No Content
85895+
'400':
85896+
content:
85897+
application/json:
85898+
schema:
85899+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85900+
description: Bad Request
85901+
'401':
85902+
content:
85903+
application/json:
85904+
schema:
85905+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85906+
description: Unauthorized
85907+
'403':
85908+
content:
85909+
application/json:
85910+
schema:
85911+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85912+
description: Forbidden
85913+
'404':
85914+
content:
85915+
application/json:
85916+
schema:
85917+
$ref: '#/components/schemas/JSONAPIErrorResponse'
85918+
description: Not Found
85919+
'429':
85920+
$ref: '#/components/responses/TooManyRequestsResponse'
85921+
security:
85922+
- apiKeyAuth: []
85923+
appKeyAuth: []
85924+
- AuthZ:
85925+
- cases_write
85926+
summary: Add project to favorites
85927+
tags:
85928+
- Case Management
85929+
x-unstable: '**Note**: This endpoint is in preview and is subject to change.
85930+
85931+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
8574885932
/api/v2/query/scalar:
8574985933
post:
8575085934
description: 'Query scalar values (as seen on Query Value, Table, and Toplist
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Add project to favorites returns "No Content" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.favorite_project".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
8+
api_instance.favorite_project("project_id")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get user's project favorites returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_user_project_favorites".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
8+
p api_instance.list_user_project_favorites()
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Remove project from favorites returns "No Content" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.unfavorite_project".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
8+
api_instance.unfavorite_project("project_id")

features/scenarios_model_mapping.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,12 @@
12501250
"case_id" => "String",
12511251
"body" => "CaseEmptyRequest",
12521252
},
1253+
"v2.UnfavoriteProject" => {
1254+
"project_id" => "String",
1255+
},
1256+
"v2.FavoriteProject" => {
1257+
"project_id" => "String",
1258+
},
12531259
"v2.CreateCaseType" => {
12541260
"body" => "CaseTypeCreateRequest",
12551261
},

features/v2/case_management.feature

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,30 @@ Feature: Case Management
1010
And a valid "appKeyAuth" key in the system
1111
And an instance of "CaseManagement" API
1212

13+
@generated @skip @team:DataDog/case-management
14+
Scenario: Add project to favorites returns "Bad Request" response
15+
Given operation "FavoriteProject" enabled
16+
And new "FavoriteProject" request
17+
And request contains "project_id" parameter from "REPLACE.ME"
18+
When the request is sent
19+
Then the response status is 400 Bad Request
20+
21+
@generated @skip @team:DataDog/case-management
22+
Scenario: Add project to favorites returns "No Content" response
23+
Given operation "FavoriteProject" enabled
24+
And new "FavoriteProject" request
25+
And request contains "project_id" parameter from "REPLACE.ME"
26+
When the request is sent
27+
Then the response status is 204 No Content
28+
29+
@generated @skip @team:DataDog/case-management
30+
Scenario: Add project to favorites returns "Not Found" response
31+
Given operation "FavoriteProject" enabled
32+
And new "FavoriteProject" request
33+
And request contains "project_id" parameter from "REPLACE.ME"
34+
When the request is sent
35+
Then the response status is 404 Not Found
36+
1337
@team:DataDog/case-management
1438
Scenario: Archive case returns "Bad Request" response
1539
Given new "ArchiveCase" request
@@ -247,6 +271,20 @@ Feature: Case Management
247271
When the request is sent
248272
Then the response status is 200 OK
249273

274+
@generated @skip @team:DataDog/case-management
275+
Scenario: Get user's project favorites returns "Bad Request" response
276+
Given operation "ListUserProjectFavorites" enabled
277+
And new "ListUserProjectFavorites" request
278+
When the request is sent
279+
Then the response status is 400 Bad Request
280+
281+
@generated @skip @team:DataDog/case-management
282+
Scenario: Get user's project favorites returns "OK" response
283+
Given operation "ListUserProjectFavorites" enabled
284+
And new "ListUserProjectFavorites" request
285+
When the request is sent
286+
Then the response status is 200 OK
287+
250288
@generated @skip @team:DataDog/case-management
251289
Scenario: Remove a project returns "API error response" response
252290
Given new "DeleteProject" request
@@ -261,6 +299,30 @@ Feature: Case Management
261299
When the request is sent
262300
Then the response status is 204 No Content
263301

302+
@generated @skip @team:DataDog/case-management
303+
Scenario: Remove project from favorites returns "Bad Request" response
304+
Given operation "UnfavoriteProject" enabled
305+
And new "UnfavoriteProject" request
306+
And request contains "project_id" parameter from "REPLACE.ME"
307+
When the request is sent
308+
Then the response status is 400 Bad Request
309+
310+
@generated @skip @team:DataDog/case-management
311+
Scenario: Remove project from favorites returns "No Content" response
312+
Given operation "UnfavoriteProject" enabled
313+
And new "UnfavoriteProject" request
314+
And request contains "project_id" parameter from "REPLACE.ME"
315+
When the request is sent
316+
Then the response status is 204 No Content
317+
318+
@generated @skip @team:DataDog/case-management
319+
Scenario: Remove project from favorites returns "Not Found" response
320+
Given operation "UnfavoriteProject" enabled
321+
And new "UnfavoriteProject" request
322+
And request contains "project_id" parameter from "REPLACE.ME"
323+
When the request is sent
324+
Then the response status is 404 Not Found
325+
264326
@generated @skip @team:DataDog/case-management
265327
Scenario: Search cases returns "Bad Request" response
266328
Given new "SearchCases" request

features/v2/undo.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3445,6 +3445,26 @@
34453445
"type": "safe"
34463446
}
34473447
},
3448+
"ListUserProjectFavorites": {
3449+
"tag": "Case Management",
3450+
"undo": {
3451+
"type": "safe"
3452+
}
3453+
},
3454+
"UnfavoriteProject": {
3455+
"tag": "Case Management",
3456+
"undo": {
3457+
"type": "idempotent"
3458+
}
3459+
},
3460+
"FavoriteProject": {
3461+
"tag": "Case Management",
3462+
"undo": {
3463+
"operationId": "TODO",
3464+
"parameters": [],
3465+
"type": "unsafe"
3466+
}
3467+
},
34483468
"QueryScalarData": {
34493469
"tag": "Metrics",
34503470
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ def initialize
208208
"v2.get_open_api": false,
209209
"v2.list_apis": false,
210210
"v2.update_open_api": false,
211+
"v2.favorite_project": false,
212+
"v2.list_user_project_favorites": false,
213+
"v2.unfavorite_project": false,
211214
"v2.cancel_threat_hunting_job": false,
212215
"v2.convert_job_result_to_signal": false,
213216
"v2.delete_threat_hunting_job": false,

lib/datadog_api_client/inflector.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3749,6 +3749,11 @@ def overrides
37493749
"v2.projected_cost_attributes" => "ProjectedCostAttributes",
37503750
"v2.projected_cost_response" => "ProjectedCostResponse",
37513751
"v2.projected_cost_type" => "ProjectedCostType",
3752+
"v2.project_favorite" => "ProjectFavorite",
3753+
"v2.project_favorite_relationships" => "ProjectFavoriteRelationships",
3754+
"v2.project_favorite_resource_type" => "ProjectFavoriteResourceType",
3755+
"v2.project_favorites_response" => "ProjectFavoritesResponse",
3756+
"v2.project_favorite_user_relationship" => "ProjectFavoriteUserRelationship",
37523757
"v2.project_relationship" => "ProjectRelationship",
37533758
"v2.project_relationship_data" => "ProjectRelationshipData",
37543759
"v2.project_relationships" => "ProjectRelationships",

0 commit comments

Comments
 (0)