flask-restful-swagger
flask-restful-swagger copied to clipboard
Add support for documentation for standalone functions
I'm trying to generate document for following function
"Some code ommitted"
@swagger.operation(
notes='some random note',
responseClass=str,
nickname='upload',
parameters=[
],
responseMessages=[
{
"code": 201,
"message": "Created. The URL of the created blueprint should be in the Location header"
}
]
)
@app.route('/hello')
def get(self, todo_id):
return "Hello World!"
api.add_resource(get, '/hello')
When I try to run this I get
type object 'function' has no attribute 'methods'
Can we add support for standalone functions?