Skip to content

Commit

Permalink
chore: update @nestjs/swagger to v8.0.7 and remove unused ApiTags d…
Browse files Browse the repository at this point in the history
…ecorators (#460)

ApiTags now use controller name by default (nestjs/swagger#3011)
  • Loading branch information
fityannugroho authored Nov 20, 2024
1 parent 4236281 commit c8d07a2
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 29 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@nestjs/config": "^3.3.0",
"@nestjs/core": "^10.4.8",
"@nestjs/platform-fastify": "^10.4.8",
"@nestjs/swagger": "^7.4.2",
"@nestjs/swagger": "^8.0.7",
"@nestjs/throttler": "^6.2.1",
"@prisma/client": "^5.22.0",
"class-transformer": "^0.5.1",
Expand Down
33 changes: 20 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/app.controller.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Controller, Get, HttpStatus } from '@nestjs/common';
import { ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger';
import { ApiOkResponse, ApiOperation } from '@nestjs/swagger';

@ApiTags('Home')
@Controller()
export class AppController {
@Get()
Expand Down
2 changes: 0 additions & 2 deletions src/district/district.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
ApiNotFoundResponse,
ApiOperation,
ApiQuery,
ApiTags,
} from '@nestjs/swagger';
import {
District,
Expand All @@ -23,7 +22,6 @@ import { DistrictService } from './district.service';
import { ApiPaginatedResponse } from '@/common/decorator/api-paginated-response.decorator';
import { PaginatedReturn } from '@/common/interceptor/paginate.interceptor';

@ApiTags('District')
@Controller('districts')
export class DistrictController {
constructor(private readonly districtService: DistrictService) {}
Expand Down
6 changes: 1 addition & 5 deletions src/island/island.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
ApiNotFoundResponse,
ApiOperation,
ApiQuery,
ApiTags,
} from '@nestjs/swagger';
import {
Island,
Expand All @@ -23,14 +22,11 @@ import { IslandService } from './island.service';
import { ApiPaginatedResponse } from '@/common/decorator/api-paginated-response.decorator';
import { PaginatedReturn } from '@/common/interceptor/paginate.interceptor';

@ApiTags('Island')
@Controller('islands')
export class IslandController {
constructor(private readonly islandService: IslandService) {}

@ApiOperation({
description: 'Get the islands.',
})
@ApiOperation({ description: 'Get the islands.' })
@ApiQuery({
name: 'sortBy',
description: 'Sort islands by its code, name, or coordinate.',
Expand Down
2 changes: 0 additions & 2 deletions src/province/province.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
ApiNotFoundResponse,
ApiOperation,
ApiQuery,
ApiTags,
} from '@nestjs/swagger';
import {
Province,
Expand All @@ -22,7 +21,6 @@ import { ProvinceService } from './province.service';
import { PaginatedReturn } from '@/common/interceptor/paginate.interceptor';
import { ApiPaginatedResponse } from '@/common/decorator/api-paginated-response.decorator';

@ApiTags('Province')
@Controller('provinces')
export class ProvinceController {
constructor(private readonly provinceService: ProvinceService) {}
Expand Down
2 changes: 0 additions & 2 deletions src/regency/regency.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
ApiNotFoundResponse,
ApiOperation,
ApiQuery,
ApiTags,
} from '@nestjs/swagger';
import {
Regency,
Expand All @@ -23,7 +22,6 @@ import {
import { RegencyService } from './regency.service';
import { PaginatedReturn } from '@/common/interceptor/paginate.interceptor';

@ApiTags('Regency')
@Controller('regencies')
export class RegencyController {
constructor(private readonly regencyService: RegencyService) {}
Expand Down
2 changes: 0 additions & 2 deletions src/village/village.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
ApiNotFoundResponse,
ApiOperation,
ApiQuery,
ApiTags,
} from '@nestjs/swagger';
import {
Village,
Expand All @@ -23,7 +22,6 @@ import { VillageService } from './village.service';
import { ApiPaginatedResponse } from '@/common/decorator/api-paginated-response.decorator';
import { PaginatedReturn } from '@/common/interceptor/paginate.interceptor';

@ApiTags('Village')
@Controller('villages')
export class VillageController {
constructor(private readonly villageService: VillageService) {}
Expand Down

0 comments on commit c8d07a2

Please sign in to comment.