New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@marxlnfcs/nest-swagger-decorators

Package Overview
Dependencies
Maintainers
1
Versions
23
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

  • 0.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
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 05 May 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc