[REQ][typescript-redux-query] Allow client to set the base path to be prepended to endpoints in the generated query configs.
Created by: stgraham2000
Description
If you generate a client using the typescript-redux-query
generator, there is no way to set the base path for the url in the generated query configs. This means you can't easily make your generated client communicate with your backend API if your client is hosted from a different domain. One option is to override the network interface but that seems wrong considering other generators allow you to update the configuration and set the BASE_PATH.
openapi-generator version
Version: 5.0.0 My working version: commit cef1bec4
Suggest a fix/enhancement
My suggested fix is to create a Configuration object in the runtime.mustache
that defaults a variable called basePath
to an empty string. My decision for using an empty string is to keep this change backwards compatible. We then update apis.mustache
prepend the runtime.Configuration.basePath
to the existing value being used for the url
in the query config. The below is a diff off of the commit cef1bec4666e7841c39a37eec97b2e81c96ad9f0
.