@fdm-monster/server
Version:
FDM Monster is a bulk OctoPrint, Klipper, PrusaLink and BambuLab manager to set up, configure and monitor 3D printers. Our aim is to provide neat overview over your farm.
21 lines (20 loc) • 797 B
JavaScript
import "reflect-metadata";
//#region src/utils/swagger/decorators.ts
const API_METADATA_KEY = "Router Config";
function ApiProperty(options = {}) {
return function(target, propertyKey) {
const metadata = Reflect.getMetadata("Router Config", target.constructor) || {};
metadata[propertyKey] = options;
Reflect.defineMetadata(API_METADATA_KEY, metadata, target.constructor);
};
}
function ApiOperation(options = {}) {
return function(target, propertyKey, descriptor) {
const metadata = Reflect.getMetadata("Router Config", target.constructor) || {};
metadata[`${propertyKey}:operation`] = options;
Reflect.defineMetadata(API_METADATA_KEY, metadata, target.constructor);
};
}
//#endregion
export { API_METADATA_KEY, ApiOperation, ApiProperty };
//# sourceMappingURL=decorators.js.map