enable format doc
sergiokessler opened this issue · 3 comments
sergiokessler commented
it would be nice if selfdoc was able to support formatted doc, ala:
"""
Point your browser to {}
""".format(host_url)
jwg4 commented
I'm not sure exactly what set of variables would be able to be expanded in the formatting?
sergiokessler commented
What I'm looking is to include the actual {request.host_url} variable in the doc (for the examples included)
something like:
@app.route('/ping', methods=['GET'])
@auto.doc()
def ping():
"""PING all day long!
example: curl {}/ping
""".format(request.host_url)
response = {
'data': [{
'echo': 'ping!',
'source': url_for('ping')
}]
}
return jsonify(response)
jwg4 commented
This sounds do-able but I don't know how to do it yet!
I will look into this and try to add this functionality in a future version.