// @ts-nocheck

export function method(opts?:string|Array<string>) {
    return function (target, propertyKey: string, descriptor: PropertyDescriptor) {
        target[propertyKey].$method = opts
    }
}
export function route(route?:string) {
    return function (target, propertyKey: string, descriptor: PropertyDescriptor) {
        target[propertyKey].$route = route
    }
}

export function config(options:Object) {
    return function (target, propertyKey: string, descriptor: PropertyDescriptor) {
        target[propertyKey].$options = options
    }
}

export function auth(isAuth:boolean = true) {
    return function (target, propertyKey: string, descriptor: PropertyDescriptor) {
        target[propertyKey].$auth = isAuth
    }
}

export function validate(validate:Object) {
    return function (target, propertyKey: string, descriptor: PropertyDescriptor) {
        target[propertyKey].$validate = validate
    }
}

export function swagger(desc,notes,tags) {
    return function (target, propertyKey: string, descriptor: PropertyDescriptor) {
        target[propertyKey].$swagger = [desc,notes,tags]
    }
}