# Decorator Produces

Decorator swagger methodDecorator classDecorator operation response private
Module
import { Produces } from "@tsed/specs/schema/src/decorators/operations/produces"
Source/packages/specs/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 Returns ).

Other topics