krati100
25 days agoNew Member
Defining two api spec under one function
Hi all,
I am looking whether it is possible to have different api spec but i have use route decorator for two api o same function
Explaination:
I have two apis /user and /user/{id} both are get request logic is same so i just want to code both under same function like @route(/user) @route(/user/{id}) def getUser():
but i want to generate different spec in swagger UI.
thanks in advance