14 lines
330 B
JavaScript
14 lines
330 B
JavaScript
import path from 'node:path'
|
|
import { generateApi } from 'swagger-typescript-api'
|
|
import 'dotenv/config';
|
|
|
|
(async () => {
|
|
await generateApi({
|
|
name: 'swagger-types.ts',
|
|
output: path.resolve(process.cwd(), 'api'),
|
|
typePrefix: 'I',
|
|
url: 'https://wp.koptilnya.xyz/rest-api/schema',
|
|
extractEnums: true,
|
|
})
|
|
})()
|