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
orval doesn't set any base url by default but you have multiple possibility to add it
3
+
Orval allows you to set a custom base url for each OpenAPI specification. This can be a part of the url that's been omitted from the specification or the entire url.
4
+
5
+
```ts
6
+
module.exports= {
7
+
petstore: {
8
+
output: {
9
+
target: 'src/petstore.ts',
10
+
baseUrl: '/api/v2',
11
+
// baseUrl: 'https://petstore.swagger.io/v2',
12
+
},
13
+
},
14
+
};
15
+
```
16
+
17
+
It's also possible to configure the base url directly on your HTTP client instead.
4
18
5
19
### Axios
6
20
7
-
You can set a default baseUrl
21
+
You can set a default baseUrl for all requests:
8
22
9
23
```ts
10
-
Axios.defaults.baseURL='<BACKEND URL>'; // use your own URL here or environment variable
24
+
axios.defaults.baseURL='<BACKEND URL>'; // use your own URL here or environment variable
1 commit comments
vercel[bot] commentedon Oct 19, 2023
Successfully deployed to the following URLs:
orval – ./
orval-git-master-anymaniax.vercel.app
orval-anymaniax.vercel.app
orval.vercel.app
orval.dev
www.orval.dev