🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@marxlnfcs/nest-swagger-decorators

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marxlnfcs/nest-swagger-decorators

Extended decorators for the @nestjs/swagger module

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

NestJS OpenApi Extended Decorators

Extended decorator functions for the @nestjs/swagger module

NPM Version Package License NPM Downloads Package Size

Installation

npm i @marxlnfcs/nest-swagger-decorators

Usage

Controller

@ApiController('/', {
    tags: [ ... ],
    tagGroups: [ ... ],
    header: { ... },
    params: { ... },
    query: { ... },
})
export class AppController {}

@ApiController({
    path: '/',
    tags: [ ... ],
    tagGroups: [ ... ],
    header: { ... },
    params: { ... },
    query: { ... },
})
export class AppController {}

// Controller will not be added to the documentation. Equals to @ApiExcludeController
@ApiController('/', false)
export class AppController {}

Routes

@ApiController('/')
export class AppController {

    @ApiGet('/', { ... })
    @ApiGet({ path: '/', ... })
    @ApiGet('/', false) // Endpoint will not be added to the documentation. Equals to @ApiExcludeEndpoint
    ping(){ ... }

}

Exceptions

@ApiController('/')
export class AppController {
    
    @ApiGet('/')
    @ApiNotFoundException()
    @ApiUnauthorizedException()
    ping(){ ... }
    
}

TagGroups

@ApiController('/')
@TagGroups(...)
export class AppController {

	@ApiGet('/', { ... })
    @ApiTagGroups(...)
	ping(){ ... }

}

Retrieve TagGroups

import {getApiTagGroups} from "@marxlnfcs/nest-swagger-decorators";

const tagGroups = getApiTagGroups();

/**
 * RETURNS:
 * [
 *  {
 *    name: string,
 *    tags: string[]
 *  },
 *  ...
 * ]
 */

FAQs

Package last updated on 31 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts