# Name Decorator

Module
import { Name } from "@tsed/swagger/src/decorators/name"
Source/packages/swagger/src/decorators/name.ts

# Overview

function Name(name: string): (...args: any[]) => any;

# Description

Add a name metadata on the decorated element.

# Examples

# On parameters

async myMethod(@Name("nameOf") @PathParams("id") id: string): Promise<Model>  {

}
1
2
3

# On parameters

@Name("AliasName")
@Controller("/")
class ModelCtrl {

}
1
2
3
4
5