trpc-openapi icon indicating copy to clipboard operation
trpc-openapi copied to clipboard

Feat: Support for other `Content-Types`

Open o-dasher opened this issue 3 years ago • 3 comments

As of now trpc-openapi does not support sending a response using other Content-Types other than "application/json" is there any workaround for that? or i did something wrong here.

o-dasher avatar Jul 10 '22 15:07 o-dasher

Hi @o-dasher, currently trpc-openapi OpenApiV3 document currently only supports application/json as requestBodys. We can add support for other Content-Types if required, what do you need/what is your use-case?

jlalmes avatar Jul 11 '22 11:07 jlalmes

Sorry, i miss clicked on closing this issue, but my use case is that i want to send a file using the "application/octect-stream" headers for sending replays on a game server.

o-dasher avatar Jul 11 '22 15:07 o-dasher

We should ensure that @trpc/server can handle alternate Content-Types such as application/octet-stream, before supporting this functionality in trpc-openapi. There is an open tRPC issue here: https://github.com/trpc/trpc/issues/1937

jlalmes avatar Jul 11 '22 16:07 jlalmes

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 24 '22 11:10 stale[bot]