@sleekify/sleekify
Version:
A TypeScript decorator driven approach for developing web applications.
21 lines (20 loc) • 789 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OPTIONS = void 0;
const Annotation_1 = require("./Annotation");
/**
* You may apply this decorator to your resource class's methods to indicate
* that a method responds to HTTP OPTIONS requests. It allows you to annotate
* the method with an OpenAPI operation object so you can define this
* operation's documentation.
*
* @param operationObject The optional OpenAPI operation object definition
*/
function OPTIONS(operationObject) {
return function (target, propertyKey, _descriptor) {
Annotation_1.Annotation.set(target, propertyKey, OPTIONS, operationObject);
};
}
exports.OPTIONS = OPTIONS;
;
Annotation_1.Annotation.register(OPTIONS, '2942a49b-68cf-4469-bcdc-47cd59ac10bc');