# In Decorator swagger schema input operation

Module
import { In } from "@tsed/schema"
Source/packages/schema/src/decorators/operations/in.ts

# Overview

function In(inType: JsonParameterTypes | string): InChainedDecorators;

# Description

Add a input parameter.

WARNING

Don't use decorator with Ts.ED application to decorate parameters. Use BodyParams , PathParamsType , etc... instead. But you can use this decorator on Method, to add extra in parameters like Authorization header.

@Controller("/")
class MyController {
   @Get("/")
   @In("header").Type(String).Name("Authorization").Required()
   method() {
   }
 }
1
2
3
4
5
6
7

Other topics