-
Notifications
You must be signed in to change notification settings - Fork 4
feat: support application/octet-stream req/res bodies #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -10875,7 +10875,7 @@ export class StripeApiService { | |||
| Server<"getQuotesQuotePdf_StripeApiService"> | |||
| string = StripeApiServiceServers.operations.getQuotesQuotePdf().build(), | |||
): Observable< | |||
| (HttpResponse<string> & {status: 200}) | |||
| (HttpResponse<Blob> & {status: 200}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: add responseType: "blob"
to the HttpClient
call
@@ -134,7 +136,7 @@ router.${builder.method.toLowerCase()}(\`${builder.route}\`, async (req: Request | |||
const input = { | |||
params: ${params.path.schema ? `parseRequestInput(${symbols.paramSchema}, req.params, RequestInputType.RouteParam)` : "undefined"}, | |||
query: ${params.query.schema ? `parseRequestInput(${symbols.querySchema}, req.query, RequestInputType.QueryString)` : "undefined"}, | |||
body: ${params.body.schema ? `parseRequestInput(${symbols.requestBodySchema}, req.body, RequestInputType.RequestBody)` : "undefined"}, | |||
body: ${params.body.schema ? (params.body.contentType === "application/octet-stream" ? `parseRequestInput(${symbols.requestBodySchema}, await parseOctetStream(req), RequestInputType.RequestBody)` : `parseRequestInput(${symbols.requestBodySchema}, req.body, RequestInputType.RequestBody)`) : "undefined"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: this is getting a bit out of hand
// TODO: support more serializations | ||
// | "Blob" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: update documentation
application/octet-stream
content types for both request and response bodiesraw-body
for the request body parsing side of things. It might make sense to see if we could always use this and drop the other body parsers