* Export the OpenAPI spec from the application
()
| 10 | * Export the OpenAPI spec from the application |
| 11 | */ |
| 12 | async function exportOpenApiSpec(): Promise<void> { |
| 13 | const config: ApplicationConfig = { |
| 14 | rest: { |
| 15 | port: +(process.env.PORT ?? 3000), |
| 16 | host: process.env.HOST ?? 'localhost', |
| 17 | }, |
| 18 | }; |
| 19 | const outFile = process.argv[2] ?? ''; |
| 20 | const app = new ExampleMultiTenancyApplication(config); |
| 21 | await app.boot(); |
| 22 | await app.exportOpenApiSpec(outFile); |
| 23 | } |
| 24 | |
| 25 | exportOpenApiSpec().catch(err => { |
| 26 | console.error('Fail to export OpenAPI spec from the application.', err); |
no test coverage detected