@@ -109,7 +109,8 @@ To declare an API method, call `builder.declare(options, handler)` with the foll
109
109
containing the schema in ` schemas/<version> ` , i.e. ` schema.yaml `
110
110
* ` skipInputValidation ` - if true, don't do input validation (but include the schema in documentation)
111
111
* ` 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
113
114
* ` skipOutputValidation ` - if true, don't do output validation (but include the schema in documentation)
114
115
* ` cleanPayload ` - a function taking and returning a payload, which will "clean" any values that should
115
116
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.
223
224
The output property can also have the special property ` blob ` indicating that
224
225
it is not a JSON value, but this is rarely used.
225
226
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
+
226
233
The schema declarations are expected to be in
227
234
` schemas/<api.version>/<schemafile> ` , as loaded by taskcluster-lib-validate.
228
235
For example:
0 commit comments