2024-02-28 17:02:46 +08:00
|
|
|
import { ConfigType, registerAs } from '@nestjs/config';
|
2024-02-28 08:32:35 +08:00
|
|
|
|
2024-02-28 17:02:46 +08:00
|
|
|
import { env, envBoolean } from '~/global/env';
|
2024-02-28 08:32:35 +08:00
|
|
|
|
2024-02-28 17:02:46 +08:00
|
|
|
export const swaggerRegToken = 'swagger';
|
2024-02-28 08:32:35 +08:00
|
|
|
|
|
|
|
export const SwaggerConfig = registerAs(swaggerRegToken, () => ({
|
|
|
|
enable: envBoolean('SWAGGER_ENABLE'),
|
2024-02-29 09:29:03 +08:00
|
|
|
path: env('SWAGGER_PATH')
|
2024-02-28 17:02:46 +08:00
|
|
|
}));
|
2024-02-28 08:32:35 +08:00
|
|
|
|
2024-02-28 17:02:46 +08:00
|
|
|
export type ISwaggerConfig = ConfigType<typeof SwaggerConfig>;
|