diff --git a/src/api/health.controller.ts b/src/api/health.controller.ts index 6dd2dea2..6036b841 100644 --- a/src/api/health.controller.ts +++ b/src/api/health.controller.ts @@ -1,5 +1,5 @@ import { Controller, Get } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { HealthCheck } from '@nestjs/terminus'; import { WAHAHealthCheckService } from '../core/abc/WAHAHealthCheckService'; @@ -11,6 +11,9 @@ export class HealthController { @Get() @HealthCheck() + @ApiOperation({ + summary: 'Check the health of the server, performing all health checks.', + }) async check() { return this.wahaHealth.check(); } diff --git a/src/api/version.controller.ts b/src/api/version.controller.ts index 064d2679..63ed1ff0 100644 --- a/src/api/version.controller.ts +++ b/src/api/version.controller.ts @@ -1,5 +1,10 @@ import { Controller, Get } from '@nestjs/common'; -import { ApiExtraModels, ApiSecurity, ApiTags } from '@nestjs/swagger'; +import { + ApiExtraModels, + ApiOperation, + ApiSecurity, + ApiTags, +} from '@nestjs/swagger'; import { WAHAEnvironment } from '../structures/environment.dto'; import { VERSION } from '../version'; @@ -9,6 +14,7 @@ import { VERSION } from '../version'; @ApiTags('other') export class VersionController { @Get('') + @ApiOperation({ summary: 'Get the version of the server' }) get(): WAHAEnvironment { return VERSION; } diff --git a/src/structures/environment.dto.ts b/src/structures/environment.dto.ts index 8420efee..3f557951 100644 --- a/src/structures/environment.dto.ts +++ b/src/structures/environment.dto.ts @@ -2,7 +2,7 @@ import { ApiProperty } from '@nestjs/swagger'; export class WAHAEnvironment { @ApiProperty({ - example: '2029.10.29', + example: 'YYYY.MM.BUILD', }) version: string;