File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1
1
configured_endpoints : 1759
2
- openapi_spec_url : https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bb4f00f35d216fc086f41a566a2008bf2d7665f18c9977f0c305df8aa50610f9 .yml
3
- openapi_spec_hash : 07db6ce298038f2c1688b7b2ee9f4c43
2
+ openapi_spec_url : https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9da40dd6e26c12cb5cc2621882e3a721c33102947241937aecf8b1cf1bfd1906 .yml
3
+ openapi_spec_hash : 8e673d154552fd22c1291dc39644d664
4
4
config_hash : 920bb1b417565d337cbdb7c39e77be5b
Original file line number Diff line number Diff line change 7
7
"context"
8
8
"errors"
9
9
"fmt"
10
+ "io"
10
11
"mime/multipart"
11
12
"net/http"
12
13
"net/url"
@@ -228,9 +229,9 @@ type V1NewParams struct {
228
229
// Account identifier tag.
229
230
AccountID param.Field [string ] `path:"account_id,required"`
230
231
// An optional custom unique identifier for your image.
231
- ID param.Field [interface {} ] `json:"id"`
232
+ ID param.Field [string ] `json:"id"`
232
233
// An image binary data. Only needed when type is uploading a file.
233
- File param.Field [interface {} ] `json:"file"`
234
+ File param.Field [io. Reader ] `json:"file" format:"binary "`
234
235
// User modifiable key-value store. Can use used for keeping references to another
235
236
// system of record for managing images.
236
237
Metadata param.Field [interface {}] `json:"metadata"`
Original file line number Diff line number Diff line change 3
3
package images_test
4
4
5
5
import (
6
+ "bytes"
6
7
"context"
7
8
"errors"
9
+ "io"
8
10
"os"
9
11
"testing"
10
12
@@ -30,8 +32,8 @@ func TestV1NewWithOptionalParams(t *testing.T) {
30
32
)
31
33
_ , err := client .Images .V1 .New (context .TODO (), images.V1NewParams {
32
34
AccountID : cloudflare .F ("023e105f4ecef8ad9ca31a8372d0c353" ),
33
- ID : cloudflare.F [ any ]( map [ string ] interface {}{} ),
34
- File : cloudflare.F [ any ]( map [ string ] interface {}{} ),
35
+ ID : cloudflare .F ( "id" ),
36
+ File : cloudflare .F ( io . Reader ( bytes . NewBuffer ([] byte ( "some file contents" ))) ),
35
37
Metadata : cloudflare.F [any ](map [string ]interface {}{}),
36
38
RequireSignedURLs : cloudflare .F (true ),
37
39
URL : cloudflare .F ("https://example.com/path/to/logo.png" ),
You can’t perform that action at this time.
0 commit comments