UNPKG

@sleekify/sleekify

Version:

A TypeScript decorator driven approach for developing web applications.

25 lines (24 loc) 949 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Produces = void 0; const Annotation_1 = require("./Annotation"); /** * You may apply this decorator to your resource class or the resource class's * methods to provide the default media type for responses. If this is present * on both the class and a class method, then the decorator on the method will * have higher precedence. This decorator should be used with the Schema * decorator when your media type is not application/json. JSON is assumed to * be the default media type. * * @param mediaTypes The supported media types */ function Produces(mediaTypes) { return function (target, propertyKey, _descriptor) { Annotation_1.Annotation.set(target, propertyKey, Produces, mediaTypes); }; } exports.Produces = Produces; ; Annotation_1.Annotation.register(Produces, '4e626964-1cc6-4d5c-a20f-bcfd2329cc9b', { isAdditive: false });