Add orval and backend integration
This commit is contained in:
34
orval.config.js
Normal file
34
orval.config.js
Normal file
@ -0,0 +1,34 @@
|
||||
import { defineConfig } from 'orval';
|
||||
import * as dotenv from 'dotenv';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
export default defineConfig({
|
||||
'mp3-composer': {
|
||||
input: {
|
||||
target: 'http://localhost:8080/v3/api-docs',
|
||||
parserOptions: {
|
||||
resolve: {
|
||||
http: {
|
||||
headers: {
|
||||
Authorization:
|
||||
'Basic ' + Buffer.from(`${process.env.API_USERNAME}:${process.env.API_PASSWORD}`).toString('base64'),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
output: {
|
||||
target: './app/composeables/api/composer.ts',
|
||||
schemas: './app/composeables/api/models',
|
||||
mode: 'tags-split',
|
||||
client: 'vue-query',
|
||||
override: {
|
||||
mutator: {
|
||||
path: './app/composeables/api/axios-instance.ts',
|
||||
name: 'axiosInstance',
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user