You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using oats-axios-adapter with endpoints that don't define any headers and use content type different from application/json, i.e. only application/x-www-form-urlencoded.
The type for the endpoint headers is void THEN the generated Axios client fails to perform the call as it is expecting that the property headers be initialized as an object which is not.
The error occurs in /packages/oats-axios-adapter/index.ts#L90 as arg.headers is not checked for emptiness when construction the request headers from arg.headers and data.contentType
When using
oats-axios-adapter
with endpoints that don't define any headers and use content type different fromapplication/json
, i.e. onlyapplication/x-www-form-urlencoded
.The type for the endpoint headers is void THEN the generated Axios client fails to perform the call as it is expecting that the property headers be initialized as an object which is not.
The error occurs in /packages/oats-axios-adapter/index.ts#L90 as
arg.headers
is not checked for emptiness when construction the request headers fromarg.headers
anddata.contentType
Steps to reproduce
application/x-www-form-urlencoded
to#/components/requestBodies/PostBody
and try to generate an axios client with it.The text was updated successfully, but these errors were encountered: