# Name Decorator validation swagger schema input classDecorator operation

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

# Overview

function Name(name: any): (...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

Other topics