# ReturnsChainedDecorators Interface

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

# Overview

interface ReturnsChainedDecorators {
    <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;
    (target: Function): void;
    /**
     * Set a Content-Type for the current response
     * @param value
     * @constructor
     */
    ContentType(value: string): this;
    /**
     * Add a description
     * @param description
     */
    Description(description: string): this;
    /**
     * Add examples
     * @param examples
     */
    Examples(examples: any): this;
    /**
     * Change the model type
     * @param type
     */
    Type(type: Type<any> | any): this;
    /**
     * Change the status
     * @param status
     * @constructor
     */
    Status(status: string | number): this;
    /**
     * Add the nested types
     * @param types
     */
    Of(...types: (Type<any> | any)[]): this;
    /**
     * Declare a nested generic models
     * @param generics
     */
    Nested(...generics: (Type<any> | any)[]): this;
    /**
     * Add header.
     * @param key
     * @param value
     */
    Header(key: string, value: number | string | (JsonHeader & {
        value?: string | number;
    })): this;
    /**
     * Add headers
     */
    Headers(headers: JsonHeaders): this;
    /**
     * Assign partial schema
     * @param schema
     */
    Schema(schema: Partial<JsonSchemaObject>): this;
    /**
     * Add an inline title for the return model.
     * @param title
     */
    Title(title: string): this;
    [key: string]: any;
}

# Members

<T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;

(target: Function): void;

ContentType(value: string): this;

Set a Content-Type for the current response


Description(description: string): this;

Add a description


Examples(examples: any): this;

Add examples


Type(type: Type<any> | any): this;

Change the model type


Status(status: string | number): this;

Change the status


Of(...types: (Type<any> | any)[]): this;

Add the nested types


Nested(...generics: (Type<any> | any)[]): this;

Declare a nested generic models


Header(key: string, value: number | string | (JsonHeader & {
     value?: string | number;
 })): this;

Add header.


Headers(headers: JsonHeaders): this;

Add headers


Schema(schema: Partial<JsonSchemaObject>): this;

Assign partial schema


Title(title: string): this;

Add an inline title for the return model.


[key: string]: any;

Other topics