-
-
Notifications
You must be signed in to change notification settings - Fork 319
Open
Labels
feature 🚀Feature request.Feature request.
Description
Description
Hi
Is there a way via either parser or operation, or something where we can inject custom headers? we use Accept-version header to tell sever which version we want, it's part of parameters.header['accept-version'].schema.default is there a way when generating the SDK, it adds that automatically?
export const postApiphotosV1 = <...>(options: Options<..>) => (options.client ?? client).post<...>({
url: '/api/photos',
...options,
headers: {
'Content-Type': 'application/json',
'Accept-version': 1 // it will aways be parameters.header['accept-version'].schema.default
...options.headers
}
});
I looked the documentations but couldn't find out if this is possible. BTW interceptor doesn't work since I would like this to be on build time (when generating sdk.gen) not run time, in runtime we don't have the spec anymore
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature 🚀Feature request.Feature request.