PandaWiki/web/admin/swagger.api.config.ts

26 lines
603 B
TypeScript
Raw Permalink Normal View History

2025-07-18 11:58:20 +08:00
import dotenv from 'dotenv';
dotenv.config({
path: '.env.local',
});
const config = [
{
url: `${process.env.SWAGGER_BASE_URL}/swagger/doc.json`,
authorizationToken: process.env.SWAGGER_AUTH_TOKEN,
templates: './api-templates',
output: './src/request',
filterPathname: (pathname: string) => {
return pathname.startsWith('/api/v1');
},
},
{
url: `${process.env.SWAGGER_BASE_URL}/api/pro/swagger/doc.json`,
authorizationToken: process.env.SWAGGER_AUTH_TOKEN,
templates: './api-templates',
output: './src/request/pro',
2025-07-22 12:04:56 +08:00
},
2025-07-18 11:58:20 +08:00
];
2025-07-22 12:04:56 +08:00
export default config;