You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are cases where API responses come in file (stream) format. Regardless of the NestJS Controller handler's return type, I want to change the response content type in Swagger or SDK documentation by recognizing the Header information.
In the NestJS official documentation, they guide both methods: directly connecting to the express or fastify response object using express(or fastify) res.pipe, and using the StreamableFile class as the handler return.
Can you please review support for some response content types (e.g. image/ ~ , video/ ~)?
@nestia/sdk v4.6.1
Suggestion
nest.Header("Content-Type", "image/*")
If the content-type is specified with a specific prefix (e.g., image, video), expect the API response to be in stream format, regardless of the controller handler's return type.
Swagger Example
Specify the sdk response body type as ReadableStream<Uint8Array<ArrayBufferLike>>.
The text was updated successfully, but these errors were encountered:
rojiwon123
changed the title
Support Content-Type "Image/*"
Support API responses in file stream format.
Jan 31, 2025
rojiwon123
changed the title
Support API responses in file stream format.
[Suggestion] Support API responses in file stream format.
Jan 31, 2025
Description
There are cases where API responses come in file (stream) format. Regardless of the NestJS Controller handler's return type, I want to change the response content type in Swagger or SDK documentation by recognizing the Header information.
In the NestJS official documentation, they guide both methods: directly connecting to the express or fastify response object using express(or fastify) res.pipe, and using the
StreamableFile
class as the handler return.Can you please review support for some response content types (e.g. image/ ~ , video/ ~)?
@nestia/sdk v4.6.1
Suggestion
nest.Header("Content-Type", "image/*")
ReadableStream<Uint8Array<ArrayBufferLike>>
.The text was updated successfully, but these errors were encountered: