Replies: 2 comments 1 reply
-
When initializing the generated class there is a parameter import { Api } from "...";
const api = new Api({
securityWorker: () => ({
headers: {
Authorization: `Bearer ${token}`
},
}),
}); |
Beta Was this translation helpful? Give feedback.
1 reply
-
the way I did it was through their
then to get the required
with the following npm script: so finally it's possible to run either:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm trying to generate TypeScript types from a Swagger endpoint protected by BasicAuth using the swagger-typescript-api package. However, I couldn't find a way to pass the Authorization header or BasicAuth credentials in the command. Is there a supported way to provide authentication (either via headers or another method) to access the protected API? Any guidance would be appreciated!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions