fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #3123 from crunchloop/fix/sse-body-serialization

fix: use serialized body in SSE client requests

authored by

Lubos and committed by
GitHub
84bdb90d 276bde1d

+1072
+5
.changeset/brave-heads-battle.md
··· 1 + --- 2 + '@hey-api/openapi-ts': minor 3 + --- 4 + 5 + Fix body serialization for sse client
+4
examples/openapi-ts-angular-common/src/client/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
examples/openapi-ts-angular/src/client/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
examples/openapi-ts-axios/src/client/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
examples/openapi-ts-fastify/src/client/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
examples/openapi-ts-fetch/src/client/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
examples/openapi-ts-ky/src/client/client/client.gen.ts
··· 307 307 } 308 308 return request; 309 309 }, 310 + serializedBody: getValidRequestBody(opts) as 311 + | BodyInit 312 + | null 313 + | undefined, 310 314 url, 311 315 }); 312 316 };
+4
examples/openapi-ts-next/src/client/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+4
examples/openapi-ts-openai/src/client/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+1
examples/openapi-ts-pinia-colada/src/client/client/client.gen.ts
··· 247 247 } 248 248 return request 249 249 }, 250 + serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined, 250 251 url 251 252 }) 252 253 }
+4
examples/openapi-ts-tanstack-angular-query-experimental/src/client/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
examples/openapi-ts-tanstack-react-query/src/client/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
examples/openapi-ts-tanstack-svelte-query/src/client/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+1
examples/openapi-ts-tanstack-vue-query/src/client/client/client.gen.ts
··· 247 247 } 248 248 return request 249 249 }, 250 + serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined, 250 251 url 251 252 }) 252 253 }
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/schema-unknown/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-base-path/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers-host/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/servers/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/transforms-read-write/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-api-key/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-false/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-http-bearer/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-oauth2/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/security-open-id-connect/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/servers/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-all-of/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-any-of-null/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-array/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-recursive/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transforms-read-write/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/body-response-text-plain/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-false/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-number/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-strict/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/base-url-string/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/clean-false/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/default/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/import-file-extension-ts/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-optional/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/sdk-client-required/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-node16-sdk/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-angular/tsconfig-nodenext-sdk/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-false/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-number/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-strict/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/base-url-string/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/clean-false/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/default/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/import-file-extension-ts/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-optional/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/sdk-client-required/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-node16-sdk/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-axios/tsconfig-nodenext-sdk/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-false/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-number/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-strict/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/base-url-string/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/clean-false/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/default/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/import-file-extension-ts/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-optional/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/sdk-client-required/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-node16-sdk/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/tsconfig-nodenext-sdk/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-false/client/client.gen.ts
··· 307 307 } 308 308 return request; 309 309 }, 310 + serializedBody: getValidRequestBody(opts) as 311 + | BodyInit 312 + | null 313 + | undefined, 310 314 url, 311 315 }); 312 316 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-number/client/client.gen.ts
··· 307 307 } 308 308 return request; 309 309 }, 310 + serializedBody: getValidRequestBody(opts) as 311 + | BodyInit 312 + | null 313 + | undefined, 310 314 url, 311 315 }); 312 316 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-strict/client/client.gen.ts
··· 307 307 } 308 308 return request; 309 309 }, 310 + serializedBody: getValidRequestBody(opts) as 311 + | BodyInit 312 + | null 313 + | undefined, 310 314 url, 311 315 }); 312 316 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/base-url-string/client/client.gen.ts
··· 307 307 } 308 308 return request; 309 309 }, 310 + serializedBody: getValidRequestBody(opts) as 311 + | BodyInit 312 + | null 313 + | undefined, 310 314 url, 311 315 }); 312 316 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/clean-false/client/client.gen.ts
··· 307 307 } 308 308 return request; 309 309 }, 310 + serializedBody: getValidRequestBody(opts) as 311 + | BodyInit 312 + | null 313 + | undefined, 310 314 url, 311 315 }); 312 316 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/default/client/client.gen.ts
··· 307 307 } 308 308 return request; 309 309 }, 310 + serializedBody: getValidRequestBody(opts) as 311 + | BodyInit 312 + | null 313 + | undefined, 310 314 url, 311 315 }); 312 316 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/import-file-extension-ts/client/client.gen.ts
··· 307 307 } 308 308 return request; 309 309 }, 310 + serializedBody: getValidRequestBody(opts) as 311 + | BodyInit 312 + | null 313 + | undefined, 310 314 url, 311 315 }); 312 316 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-optional/client/client.gen.ts
··· 307 307 } 308 308 return request; 309 309 }, 310 + serializedBody: getValidRequestBody(opts) as 311 + | BodyInit 312 + | null 313 + | undefined, 310 314 url, 311 315 }); 312 316 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/sdk-client-required/client/client.gen.ts
··· 307 307 } 308 308 return request; 309 309 }, 310 + serializedBody: getValidRequestBody(opts) as 311 + | BodyInit 312 + | null 313 + | undefined, 310 314 url, 311 315 }); 312 316 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-node16-sdk/client/client.gen.ts
··· 307 307 } 308 308 return request; 309 309 }, 310 + serializedBody: getValidRequestBody(opts) as 311 + | BodyInit 312 + | null 313 + | undefined, 310 314 url, 311 315 }); 312 316 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-ky/tsconfig-nodenext-sdk/client/client.gen.ts
··· 307 307 } 308 308 return request; 309 309 }, 310 + serializedBody: getValidRequestBody(opts) as 311 + | BodyInit 312 + | null 313 + | undefined, 310 314 url, 311 315 }); 312 316 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-false/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-number/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-strict/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/base-url-string/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/clean-false/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/default/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/import-file-extension-ts/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-optional/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/sdk-client-required/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-node16-sdk/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-next/tsconfig-nodenext-sdk/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+5
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-false/client/client.gen.ts
··· 10 10 11 11 import { createSseClient } from '../core/serverSentEvents.gen'; 12 12 import type { HttpMethod } from '../core/types.gen'; 13 + import { getValidRequestBody } from '../core/utils.gen'; 13 14 import type { Client, Config, RequestOptions } from './types.gen'; 14 15 import { 15 16 buildUrl, ··· 195 196 body: opts.body as BodyInit | null | undefined, 196 197 method, 197 198 onRequest: undefined, 199 + serializedBody: getValidRequestBody(opts) as 200 + | BodyInit 201 + | null 202 + | undefined, 198 203 signal: unwrapRefs(opts.signal) as AbortSignal, 199 204 url, 200 205 });
+5
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-number/client/client.gen.ts
··· 10 10 11 11 import { createSseClient } from '../core/serverSentEvents.gen'; 12 12 import type { HttpMethod } from '../core/types.gen'; 13 + import { getValidRequestBody } from '../core/utils.gen'; 13 14 import type { Client, Config, RequestOptions } from './types.gen'; 14 15 import { 15 16 buildUrl, ··· 195 196 body: opts.body as BodyInit | null | undefined, 196 197 method, 197 198 onRequest: undefined, 199 + serializedBody: getValidRequestBody(opts) as 200 + | BodyInit 201 + | null 202 + | undefined, 198 203 signal: unwrapRefs(opts.signal) as AbortSignal, 199 204 url, 200 205 });
+5
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-strict/client/client.gen.ts
··· 10 10 11 11 import { createSseClient } from '../core/serverSentEvents.gen'; 12 12 import type { HttpMethod } from '../core/types.gen'; 13 + import { getValidRequestBody } from '../core/utils.gen'; 13 14 import type { Client, Config, RequestOptions } from './types.gen'; 14 15 import { 15 16 buildUrl, ··· 195 196 body: opts.body as BodyInit | null | undefined, 196 197 method, 197 198 onRequest: undefined, 199 + serializedBody: getValidRequestBody(opts) as 200 + | BodyInit 201 + | null 202 + | undefined, 198 203 signal: unwrapRefs(opts.signal) as AbortSignal, 199 204 url, 200 205 });
+5
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/base-url-string/client/client.gen.ts
··· 10 10 11 11 import { createSseClient } from '../core/serverSentEvents.gen'; 12 12 import type { HttpMethod } from '../core/types.gen'; 13 + import { getValidRequestBody } from '../core/utils.gen'; 13 14 import type { Client, Config, RequestOptions } from './types.gen'; 14 15 import { 15 16 buildUrl, ··· 195 196 body: opts.body as BodyInit | null | undefined, 196 197 method, 197 198 onRequest: undefined, 199 + serializedBody: getValidRequestBody(opts) as 200 + | BodyInit 201 + | null 202 + | undefined, 198 203 signal: unwrapRefs(opts.signal) as AbortSignal, 199 204 url, 200 205 });
+5
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/clean-false/client/client.gen.ts
··· 10 10 11 11 import { createSseClient } from '../core/serverSentEvents.gen'; 12 12 import type { HttpMethod } from '../core/types.gen'; 13 + import { getValidRequestBody } from '../core/utils.gen'; 13 14 import type { Client, Config, RequestOptions } from './types.gen'; 14 15 import { 15 16 buildUrl, ··· 195 196 body: opts.body as BodyInit | null | undefined, 196 197 method, 197 198 onRequest: undefined, 199 + serializedBody: getValidRequestBody(opts) as 200 + | BodyInit 201 + | null 202 + | undefined, 198 203 signal: unwrapRefs(opts.signal) as AbortSignal, 199 204 url, 200 205 });
+5
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/default/client/client.gen.ts
··· 10 10 11 11 import { createSseClient } from '../core/serverSentEvents.gen'; 12 12 import type { HttpMethod } from '../core/types.gen'; 13 + import { getValidRequestBody } from '../core/utils.gen'; 13 14 import type { Client, Config, RequestOptions } from './types.gen'; 14 15 import { 15 16 buildUrl, ··· 195 196 body: opts.body as BodyInit | null | undefined, 196 197 method, 197 198 onRequest: undefined, 199 + serializedBody: getValidRequestBody(opts) as 200 + | BodyInit 201 + | null 202 + | undefined, 198 203 signal: unwrapRefs(opts.signal) as AbortSignal, 199 204 url, 200 205 });
+5
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/import-file-extension-ts/client/client.gen.ts
··· 10 10 11 11 import { createSseClient } from '../core/serverSentEvents.gen.ts'; 12 12 import type { HttpMethod } from '../core/types.gen.ts'; 13 + import { getValidRequestBody } from '../core/utils.gen.ts'; 13 14 import type { Client, Config, RequestOptions } from './types.gen.ts'; 14 15 import { 15 16 buildUrl, ··· 195 196 body: opts.body as BodyInit | null | undefined, 196 197 method, 197 198 onRequest: undefined, 199 + serializedBody: getValidRequestBody(opts) as 200 + | BodyInit 201 + | null 202 + | undefined, 198 203 signal: unwrapRefs(opts.signal) as AbortSignal, 199 204 url, 200 205 });
+5
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-optional/client/client.gen.ts
··· 10 10 11 11 import { createSseClient } from '../core/serverSentEvents.gen'; 12 12 import type { HttpMethod } from '../core/types.gen'; 13 + import { getValidRequestBody } from '../core/utils.gen'; 13 14 import type { Client, Config, RequestOptions } from './types.gen'; 14 15 import { 15 16 buildUrl, ··· 195 196 body: opts.body as BodyInit | null | undefined, 196 197 method, 197 198 onRequest: undefined, 199 + serializedBody: getValidRequestBody(opts) as 200 + | BodyInit 201 + | null 202 + | undefined, 198 203 signal: unwrapRefs(opts.signal) as AbortSignal, 199 204 url, 200 205 });
+5
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/sdk-client-required/client/client.gen.ts
··· 10 10 11 11 import { createSseClient } from '../core/serverSentEvents.gen'; 12 12 import type { HttpMethod } from '../core/types.gen'; 13 + import { getValidRequestBody } from '../core/utils.gen'; 13 14 import type { Client, Config, RequestOptions } from './types.gen'; 14 15 import { 15 16 buildUrl, ··· 195 196 body: opts.body as BodyInit | null | undefined, 196 197 method, 197 198 onRequest: undefined, 199 + serializedBody: getValidRequestBody(opts) as 200 + | BodyInit 201 + | null 202 + | undefined, 198 203 signal: unwrapRefs(opts.signal) as AbortSignal, 199 204 url, 200 205 });
+5
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-node16-sdk/client/client.gen.ts
··· 10 10 11 11 import { createSseClient } from '../core/serverSentEvents.gen.js'; 12 12 import type { HttpMethod } from '../core/types.gen.js'; 13 + import { getValidRequestBody } from '../core/utils.gen.js'; 13 14 import type { Client, Config, RequestOptions } from './types.gen.js'; 14 15 import { 15 16 buildUrl, ··· 195 196 body: opts.body as BodyInit | null | undefined, 196 197 method, 197 198 onRequest: undefined, 199 + serializedBody: getValidRequestBody(opts) as 200 + | BodyInit 201 + | null 202 + | undefined, 198 203 signal: unwrapRefs(opts.signal) as AbortSignal, 199 204 url, 200 205 });
+5
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/tsconfig-nodenext-sdk/client/client.gen.ts
··· 10 10 11 11 import { createSseClient } from '../core/serverSentEvents.gen.js'; 12 12 import type { HttpMethod } from '../core/types.gen.js'; 13 + import { getValidRequestBody } from '../core/utils.gen.js'; 13 14 import type { Client, Config, RequestOptions } from './types.gen.js'; 14 15 import { 15 16 buildUrl, ··· 195 196 body: opts.body as BodyInit | null | undefined, 196 197 method, 197 198 onRequest: undefined, 199 + serializedBody: getValidRequestBody(opts) as 200 + | BodyInit 201 + | null 202 + | undefined, 198 203 signal: unwrapRefs(opts.signal) as AbortSignal, 199 204 url, 200 205 });
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/content-types/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/headers/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false-axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/parameter-explode-false/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default-class/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@angular/common/default/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/default/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/instance/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-valibot/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-custom-name/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/typescript/transforms-read-write-ignore/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-api-key/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-false/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-http-bearer/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-oauth2/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/security-open-id-connect/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/servers/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-angular/client/client.gen.ts
··· 214 214 body: opts.body as BodyInit | null | undefined, 215 215 headers: opts.headers as unknown as Record<string, string>, 216 216 method, 217 + serializedBody: getValidRequestBody(opts) as 218 + | BodyInit 219 + | null 220 + | undefined, 217 221 url, 218 222 }); 219 223 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-axios/client/client.gen.ts
··· 127 127 body: opts.body as BodyInit | null | undefined, 128 128 headers: opts.headers as Record<string, string>, 129 129 method, 130 + serializedBody: getValidRequestBody(opts) as 131 + | BodyInit 132 + | null 133 + | undefined, 130 134 // @ts-expect-error 131 135 signal: opts.signal, 132 136 url,
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-fetch/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-next/client/client.gen.ts
··· 228 228 } 229 229 return request; 230 230 }, 231 + serializedBody: getValidRequestBody(opts) as 232 + | BodyInit 233 + | null 234 + | undefined, 231 235 url, 232 236 }); 233 237 };
+5
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/sse-nuxt/client/client.gen.ts
··· 10 10 11 11 import { createSseClient } from '../core/serverSentEvents.gen'; 12 12 import type { HttpMethod } from '../core/types.gen'; 13 + import { getValidRequestBody } from '../core/utils.gen'; 13 14 import type { Client, Config, RequestOptions } from './types.gen'; 14 15 import { 15 16 buildUrl, ··· 195 196 body: opts.body as BodyInit | null | undefined, 196 197 method, 197 198 onRequest: undefined, 199 + serializedBody: getValidRequestBody(opts) as 200 + | BodyInit 201 + | null 202 + | undefined, 198 203 signal: unwrapRefs(opts.signal) as AbortSignal, 199 204 url, 200 205 });
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-all-of/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-any-of-null/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-array/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-recursive/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/class/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/flat/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/sdks/__snapshots__/method-class-conflict/instance/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/sdks/__snapshots__/opencode/export-all/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/sdks/__snapshots__/opencode/flat/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts-tests/sdks/__snapshots__/opencode/grouped/client/client.gen.ts
··· 267 267 } 268 268 return request; 269 269 }, 270 + serializedBody: getValidRequestBody(opts) as 271 + | BodyInit 272 + | null 273 + | undefined, 270 274 url, 271 275 }); 272 276 };
+4
packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.ts
··· 212 212 body: opts.body as BodyInit | null | undefined, 213 213 headers: opts.headers as unknown as Record<string, string>, 214 214 method, 215 + serializedBody: getValidRequestBody(opts) as 216 + | BodyInit 217 + | null 218 + | undefined, 215 219 url, 216 220 }); 217 221 };
+4
packages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.ts
··· 125 125 body: opts.body as BodyInit | null | undefined, 126 126 headers: opts.headers as Record<string, string>, 127 127 method, 128 + serializedBody: getValidRequestBody(opts) as 129 + | BodyInit 130 + | null 131 + | undefined, 128 132 // @ts-expect-error 129 133 signal: opts.signal, 130 134 url,
+96
packages/openapi-ts/src/plugins/@hey-api/client-core/__tests__/serverSentEvents.test.ts
··· 690 690 expect(result).toEqual([1, 2, 3]); 691 691 }); 692 692 }); 693 + 694 + describe('serialized request body handling', () => { 695 + let fetchMock: any; 696 + 697 + beforeEach(() => { 698 + fetchMock = vi.fn(); 699 + global.fetch = fetchMock; 700 + }); 701 + 702 + afterEach(() => { 703 + vi.restoreAllMocks(); 704 + }); 705 + 706 + it('sends serialized JSON body in SSE request', async () => { 707 + fetchMock.mockResolvedValue({ 708 + body: makeStream(['data: ok\n\n']), 709 + ok: true, 710 + }); 711 + 712 + const jsonBody = { key: 'value' }; 713 + const serializedBody = JSON.stringify(jsonBody); 714 + 715 + const { stream } = createSseClient({ 716 + body: jsonBody as any, 717 + method: 'POST', 718 + serializedBody, 719 + url: 'http://localhost/sse', 720 + }); 721 + 722 + const iter = stream[Symbol.asyncIterator](); 723 + await iter.next(); 724 + await iter.return?.(); 725 + 726 + expect(fetchMock).toHaveBeenCalled(); 727 + const request = fetchMock.mock.calls[0]![0]; 728 + expect(request).toBeInstanceOf(Request); 729 + await expect(request.text()).resolves.toBe(serializedBody); 730 + }); 731 + 732 + it('handles empty string serializedBody', async () => { 733 + fetchMock.mockResolvedValue({ 734 + body: makeStream(['data: ok\n\n']), 735 + ok: true, 736 + }); 737 + 738 + const { stream } = createSseClient({ 739 + body: '' as any, 740 + method: 'POST', 741 + serializedBody: '', 742 + url: 'http://localhost/sse', 743 + }); 744 + 745 + const iter = stream[Symbol.asyncIterator](); 746 + await iter.next(); 747 + await iter.return?.(); 748 + 749 + expect(fetchMock).toHaveBeenCalled(); 750 + const request = fetchMock.mock.calls[0]![0]; 751 + expect(request).toBeInstanceOf(Request); 752 + await expect(request.text()).resolves.toBe(''); 753 + }); 754 + 755 + it('provides serialized body to onRequest hook', async () => { 756 + fetchMock.mockResolvedValue({ 757 + body: makeStream(['data: ok\n\n']), 758 + ok: true, 759 + }); 760 + 761 + const jsonBody = { key: 'value' }; 762 + const serializedBody = JSON.stringify(jsonBody); 763 + const onRequest = vi.fn(async (url: string, init: RequestInit) => { 764 + expect(init.body).toBe(serializedBody); 765 + return toRequest(url, init); 766 + }); 767 + 768 + const { stream } = createSseClient({ 769 + body: jsonBody as any, 770 + method: 'POST', 771 + onRequest, 772 + serializedBody, 773 + url: 'http://localhost/sse', 774 + }); 775 + 776 + const iter = stream[Symbol.asyncIterator](); 777 + await iter.next(); 778 + await iter.return?.(); 779 + 780 + expect(onRequest).toHaveBeenCalledWith( 781 + 'http://localhost/sse', 782 + expect.objectContaining({ 783 + body: serializedBody, 784 + method: 'POST', 785 + }), 786 + ); 787 + }); 788 + });
+4
packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts
··· 265 265 } 266 266 return request; 267 267 }, 268 + serializedBody: getValidRequestBody(opts) as 269 + | BodyInit 270 + | null 271 + | undefined, 268 272 url, 269 273 }); 270 274 };
+4
packages/openapi-ts/src/plugins/@hey-api/client-ky/bundle/client.ts
··· 305 305 } 306 306 return request; 307 307 }, 308 + serializedBody: getValidRequestBody(opts) as 309 + | BodyInit 310 + | null 311 + | undefined, 308 312 url, 309 313 }); 310 314 };
+4
packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts
··· 226 226 } 227 227 return request; 228 228 }, 229 + serializedBody: getValidRequestBody(opts) as 230 + | BodyInit 231 + | null 232 + | undefined, 229 233 url, 230 234 }); 231 235 };
+5
packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts
··· 8 8 9 9 import { createSseClient } from '../../client-core/bundle/serverSentEvents'; 10 10 import type { HttpMethod } from '../../client-core/bundle/types'; 11 + import { getValidRequestBody } from '../../client-core/bundle/utils'; 11 12 import type { Client, Config, RequestOptions } from './types'; 12 13 import { 13 14 buildUrl, ··· 193 194 body: opts.body as BodyInit | null | undefined, 194 195 method, 195 196 onRequest: undefined, 197 + serializedBody: getValidRequestBody(opts) as 198 + | BodyInit 199 + | null 200 + | undefined, 196 201 signal: unwrapRefs(opts.signal) as AbortSignal, 197 202 url, 198 203 });