Comments (9)
@kimzeevaarders it is currently not possible.
from openapi-ts.
@kimzeevaarders ahh yes. You can use interceptors. You can also set axios interceptors on the global axios instance too if you prefer that
from openapi-ts.
@kimzeevaarders this will be better supported with client packages. @mrlubos can provide more info
from openapi-ts.
Hi @jordanshatford thx for the quick feedback. Does this mean it's currently not possible, but will be in the future? Just asking since I need to go live relatively soon haha :)
from openapi-ts.
ah that's too bad thx for responding though 👍
from openapi-ts.
In case this gets implemented please let me know though, perhaps I can still switch over then 👍
from openapi-ts.
hmmmm @jordanshatford @mrlubos I managed to set a httpsAgent
on the axiosRequestConfig
over a request interceptor. It seems to do the trick:
const requestInterceptor = OpenAPI.interceptors.request;
requestInterceptor.use((request) => {
request.httpsAgent = new Agent({
ca: process.env.TRUSTED_CAS
});
return request;
});
Can you guys verify this is a good workaround or are there some caveats using this approach?
from openapi-ts.
Hi @jordanshatford cool, thx for confirming. No i'd rather only set it when needed, so this is perfect for me!
from openapi-ts.
Workaround successfull over interceptor
from openapi-ts.
Related Issues (20)
- schema compliance with jsr HOT 3
- Allow inlining types in services signature instead of reference to $OpenApiTs HOT 1
- Allow easy differentiation by status codes HOT 18
- invalid identifier created (starting with digits) HOT 1
- formData: mismatch Type HOT 6
- Remove service classes
- Typescript enums not generated HOT 3
- Default response types (error) override response types HOT 3
- Accessing Both Response Body and Headers HOT 2
- Export `OpenApiSchema` interface in the generated client HOT 3
- Pass APIRequestOptions to the response interceptor HOT 3
- Client instance duplicate identifier
- Specify Line Endings HOT 2
- Dryrun flag checking causes the app not to run. HOT 8
- Inconsistent URL Encoding in Generated Services HOT 3
- Question regarding license HOT 9
- Switch to AbortSignal instead of CancellablePromise HOT 5
- Missed type for `type: ['array']`, produces unknown[] HOT 11
- Should "default" spec responses throw an error? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openapi-ts.