I have simple function that takes an arbitrary number of arguments like so:
def greet(*args):
a=list(args)
return {"greetings to users:": a}
greet('Aron','Claus')
>>>{'greetings to users:': ['Aron', 'Claus']}
The function works as expected. But when i put a router decorator on the function like so:
@router.get("/greet")
def greet(*args):
a=list(args)
return {"greetings to users:": a}
I get an internal server error on swagger side and my commandline gives me the following error:
TypeError: greet() got an unexpected keyword argument 'args'
Why is this happening how can I avoid this error. Thanks in advance