Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#1789)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 15, 2024
1 parent 49d6aec commit 1bfe1dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions images/v2directupload.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ func (r v2DirectUploadNewResponseJSON) RawJSON() string {
type V2DirectUploadNewParams struct {
// Account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
// Optional Image Custom ID. Up to 1024 chars. Can include any number of subpaths,
// and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a
// UUID.
ID param.Field[string] `json:"id"`
// The date after which the upload will not be accepted. Minimum: Now + 2 minutes.
// Maximum: Now + 6 hours.
Expiry param.Field[time.Time] `json:"expiry" format:"date-time"`
Expand Down
1 change: 1 addition & 0 deletions images/v2directupload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func TestV2DirectUploadNewWithOptionalParams(t *testing.T) {
)
_, err := client.Images.V2.DirectUploads.New(context.TODO(), images.V2DirectUploadNewParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
ID: cloudflare.F("this/is/my-customid"),
Expiry: cloudflare.F(time.Now()),
Metadata: cloudflare.F[any](map[string]interface{}{}),
RequireSignedURLs: cloudflare.F(true),
Expand Down

0 comments on commit 1bfe1dc

Please sign in to comment.