Files
frontend/orval.config.js

35 lines
1022 B
JavaScript

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',
},
},
}
},
});