@hey-api/openapi-ts 0.80.15 → 0.80.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -7
- package/dist/{chunk-IF5PESMD.js → chunk-X4P65NTE.js} +18 -18
- package/dist/chunk-X4P65NTE.js.map +1 -0
- package/dist/clients/nuxt/client.ts +6 -1
- package/dist/clients/nuxt/types.ts +1 -0
- package/dist/clients/nuxt/utils.ts +1 -0
- package/dist/index.cjs +181 -181
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +47 -47
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +11 -11
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/{types.d-B_uo8LhA.d.cts → types.d-CFCN8diW.d.cts} +20 -4
- package/dist/{types.d-B_uo8LhA.d.ts → types.d-CFCN8diW.d.ts} +20 -4
- package/package.json +1 -1
- package/dist/chunk-IF5PESMD.js.map +0 -1
|
@@ -65,7 +65,11 @@ export const createClient = (config: Config = {}): Client => {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
if (requestValidator) {
|
|
68
|
-
await requestValidator(
|
|
68
|
+
await requestValidator({
|
|
69
|
+
...options,
|
|
70
|
+
// @ts-expect-error
|
|
71
|
+
body: options.rawBody,
|
|
72
|
+
});
|
|
69
73
|
}
|
|
70
74
|
},
|
|
71
75
|
...opts.onRequest,
|
|
@@ -107,6 +111,7 @@ export const createClient = (config: Config = {}): Client => {
|
|
|
107
111
|
}
|
|
108
112
|
|
|
109
113
|
if (composable === 'useFetch' || composable === 'useLazyFetch') {
|
|
114
|
+
opts.rawBody = opts.body;
|
|
110
115
|
const bodyParams = reactive({
|
|
111
116
|
body: opts.body,
|
|
112
117
|
bodySerializer: opts.bodySerializer,
|
|
@@ -72,6 +72,7 @@ export interface RequestOptions<
|
|
|
72
72
|
body?: unknown;
|
|
73
73
|
path?: FetchOptions<unknown>['query'];
|
|
74
74
|
query?: FetchOptions<unknown>['query'];
|
|
75
|
+
rawBody?: unknown;
|
|
75
76
|
}> {
|
|
76
77
|
asyncDataOptions?: AsyncDataOptions<ResT, ResT, KeysOf<ResT>, DefaultT>;
|
|
77
78
|
composable: TComposable;
|
|
@@ -369,6 +369,7 @@ export const executeFetchFn = (
|
|
|
369
369
|
fetchFn: Required<Config>['$fetch'],
|
|
370
370
|
) => {
|
|
371
371
|
const unwrappedOpts = unwrapRefs(opts);
|
|
372
|
+
unwrappedOpts.rawBody = unwrappedOpts.body;
|
|
372
373
|
unwrappedOpts.body = serializeBody(unwrappedOpts);
|
|
373
374
|
return fetchFn(
|
|
374
375
|
buildUrl(opts),
|