Allow onRequest middleware to add headers that the schema requires #2073
Labels
enhancement
New feature or request
openapi-fetch
Relevant to the openapi-fetch library
openapi-fetch-codegen
Requires codegen for openapi-fetch
To my understanding, if one has multiple protected routes, say
/auth/*
, which are specified in the schema and require an Authorization header, currently it is required to set the header with each request.While the current implementation of middleware allows for setting a request header, TS still requires an authorization to be set with each individual request. So doing the following becomes not possible.
While this does not invalidate many of the use cases for middleware, which are great, this use case would be a welcome addition.
The text was updated successfully, but these errors were encountered: