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've been trying to build an api library package with openapi-ts. It seems like the SDK exports all the api methods as top-level functions, rather than the ability to create a client instance of a class with your auth token as other generators do, and as is a common pattern.
The docs say you can set the auth token once by manipulating the client directly. But the client is not exported on index.ts, so consumers of my package would not be able to do this. Are they expected to pass auth on every request? This seems to create a poor experience for consumers of the generated library.
Would love some option on the SDK to be more like openapi-typescript-codegen where it can generate a client with a custom name. Or, at least clarify the docs so I can understand how the consumer is supposed to be able to modify the client.
The text was updated successfully, but these errors were encountered:
Hi @jboolean, this use case isn't supported well today as you found out. Are you able to link me to your API? I assume it's publicly available? I'd be happy to work on this with you, it just hasn't been prioritised as most people use this package for internal development
I've been trying to build an api library package with openapi-ts. It seems like the SDK exports all the api methods as top-level functions, rather than the ability to create a client instance of a class with your auth token as other generators do, and as is a common pattern.
The docs say you can set the auth token once by manipulating the
client
directly. But the client is not exported onindex.ts
, so consumers of my package would not be able to do this. Are they expected to pass auth on every request? This seems to create a poor experience for consumers of the generated library.Would love some option on the SDK to be more like
openapi-typescript-codegen
where it can generate a client with a custom name. Or, at least clarify the docs so I can understand how the consumer is supposed to be able to modify the client.The text was updated successfully, but these errors were encountered: