Skip to content

Conversation

mnahkies
Copy link
Owner

@mnahkies mnahkies commented Aug 9, 2025

  • adds support for application/octet-stream content types for both request and response bodies
  • introduces some associated helper functions, notably uses raw-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

@@ -10875,7 +10875,7 @@ export class StripeApiService {
| Server<"getQuotesQuotePdf_StripeApiService">
| string = StripeApiServiceServers.operations.getQuotesQuotePdf().build(),
): Observable<
| (HttpResponse<string> & {status: 200})
| (HttpResponse<Blob> & {status: 200})
Copy link
Owner Author

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"},
Copy link
Owner Author

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"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: update documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant