Skip to content

Commit 51d32f9

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add encoding to file request (#3053)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 364c61c commit 51d32f9

6 files changed

Lines changed: 30 additions & 13 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18642,6 +18642,10 @@ components:
1864218642
description: Content of the file.
1864318643
maxLength: 3145728
1864418644
type: string
18645+
encoding:
18646+
description: Encoding of the file content. The only supported value is `base64`,
18647+
indicating the `content` field contains base64-encoded data.
18648+
type: string
1864518649
name:
1864618650
description: Name of the file.
1864718651
maxLength: 1500
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-09T11:18:08.137Z
1+
2026-03-03T11:12:53.062Z

cassettes/features/v1/synthetics/Create-an-API-test-with-a-file-payload-returns-OK-Returns-the-created-test-details-response.yml

Lines changed: 11 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
original_file_name: "image.png",
7676
content: "file content",
7777
type: "file type",
78+
encoding: "base64",
7879
}),
7980
],
8081
basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthOauthClient.new({

features/v1/synthetics_api_http_test_with_file_payload.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
"name": "file name",
6262
"originalFileName": "image.png",
6363
"content": "file content",
64-
"type": "file type"
64+
"type": "file type",
65+
"encoding": "base64"
6566
}],
6667
"basicAuth": {
6768
"accessTokenUrl": "https://datadog-token.com",

lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class SyntheticsTestRequestBodyFile
2727
# Content of the file.
2828
attr_reader :content
2929

30+
# Encoding of the file content. The only supported value is `base64`, indicating the `content` field contains base64-encoded data.
31+
attr_accessor :encoding
32+
3033
# Name of the file.
3134
attr_reader :name
3235

@@ -47,6 +50,7 @@ def self.attribute_map
4750
{
4851
:'bucket_key' => :'bucketKey',
4952
:'content' => :'content',
53+
:'encoding' => :'encoding',
5054
:'name' => :'name',
5155
:'original_file_name' => :'originalFileName',
5256
:'size' => :'size',
@@ -60,6 +64,7 @@ def self.openapi_types
6064
{
6165
:'bucket_key' => :'String',
6266
:'content' => :'String',
67+
:'encoding' => :'String',
6368
:'name' => :'String',
6469
:'original_file_name' => :'String',
6570
:'size' => :'Integer',
@@ -93,6 +98,10 @@ def initialize(attributes = {})
9398
self.content = attributes[:'content']
9499
end
95100

101+
if attributes.key?(:'encoding')
102+
self.encoding = attributes[:'encoding']
103+
end
104+
96105
if attributes.key?(:'name')
97106
self.name = attributes[:'name']
98107
end
@@ -204,6 +213,7 @@ def ==(o)
204213
self.class == o.class &&
205214
bucket_key == o.bucket_key &&
206215
content == o.content &&
216+
encoding == o.encoding &&
207217
name == o.name &&
208218
original_file_name == o.original_file_name &&
209219
size == o.size &&
@@ -215,7 +225,7 @@ def ==(o)
215225
# @return [Integer] Hash code
216226
# @!visibility private
217227
def hash
218-
[bucket_key, content, name, original_file_name, size, type, additional_properties].hash
228+
[bucket_key, content, encoding, name, original_file_name, size, type, additional_properties].hash
219229
end
220230
end
221231
end

0 commit comments

Comments
 (0)