openapi-typescript
openapi-typescript copied to clipboard
Header in createClient not considered when resolving request
Description
If I add default headers in the createClient call
const sharedHeader = { workspace: env().workspace, 'x-web-version': '2' }
const client = createClient({ baseUrl: env().ENDPOINT, fetch: customFetchWithInterceptor, headers: sharedHeader })
It is not resolved when I use the client :
client.GET('/internal/notifications/getuserwebnotifications', { params: { query } })
the error is : "the property header is missing in the type .... "
here the params typescript of this specific request :
query?: {
page?: number;
page_size?: number;
search?: string;
ordering?: string;
action?: string;
};
header: {
workspace: string;
};
}
Expected result
I would expect the header were inherited from the createClient call. But maybe I am missing something.