Skip to content

Commit

Permalink
Regenerate client from commit ea548b1 of spec repo (#565)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Dec 7, 2020
1 parent 29078f4 commit 91482af
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 16 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.3.0",
"regenerated": "2020-12-01 16:27:02.353382",
"spec_repo_commit": "87f1f19"
"regenerated": "2020-12-07 17:47:06.500276",
"spec_repo_commit": "ea548b1"
},
"v2": {
"apigentools_version": "1.3.0",
"regenerated": "2020-12-01 16:27:11.581538",
"spec_repo_commit": "87f1f19"
"regenerated": "2020-12-07 17:47:15.629114",
"spec_repo_commit": "ea548b1"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
@endpoint(key-management)
Feature: Key Management
Manage your Datadog API and application keys. You need an API and
applications key with Admin rights to interact with this endpoint. The
full list of keys can be seen on your [Datadog API
page](https://app.datadoghq.com/account/settings#api).

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "KeyManagement" API

@skip
Scenario: Get all Application keys returns "OK" response
Given new "ListApplicationKeys" request
When the request is sent
Then the response status is 200 OK

@skip
Scenario: Delete an Application key returns "No Content" response
Given there is a valid "application_key" in the system
And new "DeleteApplicationKey" request
And request contains "app_key_id" parameter from "application_key.data.id"
When the request is sent
Then the response status is 204 No Content

@skip
Scenario: Get all Application keys owned by current user returns "OK" response
Given new "ListCurrentUserApplicationKeys" request
When the request is sent
Then the response status is 200 OK

@skip
Scenario: Create an Application key for current user returns "Created" response
Given new "CreateCurrentUserApplicationKey" request
And body {"data": {"type": "application_keys", "attributes": {"name": "{{ unique }}"}}}
When the request is sent
Then the response status is 201 Created
And the response "data.attributes.name" is equal to "{{ unique }}"

@skip
Scenario: Delete an Application key owned by current user returns "No Content" response
Given there is a valid "application_key" in the system
And new "DeleteCurrentUserApplicationKey" request
And request contains "app_key_id" parameter from "application_key.data.id"
When the request is sent
Then the response status is 204 No Content

@skip
Scenario: Get one Application key owned by current user returns "OK" response
Given there is a valid "application_key" in the system
And new "GetCurrentUserApplicationKey" request
And request contains "app_key_id" parameter from "application_key.data.id"
When the request is sent
Then the response status is 200 OK
And the response "data.attributes.name" has the same value as "application_key.data.attributes.name"

@skip
Scenario: Edit an application key owned by current user returns "OK" response
Given there is a valid "application_key" in the system
And new "UpdateCurrentUserApplicationKey" request
And request contains "app_key_id" parameter from "application_key.data.id"
And body {"data": {"id": "{{ application_key.data.id }}", "type": "application_keys", "attributes": {"name" : "{{ application_key.data.attributes.name }}-updated"}}}
When the request is sent
Then the response status is 200 OK
And the response "data.attributes.name" is equal to "{{ application_key.data.attributes.name }}-updated"

@skip
Scenario: Edit an application key returns "OK" response
Given there is a valid "application_key" in the system
And new "UpdateApplicationKey" request
And request contains "app_key_id" parameter from "application_key.data.id"
And body {"data": {"id": "{{ application_key.data.id }}", "type": "application_keys", "attributes": {"name" : "{{ application_key.data.attributes.name }}-updated"}}}
When the request is sent
Then the response status is 200 OK
And the response "data.attributes.name" is equal to "{{ application_key.data.attributes.name }}-updated"

@generated @skip
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
Scenario: Delete an application key returns "No Content" response
Given new "DeleteApplicationKey" request
And request contains "app_key_id" parameter from "<PATH>"
When the request is sent
Then the response status is 204 No Content
80 changes: 68 additions & 12 deletions src/test/resources/com/datadog/api/v2/client/api/undo.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,59 @@
{
"ListApplicationKeys": {
"tag": "Key Management",
"undo": {
"type": "safe"
}
},
"DeleteApplicationKey": {
"tag": "Key Management",
"undo": {
"type": "idempotent"
}
},
"UpdateApplicationKey": {
"tag": "Key Management",
"undo": {
"type": "idempotent"
}
},
"ListCurrentUserApplicationKeys": {
"tag": "Key Management",
"undo": {
"type": "safe"
}
},
"CreateCurrentUserApplicationKey": {
"tag": "Key Management",
"undo": {
"operationId": "DeleteCurrentUserApplicationKey",
"parameters": [
{
"name": "app_key_id",
"source": "data.id"
}
],
"type": "unsafe"
}
},
"DeleteCurrentUserApplicationKey": {
"tag": "Key Management",
"undo": {
"type": "idempotent"
}
},
"GetCurrentUserApplicationKey": {
"tag": "Key Management",
"undo": {
"type": "safe"
}
},
"UpdateCurrentUserApplicationKey": {
"tag": "Key Management",
"undo": {
"type": "idempotent"
}
},
"DeleteDashboardListItems": {
"tag": "Dashboard Lists",
"undo": {
Expand All @@ -14,19 +69,14 @@
"CreateDashboardListItems": {
"tag": "Dashboard Lists",
"undo": {
"operationId": "DeleteDashboardListItems",
"parameters": [
{
"name": "dashboard_list_id",
"source": "<RESPONSE_PATH>"
}
],
"type": "unsafe"
"type": "safe"
}
},
"UpdateDashboardListItems": {
"tag": "Dashboard Lists",
"undo": null
"undo": {
"type": "safe"
}
},
"ListIncidents": {
"tag": "Incidents",
Expand Down Expand Up @@ -79,7 +129,9 @@
},
"UpdateLogsArchiveOrder": {
"tag": "Logs Archives",
"undo": null
"undo": {
"type": "safe"
}
},
"ListLogsArchives": {
"tag": "Logs Archives",
Expand Down Expand Up @@ -114,7 +166,9 @@
},
"UpdateLogsArchive": {
"tag": "Logs Archives",
"undo": null
"undo": {
"type": "safe"
}
},
"RemoveRoleFromArchive": {
"tag": "Logs Archives",
Expand All @@ -130,7 +184,9 @@
},
"AddReadRoleToArchive": {
"tag": "Logs Archives",
"undo": null
"undo": {
"type": "unsafe"
}
},
"ListLogsGet": {
"tag": "Logs",
Expand Down

0 comments on commit 91482af

Please sign in to comment.