openapi-typescript-codegen icon indicating copy to clipboard operation
openapi-typescript-codegen copied to clipboard

Is passing headers in initial loading command possible?

Open wildstyles opened this issue 1 year ago • 2 comments

To protect our swagger we are using express-basic-auth which requires to pass some header params. Is it possible to pass some headers along with initial loading command?

Thanks for response. Cheers!

wildstyles avatar Sep 24 '23 12:09 wildstyles

Currently not, it would require passing some options here: https://github.com/ferdikoomen/openapi-typescript-codegen/blob/deb6ddfaa974c7730b1ef64dc91369d8a96f0fe6/src/utils/getOpenApiSpec.ts#L10

mbergen avatar Oct 18 '23 08:10 mbergen

@wildstyles @mbergen you can try using interceptors in https://github.com/hey-api/openapi-ts

mrlubos avatar Apr 07 '24 09:04 mrlubos