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
Steps to reproduce
- Use the the packages/oats-mirage-adapter/test-app
- Change or add content
application/x-www-form-urlencoded to #/components/requestBodies/PostBody and try to generate an axios client with it.
- make a post call with such client