# Produces Decorator swagger methodDecorator classDecorator operation response

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

# Overview

function Produces(...produces: string[]): (...args: any[]) => any;

# Description

Add produces metadata on the decorated element.

# Examples

# On method

class Model {
   @Produces("text/html")
   id: string;
}
1
2
3
4

WARNING

For openspec v3 prefer @Returns().ContentType() usage (see ReturnsChainedDecorators ).

Other topics