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
I am currently working with multiple API clients and openapi-ts is a godsend for me. My project involves a multitenancy setup, where each client needs a distinct prefix derived from the file name and still use the windows location as the baseURL. Unfortunately, the current implementation only supports the baseUrl option, which does not accommodate my needs as I do not have a single set URL.
Feature Request:
I would like to request the ability to set a custom URL prefix for each API client. Specifically, I propose adding support for a prefix pattern like /services/{filename}/, where {filename} is dynamically replaced with the name of the API file. This would allow the resulting URL for each client to be structured as follows:
{window.location.origin}/{customPrefix}/{...apis from file}
Example:
Given an API file named storageService, the resulting URL for the client would be:
{window.location.origin}/services/storageService/{...apis from file}
Simplifies the management of multiple API clients in a multitenancy environment.
Enhances flexibility by allowing dynamic URL generation
Thank you for considering this feature request. I believe it would greatly enhance the usability and flexibility of the library for developers working in similar environments.
The text was updated successfully, but these errors were encountered:
I work alot with Nuxt/Nitro so maybe calling apiBaseURL is a better idea to impove comaptibility. https://nitro.build/config#apibaseurl
Scratch that, this is for the api itself in nitro.
Nitro already uses baseURL for this purpose.
Maybe it makes sense to just allow the prefix in baseURL?
Description
Hello,
I am currently working with multiple API clients and
openapi-ts
is a godsend for me. My project involves a multitenancy setup, where each client needs a distinct prefix derived from the file name and still use the windows location as the baseURL. Unfortunately, the current implementation only supports thebaseUrl
option, which does not accommodate my needs as I do not have a single set URL.Feature Request:
I would like to request the ability to set a custom URL prefix for each API client. Specifically, I propose adding support for a prefix pattern like
/services/{filename}/
, where{filename}
is dynamically replaced with the name of the API file. This would allow the resulting URL for each client to be structured as follows:Example:
Given an API file named
storageService
, the resulting URL for the client would be:Current Script:
Proposed Script with Solution:
Benefits:
Thank you for considering this feature request. I believe it would greatly enhance the usability and flexibility of the library for developers working in similar environments.
The text was updated successfully, but these errors were encountered: