Skip to content

Commit 669cef6

Browse files
authored
fix: add more zip info for build and deploy (#608)
I noticed we didn't have zip documented for builds and deploys
1 parent fc4aa39 commit 669cef6

File tree

4 files changed

+82
-5
lines changed

4 files changed

+82
-5
lines changed

go/models/deploy_files.go

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

go/plumbing/operations/create_site_build_parameters.go

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

go/plumbing/operations/operations_client.go

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

swagger.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,14 @@ paths:
12331233
post:
12341234
operationId: createSiteBuild
12351235
tags: [build]
1236-
description: 'Runs a build for a site. The build will be scheduled to run at the first opportunity, but it might not start immediately if insufficient account build capacity is available. Files for build could be also uploaded as a zipped site.'
1236+
description: |
1237+
Runs a build for a site. The build will be scheduled to run at the first opportunity, but it might not start immediately if insufficient account build capacity is available.
1238+
1239+
Files for build can be uploaded as a zipped site using one of these methods:
1240+
1. Set Content-Type to 'application/zip' and send the zip file as the raw request body
1241+
2. Set Content-Type to 'multipart/form-data' and include the zip file in the 'zip' field
1242+
consumes:
1243+
- multipart/form-data
12371244
parameters:
12381245
- name: branch
12391246
description: >-
@@ -1263,6 +1270,14 @@ paths:
12631270
required: false
12641271
in: query
12651272
type: string
1273+
- name: zip
1274+
description: |
1275+
A zip file containing the site files to build.
1276+
Only used with Content-Type 'multipart/form-data'.
1277+
Alternatively, set Content-Type to 'application/zip' and send the zip as the raw request body (no 'zip' parameter needed).
1278+
required: false
1279+
in: formData
1280+
type: file
12661281
responses:
12671282
'200':
12681283
description: OK
@@ -3786,9 +3801,23 @@ definitions:
37863801
$ref: '#/definitions/functionSchedule'
37873802
deployFiles:
37883803
type: object
3804+
description: |
3805+
Deploy files can be provided in two ways:
3806+
1. As a JSON object using 'files' (a hash mapping file paths to SHA1 digests), OR
3807+
2. As a zip file using one of these methods:
3808+
- Set Content-Type to 'application/zip' and send the zip file as the raw request body
3809+
- Include the zip file content in the 'zip' field of this JSON object with Content-Type 'application/json'
37893810
properties:
37903811
files:
37913812
type: object
3813+
description: A hash mapping file paths to SHA1 digests of the file contents.
3814+
zip:
3815+
type: string
3816+
format: binary
3817+
description: |
3818+
A zip file containing the site files to deploy. Alternative to 'files'.
3819+
To use this field, set Content-Type to 'application/json' and include the zip content here.
3820+
Alternatively, you can set Content-Type to 'application/zip' and send the zip as the raw request body (not as JSON).
37923821
draft:
37933822
type: boolean
37943823
async:

0 commit comments

Comments
 (0)