I'm re-creating an old rest API built with Flask-restful and flask-restful-swagger. I have switched to Flask-RestPlus because it is still being maintained.
Some of the input fields (generally Path variables - which I need to keep so I don't upset existing users) need lengthy descriptions. These display just fine in the description area and can be made to look beautiful with a little markdown, but the text which is auto-entered into the text-box looks terrible. I have spent hours looking at documentation, but no helpful information (or none that I understand to be relevant!)
Here is an example
# Import modules
from flask import Flask
from flask_restplus import Api, Resource, reqparse
application = Flask(__name__)
api = Api(app = application)
name_space = api.namespace('name', description='Return a name provided by the user')
@name_space.route("<string:name>")
@name_space.param("name", "This may be a complex and long information that will spill out of the text box")
class NameClass(Resource):
def get(self, name):
args = parser.parse_args()
return {
"My name is" : name,
"args": args # WORKS
}
if __name__ == '__main__':
application.debug = True # Enable debugging mode
application.run(host="127.0.0.1", port=5000)
I would like the text-box to be blank, show "required" or "optional" or show a simple example input