[core] Fix swagger docs

This commit is contained in:
devlikepro committed 2024-08-04 10:07:09 +07:00
1 parent 52ef8e8b76
commit dbff2b659a
3 files changed
+12 -3

No files matched your search

+4 -1
View File
@@ -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();
}
+7 -1
View File
@@ -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;
}
+1 -1
View File
@@ -2,7 +2,7 @@ import { ApiProperty } from '@nestjs/swagger';
export class WAHAEnvironment {
@ApiProperty({
example: '2029.10.29',
example: 'YYYY.MM.BUILD',
})
version: string;