Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

Commit 470df11

Browse files
authored
Merge pull request #108 from taskcluster/bug1373938
Bug 1437461 - Use taskcluster-lib-artifact-go for uploading/downloading artifacts
2 parents 07af6da + 77811b2 commit 470df11

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ To declare an API method, call `builder.declare(options, handler)` with the foll
109109
containing the schema in `schemas/<version>`, i.e. `schema.yaml`
110110
* `skipInputValidation` - if true, don't do input validation (but include the schema in documentation)
111111
* `output` - the schema against which the output payload will be validated. This should be the path to the file
112-
containing the schema in `schemas/<version>`, i.e. `schema.yaml`
112+
containing the schema in `schemas/<version>`, i.e. `schema.yaml`. If the value is 'blob', the output of the
113+
method should be interpreted as a stream of bytes and not a JSON document
113114
* `skipOutputValidation` - if true, don't do output validation (but include the schema in documentation)
114115
* `cleanPayload` - a function taking and returning a payload, which will "clean" any values that should
115116
not appear in error messages (for example, removing secrets)
@@ -223,6 +224,12 @@ JSON-schema files which the method input payload and output body must satisfy.
223224
The output property can also have the special property `blob` indicating that
224225
it is not a JSON value, but this is rarely used.
225226

227+
A special value for `output` of `blob` informs client libraries that the output
228+
of the method is a stream of bytes and not a JSON document for the client to
229+
interpret as an API response. This is useful when serving user content, like
230+
artifacts. The response might be a JSON document, but the client should still
231+
treat it as an opaque stream of bytes instead of interpreting it.
232+
226233
The schema declarations are expected to be in
227234
`schemas/<api.version>/<schemafile>`, as loaded by taskcluster-lib-validate.
228235
For example:

0 commit comments

Comments
 (0)