"""0.9.0 News and Changes - Updated Swagger UI 3.x - uiversion now defaults to 3 - 'hide_top_bar' config option to remove the green top bar - 'fotter_text' added to customize the footer text (allows html and ', # this text is rendered in the header # (optionally you can replace flasgger/header.html template) 'top_text': 'Welcome to my api ', # this text is rendered in the # (optionally you can replace flasgger/head.html template) 'head_text': '', # Control the collapse of each tag, '"none"' means all tags default closed # "none" - It'll Hide everything. # "list"- It'll expand/List all the operations only. (default) # "full" - It'll expand everything(Full expand as the name says). 'doc_expansion': "list", # Allows overriding any of the uiparams # This is useful to override other stuff not provided by the above aliases 'ui_params': { 'apisSorter': 'alpha', 'operationsSorter': 'alpha', }, # Allows overriding any of the uiparams with Javascript expressions # This is useful to override other stuff not provided by the above aliases which cannot be serialized to a JSON string 'ui_params_text': '''{ "operationsSorter" : (a, b) => a.get("path").localeCompare(b.get("path")) }''' } Swagger(app) @app.route('/', methods=['GET', 'POST']) def main_route(): """ Test Endpoint --- tags: - Test parameters: - name: data in: formData required: True type: string description: data to send responses: 200: description: data received successfully 404: description: data not found in request form """ if 'data' not in request.form.keys(): return 'data not found in request form', 404 return 'data received: ' + str(request.form['data']) if __name__ == '__main__': app.run()