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
Description
Hi
Is there a way via either parser or operation, or something where we can inject custom headers? we use
Accept-versionheader to tell sever which version we want, it's part ofparameters.header['accept-version'].schema.defaultis there a way when generating the SDK, it adds that automatically?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