chore: setup initial Swagger documentation configuration

This commit is contained in:
hannathkadher
2024-08-22 09:12:19 +04:00
parent bb669f5561
commit 70aae9899d
3 changed files with 28 additions and 174 deletions

View File

@ -1,16 +1,21 @@
import { Controller, Get, HttpException, HttpStatus } from '@nestjs/common';
import { RegionService } from '../services/region.service';
import { ApiTags } from '@nestjs/swagger';
import { ApiTags, ApiOperation } from '@nestjs/swagger';
import { ControllerRoute } from '@app/common/constants/controller-route';
@ApiTags('Region Module')
@Controller({
version: '1',
path: 'region',
path: ControllerRoute.REGION.ROUTE,
})
export class RegionController {
constructor(private readonly regionService: RegionService) {}
@Get()
@ApiOperation({
summary: ControllerRoute.REGION.ACTIONS.GET_REGIONS_SUMMARY,
description: ControllerRoute.REGION.ACTIONS.GET_REGIONS_DESCRIPTION,
})
async getAllRegions() {
try {
return await this.regionService.getAllRegions();