Skip to content

Commit

Permalink
Regenerate client from commit 3b593f9 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Nov 15, 2021
1 parent 44b9c22 commit 476717c
Show file tree
Hide file tree
Showing 12 changed files with 196 additions and 20 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.5.1.dev2",
"regenerated": "2021-11-15 10:48:33.537524",
"spec_repo_commit": "ec0039a"
"regenerated": "2021-11-15 18:35:25.147456",
"spec_repo_commit": "3b593f9"
},
"v2": {
"apigentools_version": "1.5.1.dev2",
"regenerated": "2021-11-15 10:48:33.558027",
"spec_repo_commit": "ec0039a"
"regenerated": "2021-11-15 18:35:25.171351",
"spec_repo_commit": "3b593f9"
}
}
}
6 changes: 4 additions & 2 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10766,7 +10766,7 @@ components:
SyntheticsTestDetailsSubType:
description: 'The subtype of the Synthetic API test, `http`, `ssl`, `tcp`,

`dns`, `icmp`, `udp` or `multi`.'
`dns`, `icmp`, `udp`, `websocket` or `multi`.'
enum:
- http
- ssl
Expand All @@ -10775,6 +10775,7 @@ components:
- multi
- icmp
- udp
- websocket
example: http
type: string
x-enum-varnames:
Expand All @@ -10785,6 +10786,7 @@ components:
- MULTI
- ICMP
- UDP
- WEBSOCKET
SyntheticsTestDetailsType:
description: Type of the Synthetic test, either `api` or `browser`.
enum:
Expand Down Expand Up @@ -10977,7 +10979,7 @@ components:
description: Host name to perform the test with.
type: string
message:
description: Message to send for UDP tests.
description: Message to send for UDP or WebSocket tests.
type: string
method:
$ref: '#/components/schemas/HTTPMethod'
Expand Down
6 changes: 4 additions & 2 deletions api/v1/datadog/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24795,7 +24795,7 @@ components:
SyntheticsTestDetailsSubType:
description: |-
The subtype of the Synthetic API test, `http`, `ssl`, `tcp`,
`dns`, `icmp`, `udp` or `multi`.
`dns`, `icmp`, `udp`, `websocket` or `multi`.
enum:
- http
- ssl
Expand All @@ -24804,6 +24804,7 @@ components:
- multi
- icmp
- udp
- websocket
example: http
type: string
x-enum-varnames:
Expand All @@ -24814,6 +24815,7 @@ components:
- MULTI
- ICMP
- UDP
- WEBSOCKET
SyntheticsTestDetailsType:
description: Type of the Synthetic test, either `api` or `browser`.
enum:
Expand Down Expand Up @@ -25045,7 +25047,7 @@ components:
description: Host name to perform the test with.
type: string
message:
description: Message to send for UDP tests.
description: Message to send for UDP or WebSocket tests.
type: string
method:
$ref: '#/components/schemas/HTTPMethod'
Expand Down
2 changes: 2 additions & 0 deletions api/v1/datadog/docs/SyntheticsTestDetailsSubType.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

* `UDP` (value: `"udp"`)

* `WEBSOCKET` (value: `"websocket"`)


[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 1 addition & 1 deletion api/v1/datadog/docs/SyntheticsTestRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Name | Type | Description | Notes
**FollowRedirects** | Pointer to **bool** | Specifies whether or not the request follows redirects. | [optional]
**Headers** | Pointer to **map[string]string** | Headers to include when performing the test. | [optional]
**Host** | Pointer to **string** | Host name to perform the test with. | [optional]
**Message** | Pointer to **string** | Message to send for UDP tests. | [optional]
**Message** | Pointer to **string** | Message to send for UDP or WebSocket tests. | [optional]
**Method** | Pointer to [**HTTPMethod**](HTTPMethod.md) | | [optional]
**NoSavingResponseBody** | Pointer to **bool** | Determines whether or not to save the response body. | [optional]
**NumberOfPackets** | Pointer to **int32** | Number of pings to use per test. | [optional]
Expand Down
18 changes: 10 additions & 8 deletions api/v1/datadog/model_synthetics_test_details_sub_type.go

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

2 changes: 1 addition & 1 deletion api/v1/datadog/model_synthetics_test_request.go

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

5 changes: 3 additions & 2 deletions examples/v2/security-monitoring/ListSecurityFilters.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

package main


import (
"context"
"encoding/json"
"fmt"
"os"

Expand All @@ -15,7 +15,7 @@ func main() {
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.SecurityMonitoringApi.ListSecurityFilters(ctx)
resp, r, err := apiClient.SecurityMonitoringApi.ListSecurityFilters(ctx, )

if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityMonitoringApi.ListSecurityFilters`: %v\n", err)
Expand All @@ -24,4 +24,5 @@ func main() {

responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `SecurityMonitoringApi.ListSecurityFilters`:\n%s\n", responseContent)
}onseContent)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2021-11-15T18:07:45.924Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
interactions:
- request:
body: |
{"config":{"assertions":[{"operator":"is","target":"message","type":"receivedMessage"},{"operator":"lessThan","target":2000,"type":"responseTime"}],"configVariables":[],"request":{"message":"message","url":"ws://datadoghq.com"}},"locations":["aws:us-east-2"],"message":"BDD test payload: synthetics_api_test_websocket_payload.json","name":"Test-Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response-1636999665","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response-1636999665","monitor_priority":5,"retry":{"count":3,"interval":10},"tick_every":60},"subtype":"websocket","tags":["testing:api"],"type":"api"}
form: {}
headers:
Accept:
- application/json, */*;q=0.8
Connection:
- close
Content-Length:
- '844'
Content-Type:
- application/json
Host:
- api.datadoghq.com
User-Agent:
- datadog-api-client-typescript/1.0.0-beta.6 (node 14.18.1; os Linux; arch x64)
X-Datadog-Parent-Id:
- '4580709451748564676'
X-Datadog-Trace-Id:
- '7130359786114391756'
method: POST
url: https://api.datadoghq.com/api/v1/synthetics/tests/api
response:
body: '{"status":"live","public_id":"7f2-txy-a7p","tags":["testing:api"],"org_id":321813,"locations":["aws:us-east-2"],"message":"BDD
test payload: synthetics_api_test_websocket_payload.json","deleted_at":null,"name":"Test-Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response-1636999665","monitor_id":54531314,"type":"api","created_at":"2021-11-15T18:07:46.215484+00:00","modified_at":"2021-11-15T18:07:46.215484+00:00","subtype":"websocket","config":{"request":{"url":"ws://datadoghq.com","message":"message"},"assertions":[{"operator":"is","type":"receivedMessage","target":"message"},{"operator":"lessThan","type":"responseTime","target":2000}],"configVariables":[]},"options":{"accept_self_signed":false,"retry":{"count":3,"interval":10},"min_location_failed":1,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"monitor_priority":5,"monitor_name":"Test-Create_an_API_test_with_WEBSOCKET_subtype_returns_OK_Returns_the_created_test_details_response-1636999665","tick_every":60}}'
code: 200
duration: ''
headers:
Cache-Control:
- no-cache
Connection:
- close
Content-Length:
- '1039'
Content-Security-Policy:
- frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
Content-Type:
- application/json
Date:
- Mon, 15 Nov 2021 18:07:46 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=15724800;
Vary:
- Accept-Encoding
X-Content-Type-Options:
- nosniff
X-Envoy-Upstream-Service-Time:
- '264'
X-Frame-Options:
- SAMEORIGIN
X-Ratelimit-Limit:
- '12000'
X-Ratelimit-Period:
- '60'
X-Ratelimit-Remaining:
- '11999'
X-Ratelimit-Reset:
- '14'
status: 200 OK
- request:
body: |
{"public_ids":["7f2-txy-a7p"]}
form: {}
headers:
Accept:
- application/json, */*;q=0.8
Connection:
- close
Content-Length:
- '30'
Content-Type:
- application/json
Host:
- api.datadoghq.com
User-Agent:
- datadog-api-client-typescript/1.0.0-beta.6 (node 14.18.1; os Linux; arch x64)
X-Datadog-Parent-Id:
- '8010816681933148738'
X-Datadog-Trace-Id:
- '7130359786114391756'
method: POST
url: https://api.datadoghq.com/api/v1/synthetics/tests/delete
response:
body: '{"deleted_tests":[{"deleted_at":"2021-11-15T18:07:46.397039+00:00","public_id":"7f2-txy-a7p"}]}'
code: 200
duration: ''
headers:
Cache-Control:
- no-cache
Connection:
- close
Content-Length:
- '95'
Content-Security-Policy:
- frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
Content-Type:
- application/json
Date:
- Mon, 15 Nov 2021 18:07:46 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=15724800;
Vary:
- Accept-Encoding
X-Content-Type-Options:
- nosniff
X-Envoy-Upstream-Service-Time:
- '143'
X-Frame-Options:
- SAMEORIGIN
X-Ratelimit-Limit:
- '12000'
X-Ratelimit-Period:
- '60'
X-Ratelimit-Remaining:
- '11999'
X-Ratelimit-Reset:
- '14'
status: 200 OK
version: 1
7 changes: 7 additions & 0 deletions tests/scenarios/features/v1/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ Feature: Synthetics
Then the response status is 200 OK - Returns the created test details.
And the response "name" is equal to "{{ unique }}"

Scenario: Create an API test with WEBSOCKET subtype returns "OK - Returns the created test details." response
Given new "CreateSyntheticsAPITest" request
And body from file "synthetics_api_test_websocket_payload.json"
When the request is sent
Then the response status is 200 OK - Returns the created test details.
And the response "name" is equal to "{{ unique }}"

@generated @skip
Scenario: Delete a global variable returns "JSON format is wrong" response
Given new "DeleteGlobalVariable" request
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"config": {
"assertions": [
{
"operator": "is",
"target": "message",
"type": "receivedMessage"
},
{ "operator": "lessThan", "target": 2000, "type": "responseTime" }
],
"configVariables": [],
"request": {
"url": "ws://datadoghq.com",
"message": "message"
}
},
"locations": ["aws:us-east-2"],
"message": "BDD test payload: synthetics_api_test_websocket_payload.json",
"name": "{{ unique }}",
"options": {
"accept_self_signed": false,
"allow_insecure": true,
"follow_redirects": true,
"min_failure_duration": 10,
"min_location_failed": 1,
"monitor_name": "{{ unique }}",
"monitor_priority": 5,
"retry": { "count": 3, "interval": 10 },
"tick_every": 60
},
"subtype": "websocket",
"tags": ["testing:api"],
"type": "api"
}

0 comments on commit 476717c

Please sign in to comment.