Python Flask Swagger Flasgger Download Excel

I am trying to return an excel file from Swagger API. Built that using Flask with a Swagger wrapper with Flasgger. Here's the code - @app.route('/cluster', methods=['POST']) def index(): """ ...

How to use Flasgger with Flask applications using Blueprints?

I am adding Swagger UI to my Python Flask application using Flasgger. Most common examples on the Internet are for the basic Flask style using @app.route: from flasgger.utils import...

flasgger YAML for a POST JSON API

Following this post : https://stackoverflow.com/questions/43218413/get-data-json-in-flask I was able to write a simple API where i post a json objet (a first name & last name & a generate ID) to...

Flasgger - Upload File

I am working on a project that requires to upload a file via flasgger UI. I modified my conf based on Swagger docs but doesn't seem to work. Below is my conf. Please, let know the...

How to tune flasgger in order to use basic authentication in sending requests

I try to use flasgger for my simple RESTful API. The API requireds the authentication/authorization and uses the basic authentication to perform any query. There is really good documentation about...

x-api-key only secures some resources

My setup: flask - awsLambda - zappa - api gateway I do have a simple app running via above mentioned services. In my zappa_settings.json I have 'api_key_required' set to true. Is it possible to...

Python (Flask + Swagger) Flasgger throwing 404 error

I am trying to use swagger ui as a frontend to query my flask application. I'm using Flasgger I tried a toy example as shown below from flasgger import Swagger from flask import Flask,...

Building Flasgger/Swagger API in python3 exception

I am building a Flasgger/Swagger API in python. When I input the values into the parameters and execute the code I am seeing the following error. I have also share exception images. """Example...

Python flassger: Get query with extended conditions ? (more, less, between...)

I develop a python application based on flask that connects to a postgresql database and exposes the API using flassger (swagger UI). I already defined a basic API (handle entries by ID, etc) as...

WSO2 API publish error for Flasgger Swagger File - schema/properties is unexpected

I have created an application using Python+Flask and Flasgger to create swagger page. Swagger is getting generated properly and is working fine. I am using WSO2 (v2.5.0) API manager and trying to...

File upload selector in Flasgger POST routes

In Flasgger, I'm trying to create documentation for route which accepts uploaded files. However, despite sticking to the specification, I cannot display file selector in Flasgger UI. I'm using...

Failed to laod API defination error using Flasgger in python

I am creating an API for my machine learning Model using Flasgger and Flask in python. After running my API file I am getting the below error as ‘Failed to load API documents. Fetch error...

List of Dictionaries in Swagger

I am using https://github.com/rochacbruno/flasgger for swagger in my python-flask application. I need to send an array of dictionaries (or json) in the value of a parameter. But I couldn't find...

Flask/Flasgger - Document does not appear if `endpoint` parameter is set

I have a Blueprint which I wrote an OpenAPI documentation for. Without the endpoint definition, it's working just fine but it doesn't with the endpoint definition. Working...

Flasgger: How to write description of several endpoints in one yaml file?

I created several endpoints in Flask and created yml files for each of them. So, for example I have 10 endpoints and 10 small yaml files. It is not very comfort to use it, so I want put all the...

Including external yml file in flasgger

I'd like to create a separate definitions.yml file using json remote references, so I can share the definitions across multiple YML files. We followed the instructions in...

How to register Swagger endpoints in Flasgger

Currently using Swagger/Flasgger/Flask to document APIs/routes in an app. # app.py from flask import Flask from flasgger import Swagger from myapp.blueprints.main import main app =...

Logs from Flask in Python using AppInsights not appearing when hosted in Azure Service Fabric

When running my flask app locally, I can use the endpoints and these log messages appear in the Application Insights resource in my Azure Portal. When running my flask app in a service fabric...

How can I make Flasgger automatically validate flask-restful resource endpoints against the template_file?

TLDR; What I'm looking to achieve: Since there's the option to load an universal/app-wide schema in flasgger, as defined by the template_file parameter when instantiating Swagger, how can I...

LDAP server down "Multi Stage Docker Build"

I am building a multi stage docker for my app, using an official python image "python:3.7-buster", nginx, supervisord and uwsgi. The image build is successful and i can check routes that don't use...

Flasgger execution is a success but not showing the XML body

While Deploying iris prediction model using flasgger API, i can enter the lengths and widths of the iris flower with http/200 ok , but i do not see an xml output with the prediction results. From...

flasgger /apidocs does not render with nginx reverse proxy

I have been using the flasgger extension for flask to render swagger UI for OpenAPI spec locally with developement server. But in production, when I throw nginx into the mix I am not able to get...

flask python creating swagger document error

I am trying to generate a swagger documentation for the API I am building in flask however when I execute below code I get very staring error, What I am missing here ? This is what I have tried...

How to check my metrics using prometheus_flask_exporter lib

I want to keep track of metrics in my flask application using the lib prometheus_flask_exporter. For what i could understand this lib already tracks default metrics in the /metrics endpoint. But...

Swagger change base URL in Python using flasgger library

I am trying to update my Swagger Base URL from '/' to '/testapp' for my REST API This is my Swagger Config swagger_config = { "headers": [ ], "specs": [ { ...

Flasgger - Add bearer authorization

I am running a flask app and using flasgger to generate Swagger Specs as well as a Swagger UI. My API requires the requests to be authenticated using a bearer token. I am able to get the button on...

flasgger: reference marshmallow schema in a .py module

I have flask project with Marshmallow Schema classes defined in a schemas module. For example: project - app.py - routes.py - schemas/ - schema1.py - schema2.py Where...

Why isn't the request body displayed in Flask Swagger UI?

I am trying to write API documentation using the flasgger library: @bp.route('/long_to_short', methods=['POST']) def long_to_short(): '''Create a short URL --- tags: -...

Flasgger failed to load API definition

I get this error message when trying to see the Swagger UI with Flasgger: ERROR in app: Exception on /apispec_1.json [GET] Traceback (most recent call last): File...

How to have marshmallow definitions and multi-version specs together in flasgger?

I'm going to load initial definitions from marshmallow schemas with Flasgger and APISpec. Also along with that, I want to have multiple version API doc. Here is my code: from...