Skip to content

Commit

Permalink
Regenerate client from commit cd2d0af1 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed May 10, 2022
1 parent 25a6d46 commit 44509f7
Show file tree
Hide file tree
Showing 25 changed files with 155 additions and 47 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.6.2",
"regenerated": "2022-05-09 16:43:07.071627",
"spec_repo_commit": "a3819bf3"
"regenerated": "2022-05-10 07:42:32.206622",
"spec_repo_commit": "cd2d0af1"
},
"v2": {
"apigentools_version": "1.6.2",
"regenerated": "2022-05-09 16:43:07.085121",
"spec_repo_commit": "a3819bf3"
"regenerated": "2022-05-10 07:42:32.218535",
"spec_repo_commit": "cd2d0af1"
}
}
}
19 changes: 18 additions & 1 deletion .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10361,6 +10361,7 @@ components:
- packetsReceived
- networkHop
- receivedMessage
- grpcHealthcheckStatus
example: statusCode
type: string
x-enum-varnames:
Expand All @@ -10379,6 +10380,7 @@ components:
- PACKETS_RECEIVED
- NETWORK_HOP
- RECEIVED_MESSAGE
- GRPC_HEALTHCHECK_STATUS
SyntheticsBasicAuth:
description: Object to handle basic authentication when performing the test.
oneOf:
Expand Down Expand Up @@ -11838,7 +11840,7 @@ components:
SyntheticsTestDetailsSubType:
description: 'The subtype of the Synthetic API test, `http`, `ssl`, `tcp`,

`dns`, `icmp`, `udp`, `websocket` or `multi`.'
`dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`.'
enum:
- http
- ssl
Expand All @@ -11848,6 +11850,7 @@ components:
- icmp
- udp
- websocket
- grpc
example: http
type: string
x-enum-varnames:
Expand All @@ -11859,6 +11862,7 @@ components:
- ICMP
- UDP
- WEBSOCKET
- GRPC
SyntheticsTestDetailsType:
description: Type of the Synthetic test, either `api` or `browser`.
enum:
Expand All @@ -11885,6 +11889,12 @@ components:
type: string
description: Headers to include when performing the test.
type: object
SyntheticsTestMetadata:
additionalProperties:
description: A single Metadatum.
type: string
description: Metadata to include when performing the gRPC test.
type: object
SyntheticsTestMonitorStatus:
description: 'The status of your Synthetic monitor.

Expand Down Expand Up @@ -12060,6 +12070,8 @@ components:
message:
description: Message to send for UDP or WebSocket tests.
type: string
metadata:
$ref: '#/components/schemas/SyntheticsTestMetadata'
method:
$ref: '#/components/schemas/HTTPMethod'
noSavingResponseBody:
Expand Down Expand Up @@ -24376,6 +24388,11 @@ paths:
- file: synthetics_api_test_with_wrong_dns.json
name: body
step: there is a "synthetics_api_test_with_wrong_dns" in the system
synthetics_grpc_test:
parameters:
- file: synthetics_api_grpc_test_payload.json
name: body
step: there is a valid "synthetics_grpc_test" in the system
x-menu-order: 1
x-undo:
operationId: DeleteTests
Expand Down
2 changes: 1 addition & 1 deletion api/v1/datadog/model_synthetics_api_test_.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type SyntheticsAPITest struct {
// Synthetic test.
Status *SyntheticsTestPauseStatus `json:"status,omitempty"`
// The subtype of the Synthetic API test, `http`, `ssl`, `tcp`,
// `dns`, `icmp`, `udp`, `websocket` or `multi`.
// `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`.
Subtype *SyntheticsTestDetailsSubType `json:"subtype,omitempty"`
// Array of tags attached to the test.
Tags []string `json:"tags,omitempty"`
Expand Down
32 changes: 17 additions & 15 deletions api/v1/datadog/model_synthetics_assertion_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,22 @@ type SyntheticsAssertionType string

// List of SyntheticsAssertionType
const (
SYNTHETICSASSERTIONTYPE_BODY SyntheticsAssertionType = "body"
SYNTHETICSASSERTIONTYPE_HEADER SyntheticsAssertionType = "header"
SYNTHETICSASSERTIONTYPE_STATUS_CODE SyntheticsAssertionType = "statusCode"
SYNTHETICSASSERTIONTYPE_CERTIFICATE SyntheticsAssertionType = "certificate"
SYNTHETICSASSERTIONTYPE_RESPONSE_TIME SyntheticsAssertionType = "responseTime"
SYNTHETICSASSERTIONTYPE_PROPERTY SyntheticsAssertionType = "property"
SYNTHETICSASSERTIONTYPE_RECORD_EVERY SyntheticsAssertionType = "recordEvery"
SYNTHETICSASSERTIONTYPE_RECORD_SOME SyntheticsAssertionType = "recordSome"
SYNTHETICSASSERTIONTYPE_TLS_VERSION SyntheticsAssertionType = "tlsVersion"
SYNTHETICSASSERTIONTYPE_MIN_TLS_VERSION SyntheticsAssertionType = "minTlsVersion"
SYNTHETICSASSERTIONTYPE_LATENCY SyntheticsAssertionType = "latency"
SYNTHETICSASSERTIONTYPE_PACKET_LOSS_PERCENTAGE SyntheticsAssertionType = "packetLossPercentage"
SYNTHETICSASSERTIONTYPE_PACKETS_RECEIVED SyntheticsAssertionType = "packetsReceived"
SYNTHETICSASSERTIONTYPE_NETWORK_HOP SyntheticsAssertionType = "networkHop"
SYNTHETICSASSERTIONTYPE_RECEIVED_MESSAGE SyntheticsAssertionType = "receivedMessage"
SYNTHETICSASSERTIONTYPE_BODY SyntheticsAssertionType = "body"
SYNTHETICSASSERTIONTYPE_HEADER SyntheticsAssertionType = "header"
SYNTHETICSASSERTIONTYPE_STATUS_CODE SyntheticsAssertionType = "statusCode"
SYNTHETICSASSERTIONTYPE_CERTIFICATE SyntheticsAssertionType = "certificate"
SYNTHETICSASSERTIONTYPE_RESPONSE_TIME SyntheticsAssertionType = "responseTime"
SYNTHETICSASSERTIONTYPE_PROPERTY SyntheticsAssertionType = "property"
SYNTHETICSASSERTIONTYPE_RECORD_EVERY SyntheticsAssertionType = "recordEvery"
SYNTHETICSASSERTIONTYPE_RECORD_SOME SyntheticsAssertionType = "recordSome"
SYNTHETICSASSERTIONTYPE_TLS_VERSION SyntheticsAssertionType = "tlsVersion"
SYNTHETICSASSERTIONTYPE_MIN_TLS_VERSION SyntheticsAssertionType = "minTlsVersion"
SYNTHETICSASSERTIONTYPE_LATENCY SyntheticsAssertionType = "latency"
SYNTHETICSASSERTIONTYPE_PACKET_LOSS_PERCENTAGE SyntheticsAssertionType = "packetLossPercentage"
SYNTHETICSASSERTIONTYPE_PACKETS_RECEIVED SyntheticsAssertionType = "packetsReceived"
SYNTHETICSASSERTIONTYPE_NETWORK_HOP SyntheticsAssertionType = "networkHop"
SYNTHETICSASSERTIONTYPE_RECEIVED_MESSAGE SyntheticsAssertionType = "receivedMessage"
SYNTHETICSASSERTIONTYPE_GRPC_HEALTHCHECK_STATUS SyntheticsAssertionType = "grpcHealthcheckStatus"
)

var allowedSyntheticsAssertionTypeEnumValues = []SyntheticsAssertionType{
Expand All @@ -49,6 +50,7 @@ var allowedSyntheticsAssertionTypeEnumValues = []SyntheticsAssertionType{
SYNTHETICSASSERTIONTYPE_PACKETS_RECEIVED,
SYNTHETICSASSERTIONTYPE_NETWORK_HOP,
SYNTHETICSASSERTIONTYPE_RECEIVED_MESSAGE,
SYNTHETICSASSERTIONTYPE_GRPC_HEALTHCHECK_STATUS,
}

func (w *SyntheticsAssertionType) GetAllowedValues() []SyntheticsAssertionType {
Expand Down
2 changes: 1 addition & 1 deletion api/v1/datadog/model_synthetics_test_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type SyntheticsTestDetails struct {
// For browser test, the steps of the test.
Steps []SyntheticsStep `json:"steps,omitempty"`
// The subtype of the Synthetic API test, `http`, `ssl`, `tcp`,
// `dns`, `icmp`, `udp`, `websocket` or `multi`.
// `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`.
Subtype *SyntheticsTestDetailsSubType `json:"subtype,omitempty"`
// Array of tags attached to the test.
Tags []string `json:"tags,omitempty"`
Expand Down
4 changes: 3 additions & 1 deletion api/v1/datadog/model_synthetics_test_details_sub_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// SyntheticsTestDetailsSubType The subtype of the Synthetic API test, `http`, `ssl`, `tcp`,
// `dns`, `icmp`, `udp`, `websocket` or `multi`.
// `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`.
type SyntheticsTestDetailsSubType string

// List of SyntheticsTestDetailsSubType
Expand All @@ -25,6 +25,7 @@ const (
SYNTHETICSTESTDETAILSSUBTYPE_ICMP SyntheticsTestDetailsSubType = "icmp"
SYNTHETICSTESTDETAILSSUBTYPE_UDP SyntheticsTestDetailsSubType = "udp"
SYNTHETICSTESTDETAILSSUBTYPE_WEBSOCKET SyntheticsTestDetailsSubType = "websocket"
SYNTHETICSTESTDETAILSSUBTYPE_GRPC SyntheticsTestDetailsSubType = "grpc"
)

var allowedSyntheticsTestDetailsSubTypeEnumValues = []SyntheticsTestDetailsSubType{
Expand All @@ -36,6 +37,7 @@ var allowedSyntheticsTestDetailsSubTypeEnumValues = []SyntheticsTestDetailsSubTy
SYNTHETICSTESTDETAILSSUBTYPE_ICMP,
SYNTHETICSTESTDETAILSSUBTYPE_UDP,
SYNTHETICSTESTDETAILSSUBTYPE_WEBSOCKET,
SYNTHETICSTESTDETAILSSUBTYPE_GRPC,
}

func (w *SyntheticsTestDetailsSubType) GetAllowedValues() []SyntheticsTestDetailsSubType {
Expand Down
39 changes: 39 additions & 0 deletions api/v1/datadog/model_synthetics_test_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ type SyntheticsTestRequest struct {
Host *string `json:"host,omitempty"`
// Message to send for UDP or WebSocket tests.
Message *string `json:"message,omitempty"`
// Metadata to include when performing the gRPC test.
Metadata map[string]string `json:"metadata,omitempty"`
// The HTTP method.
Method *HTTPMethod `json:"method,omitempty"`
// Determines whether or not to save the response body.
Expand Down Expand Up @@ -396,6 +398,38 @@ func (o *SyntheticsTestRequest) SetMessage(v string) {
o.Message = &v
}

// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *SyntheticsTestRequest) GetMetadata() map[string]string {
if o == nil || o.Metadata == nil {
var ret map[string]string
return ret
}
return o.Metadata
}

// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SyntheticsTestRequest) GetMetadataOk() (*map[string]string, bool) {
if o == nil || o.Metadata == nil {
return nil, false
}
return &o.Metadata, true
}

// HasMetadata returns a boolean if a field has been set.
func (o *SyntheticsTestRequest) HasMetadata() bool {
if o != nil && o.Metadata != nil {
return true
}

return false
}

// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field.
func (o *SyntheticsTestRequest) SetMetadata(v map[string]string) {
o.Metadata = v
}

// GetMethod returns the Method field value if set, zero value otherwise.
func (o *SyntheticsTestRequest) GetMethod() HTTPMethod {
if o == nil || o.Method == nil {
Expand Down Expand Up @@ -751,6 +785,9 @@ func (o SyntheticsTestRequest) MarshalJSON() ([]byte, error) {
if o.Message != nil {
toSerialize["message"] = o.Message
}
if o.Metadata != nil {
toSerialize["metadata"] = o.Metadata
}
if o.Method != nil {
toSerialize["method"] = o.Method
}
Expand Down Expand Up @@ -801,6 +838,7 @@ func (o *SyntheticsTestRequest) UnmarshalJSON(bytes []byte) (err error) {
Headers map[string]string `json:"headers,omitempty"`
Host *string `json:"host,omitempty"`
Message *string `json:"message,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
Method *HTTPMethod `json:"method,omitempty"`
NoSavingResponseBody *bool `json:"noSavingResponseBody,omitempty"`
NumberOfPackets *int32 `json:"numberOfPackets,omitempty"`
Expand Down Expand Up @@ -846,6 +884,7 @@ func (o *SyntheticsTestRequest) UnmarshalJSON(bytes []byte) (err error) {
o.Headers = all.Headers
o.Host = all.Host
o.Message = all.Message
o.Metadata = all.Metadata
o.Method = all.Method
o.NoSavingResponseBody = all.NoSavingResponseBody
o.NumberOfPackets = all.NumberOfPackets
Expand Down
4 changes: 2 additions & 2 deletions tests/scenarios/features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ Feature: Dashboards
When the request is sent
Then the response status is 404 Dashboards Not Found

@skip-typescript @team:DataDog/dashboards
@team:DataDog/dashboards
Scenario: Delete dashboards returns "No Content" response
Given there is a valid "dashboard" in the system
And new "DeleteDashboards" request
Expand Down Expand Up @@ -480,7 +480,7 @@ Feature: Dashboards
When the request is sent
Then the response status is 404 Dashboards Not Found

@skip-typescript @team:DataDog/dashboards
@team:DataDog/dashboards
Scenario: Restore deleted dashboards returns "No Content" response
Given there is a valid "dashboard" in the system
And the "dashboard" was deleted
Expand Down
4 changes: 2 additions & 2 deletions tests/scenarios/features/v1/downtimes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Feature: Downtimes
And a valid "appKeyAuth" key in the system
And an instance of "Downtimes" API

@skip-typescript @team:DataDog/monitor-app
@team:DataDog/monitor-app
Scenario: Cancel a downtime returns "Downtime not found" response
Given new "CancelDowntime" request
And request contains "downtime_id" parameter with value 0
When the request is sent
Then the response status is 404 Downtime not found

@skip-typescript @team:DataDog/monitor-app
@team:DataDog/monitor-app
Scenario: Cancel a downtime returns "OK" response
Given there is a valid "downtime" in the system
And new "CancelDowntime" request
Expand Down
12 changes: 12 additions & 0 deletions tests/scenarios/features/v1/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@
"tag": "Synthetics",
"operationId": "CreateSyntheticsAPITest"
},
{
"parameters": [
{
"name": "body",
"value": "{\n \"config\": {\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"target\": 1,\n \"type\": \"grpcHealthcheckStatus\"\n }\n ],\n \"request\": {\n \"host\": \"localhost\",\n \"port\": 50051,\n \"service\": \"Hello\",\n \"method\": \"GET\",\n \"message\": \"\",\n \"metadata\": {}\n }\n },\n \"locations\": [\n \"aws:ca-central-1\"\n ],\n \"message\": \"\",\n \"name\": \"BDD test payload: synthetics_api_grpc_test_payload.json\",\n \"options\": {\n \"httpVersion\": \"http1\",\n \"min_failure_duration\": 0,\n \"min_location_failed\": 1,\n \"monitor_options\": {\n \"renotify_interval\": 0\n },\n \"tick_every\": 60\n },\n \"subtype\": \"grpc\",\n \"tags\": [],\n \"type\": \"api\"\n}"
}
],
"step": "there is a valid \"synthetics_grpc_test\" in the system",
"key": "synthetics_grpc_test",
"tag": "Synthetics",
"operationId": "CreateSyntheticsAPITest"
},
{
"parameters": [
{
Expand Down
4 changes: 2 additions & 2 deletions tests/scenarios/features/v1/notebooks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ Feature: Notebooks
When the request is sent
Then the response status is 400 Bad Request

@skip-typescript @team:DataDog/notebooks
@team:DataDog/notebooks
Scenario: Delete a notebook returns "Not Found" response
Given new "DeleteNotebook" request
And request contains "notebook_id" parameter with value 123456
When the request is sent
Then the response status is 404 Not Found

@skip-typescript @team:DataDog/notebooks
@team:DataDog/notebooks
Scenario: Delete a notebook returns "OK" response
Given new "DeleteNotebook" request
And there is a valid "notebook" in the system
Expand Down
36 changes: 36 additions & 0 deletions tests/scenarios/features/v1/synthetics_api_grpc_test_payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"config": {
"assertions": [
{
"operator": "is",
"target": 1,
"type": "grpcHealthcheckStatus"
}
],
"request": {
"host": "localhost",
"port": 50051,
"service": "Hello",
"method": "GET",
"message": "",
"metadata": {}
}
},
"locations": [
"aws:ca-central-1"
],
"message": "",
"name": "BDD test payload: synthetics_api_grpc_test_payload.json",
"options": {
"httpVersion": "http1",
"min_failure_duration": 0,
"min_location_failed": 1,
"monitor_options": {
"renotify_interval": 0
},
"tick_every": 60
},
"subtype": "grpc",
"tags": [],
"type": "api"
}
4 changes: 2 additions & 2 deletions tests/scenarios/features/v1/webhooks_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Feature: Webhooks Integration
When the request is sent
Then the response status is 404 Item Not Found

@skip-typescript @skip-terraform-config @team:Datadog/collaboration-integrations
@skip-terraform-config @team:Datadog/collaboration-integrations
Scenario: Delete a custom variable returns "OK" response
Given there is a valid "webhook_custom_variable" in the system
And new "DeleteWebhooksIntegrationCustomVariable" request
Expand All @@ -59,7 +59,7 @@ Feature: Webhooks Integration
When the request is sent
Then the response status is 404 Item Not Found

@skip-typescript @skip-terraform-config @team:Datadog/collaboration-integrations
@skip-terraform-config @team:Datadog/collaboration-integrations
Scenario: Delete a webhook returns "OK" response
Given there is a valid "webhook" in the system
And new "DeleteWebhooksIntegration" request
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/features/v2/authn_mappings.feature
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Feature: AuthN Mappings
When the request is sent
Then the response status is 404 Not Found

@skip-typescript @team:DataDog/team-aaa
@team:DataDog/team-aaa
Scenario: Delete an AuthN Mapping returns "OK" response
Given there is a valid "role" in the system
And there is a valid "authn_mapping" in the system
Expand Down
Loading

0 comments on commit 44509f7

Please sign in to comment.