Skip to content

Commit 9532f15

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 873a8485 of spec repo
1 parent 413fb07 commit 9532f15

File tree

9 files changed

+74
-26
lines changed

9 files changed

+74
-26
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-06-26 17:56:23.043504",
8-
"spec_repo_commit": "76086f13"
7+
"regenerated": "2025-06-30 09:18:34.411180",
8+
"spec_repo_commit": "873a8485"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-26 17:56:23.062756",
13-
"spec_repo_commit": "76086f13"
12+
"regenerated": "2025-06-30 09:18:34.430402",
13+
"spec_repo_commit": "873a8485"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16173,6 +16173,7 @@ components:
1617316173
- name
1617416174
- options
1617516175
- type
16176+
- message
1617616177
type: object
1617716178
SyntheticsMobileTestConfig:
1617816179
description: Configuration object for a Synthetic mobile test.

api/datadogV1/model_synthetics_mobile_test_.go

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type SyntheticsMobileTest struct {
1717
// Array with the different device IDs used to run the test.
1818
DeviceIds []string `json:"device_ids,omitempty"`
1919
// Notification message associated with the test.
20-
Message *string `json:"message,omitempty"`
20+
Message string `json:"message"`
2121
// The associated monitor ID.
2222
MonitorId *int64 `json:"monitor_id,omitempty"`
2323
// Name of the test.
@@ -44,9 +44,10 @@ type SyntheticsMobileTest struct {
4444
// This constructor will assign default values to properties that have it defined,
4545
// and makes sure properties required by API are set, but the set of arguments
4646
// will change when the set of required properties is changed.
47-
func NewSyntheticsMobileTest(config SyntheticsMobileTestConfig, name string, options SyntheticsMobileTestOptions, typeVar SyntheticsMobileTestType) *SyntheticsMobileTest {
47+
func NewSyntheticsMobileTest(config SyntheticsMobileTestConfig, message string, name string, options SyntheticsMobileTestOptions, typeVar SyntheticsMobileTestType) *SyntheticsMobileTest {
4848
this := SyntheticsMobileTest{}
4949
this.Config = config
50+
this.Message = message
5051
this.Name = name
5152
this.Options = options
5253
this.Type = typeVar
@@ -114,32 +115,27 @@ func (o *SyntheticsMobileTest) SetDeviceIds(v []string) {
114115
o.DeviceIds = v
115116
}
116117

117-
// GetMessage returns the Message field value if set, zero value otherwise.
118+
// GetMessage returns the Message field value.
118119
func (o *SyntheticsMobileTest) GetMessage() string {
119-
if o == nil || o.Message == nil {
120+
if o == nil {
120121
var ret string
121122
return ret
122123
}
123-
return *o.Message
124+
return o.Message
124125
}
125126

126-
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
127+
// GetMessageOk returns a tuple with the Message field value
127128
// and a boolean to check if the value has been set.
128129
func (o *SyntheticsMobileTest) GetMessageOk() (*string, bool) {
129-
if o == nil || o.Message == nil {
130+
if o == nil {
130131
return nil, false
131132
}
132-
return o.Message, true
133-
}
134-
135-
// HasMessage returns a boolean if a field has been set.
136-
func (o *SyntheticsMobileTest) HasMessage() bool {
137-
return o != nil && o.Message != nil
133+
return &o.Message, true
138134
}
139135

140-
// SetMessage gets a reference to the given string and assigns it to the Message field.
136+
// SetMessage sets field value.
141137
func (o *SyntheticsMobileTest) SetMessage(v string) {
142-
o.Message = &v
138+
o.Message = v
143139
}
144140

145141
// GetMonitorId returns the MonitorId field value if set, zero value otherwise.
@@ -361,9 +357,7 @@ func (o SyntheticsMobileTest) MarshalJSON() ([]byte, error) {
361357
if o.DeviceIds != nil {
362358
toSerialize["device_ids"] = o.DeviceIds
363359
}
364-
if o.Message != nil {
365-
toSerialize["message"] = o.Message
366-
}
360+
toSerialize["message"] = o.Message
367361
if o.MonitorId != nil {
368362
toSerialize["monitor_id"] = o.MonitorId
369363
}
@@ -394,7 +388,7 @@ func (o *SyntheticsMobileTest) UnmarshalJSON(bytes []byte) (err error) {
394388
all := struct {
395389
Config *SyntheticsMobileTestConfig `json:"config"`
396390
DeviceIds []string `json:"device_ids,omitempty"`
397-
Message *string `json:"message,omitempty"`
391+
Message *string `json:"message"`
398392
MonitorId *int64 `json:"monitor_id,omitempty"`
399393
Name *string `json:"name"`
400394
Options *SyntheticsMobileTestOptions `json:"options"`
@@ -410,6 +404,9 @@ func (o *SyntheticsMobileTest) UnmarshalJSON(bytes []byte) (err error) {
410404
if all.Config == nil {
411405
return fmt.Errorf("required field config missing")
412406
}
407+
if all.Message == nil {
408+
return fmt.Errorf("required field message missing")
409+
}
413410
if all.Name == nil {
414411
return fmt.Errorf("required field name missing")
415412
}
@@ -432,7 +429,7 @@ func (o *SyntheticsMobileTest) UnmarshalJSON(bytes []byte) (err error) {
432429
}
433430
o.Config = *all.Config
434431
o.DeviceIds = all.DeviceIds
435-
o.Message = all.Message
432+
o.Message = *all.Message
436433
o.MonitorId = all.MonitorId
437434
o.Name = *all.Name
438435
if all.Options.UnparsedObject != nil && o.UnparsedObject == nil {

examples/v1/synthetics/CreateSyntheticsMobileTest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func main() {
2020
Config: datadogV1.SyntheticsMobileTestConfig{
2121
Variables: []datadogV1.SyntheticsConfigVariable{},
2222
},
23-
Message: datadog.PtrString(""),
23+
Message: "",
2424
Options: datadogV1.SyntheticsMobileTestOptions{
2525
DeviceIds: []string{
2626
"synthetics:mobile:device:iphone_15_ios_17",

examples/v1/synthetics/UpdateMobileTest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func main() {
2323
Config: datadogV1.SyntheticsMobileTestConfig{
2424
Variables: []datadogV1.SyntheticsConfigVariable{},
2525
},
26-
Message: datadog.PtrString(""),
26+
Message: "",
2727
Options: datadogV1.SyntheticsMobileTestOptions{
2828
DeviceIds: []string{
2929
"synthetics:mobile:device:iphone_15_ios_17",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-06-30T08:28:52.972Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
interactions:
2+
- request:
3+
body: |
4+
{"config":{"variables":[]},"name":"Test-Create_a_mobile_test_returns_response-1751272132","options":{"device_ids":["synthetics:mobile:device:iphone_15_ios_17"],"mobileApplication":{"applicationId":"ab0e0aed-536d-411a-9a99-5428c27d8f8e","referenceId":"6115922a-5f5d-455e-bc7e-7955a57f3815","referenceType":"version"},"tick_every":3600},"status":"paused","steps":[],"type":"mobile"}
5+
form: {}
6+
headers:
7+
Accept:
8+
- application/json
9+
Content-Type:
10+
- application/json
11+
id: 0
12+
method: POST
13+
url: https://api.datadoghq.com/api/v1/synthetics/tests/mobile
14+
response:
15+
body: '{"errors":["Required parameter ''message'' is missing"]}'
16+
code: 400
17+
duration: 0ms
18+
headers:
19+
Content-Type:
20+
- application/json
21+
status: 400 Bad Request
22+
version: 2

tests/scenarios/features/v1/synthetics.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ Feature: Synthetics
128128
When the request is sent
129129
Then the response status is 200 OK
130130

131+
@team:DataDog/synthetics-ct
132+
Scenario: Create a mobile test returns "" response
133+
Given new "CreateSyntheticsMobileTest" request
134+
And body from file "synthetics_mobile_test_payload_missing_message.json"
135+
When the request is sent
136+
Then the response status is 400 - required message field is missing
137+
131138
@generated @skip @team:DataDog/synthetics-ct
132139
Scenario: Create a mobile test returns "- JSON format is wrong" response
133140
Given new "CreateSyntheticsMobileTest" request
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "{{ unique }}",
3+
"status": "paused",
4+
"type": "mobile",
5+
"config": {
6+
"variables": []
7+
},
8+
"options": {
9+
"device_ids": [
10+
"synthetics:mobile:device:iphone_15_ios_17"
11+
],
12+
"mobileApplication": {
13+
"applicationId": "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
14+
"referenceId": "6115922a-5f5d-455e-bc7e-7955a57f3815",
15+
"referenceType": "version"
16+
},
17+
"tick_every": 3600
18+
},
19+
"steps": []
20+
}

0 commit comments

Comments
 (0)