Connexion is a framework that automagically handles HTTP requests based on OpenAPI Specification (formerly known as Swagger Spec) of your API described in YAML format.
Questions tagged [connexion]
151 questions
3
votes
3 answers
How to create a swagger:response that produces a binary application/pdf file?
I'm failing in getting a file download working in swagger, connexion, openapi3. Within the openapi specification I've defined the following path:
/lab/samples/list/pdf:
get:
summary: download pdf file
operationId: get_sample_pdf
responses:
…

user5198729
- 19
- 1
- 1
- 3
3
votes
0 answers
Python - Flask - Connexion - Swagger - OpenAPI - How can I hide specific endpoint spec?
Use case: Front end hits /openapi.json and gets the specs. It uses this response to populate a docs page.
The openapi.yml looks like:
openapi: 3.0.0
info:
title: An API.
version: 0.1.0
description: A description.
paths:
/status-check:
…

George B.
- 565
- 7
- 19
3
votes
1 answer
Problem with swagger array of objects: validation error: None is not of type 'array'
I'm trying to make REST API with connexion but can't figure out how to set up get operation that consumes an array of objects. In the end, I need to get information about several items at once.
Using Python 3.7, connexion-2.3.0 and Swagger with…

Rusllan
- 33
- 2
- 6
3
votes
4 answers
openapi code generator - python server stub workflow
I am using openapi-generator to generate server stub python code.
Everything works fine, however, every time I make a change in the OpenAPI specs (the yaml file), the code generator overwrites the whole code, even the one customized (the…

Ionut Manolache
- 51
- 4
3
votes
1 answer
How to change error format of all errors using Connexion + Tornado
I'm using Connexion (https://github.com/zalando/connexion) to make sure my openapi-specification is well-followed and to have easy integration points to connect my routes to the underlying functions.
In any case, the default error responses from…

Tom P.
- 390
- 3
- 12
3
votes
4 answers
Python connection not displaying Swagger UI
I've built a Python/Flask based REST API using the connexion module. This working well as defining the REST API with with swagger.yml file works very well. The application is running, but when I navigate to /ui all I get in my browser is…

writes_on
- 1,735
- 2
- 22
- 35
3
votes
2 answers
Python Connexion — Control "Type" Key in 400 Response Errors
I'm using connexion, a python library for REST API's, with a swagger definition. It's working properly for the actual requests, but when there is an error condition, such as validation fails, it returns a response like:
{
"type": "about:blank",
…

kkirsche
- 1,217
- 2
- 15
- 38
2
votes
2 answers
Rate limit REST API made with connexion and swagger
I'm building a REST API using Flask and connexion. (Python)
I'm adding the api to the connexion app using a swagger.yml file that contains the definitions of all the endpoints, methods, etc...
The question is, how can I add a rate limit on a…

Amrou
- 371
- 1
- 3
- 18
2
votes
1 answer
Open a connexion-based REST service with gunicorn
I have a Flask service built with connexion. The service is initialized in a function create_app() that is defined in the script src/group/application/my_service/api/app.py :
# app.py
def create_app():
arguments = {"url": "0.0.0.0"}
app =…

dada
- 1,390
- 2
- 17
- 40
2
votes
2 answers
VS Code: How to debug Flask app that uses Connexion?
I have faced a problem with starting a Flask app.
I am trying to run the app in debug mode with Visual Studio Code but it doesn't run properly.
Here is the main module code:
import os
import sys
import logging
import argparse
import connexion
import…

Herr Sgory
- 35
- 7
2
votes
0 answers
Get utf-8 instead of \u escaped sequence with Swagger and Connexion in Python
I'm trying to use Swagger to build an API using Python and Connexion. I want to generate UTF-8 encoded JSON output but I get a \u escaped sequence like this in my responses:
euro \u20ac
instead of this:
euro €
I'm already specifying the charset…

Angel
- 940
- 1
- 9
- 21
2
votes
1 answer
Swagger-UI generated python server not starting due to 'no module named' error
I'm working with an OpenAPI 3.0.1 yaml and it's unable to get the API webserver started due to the below error. I tried almost everything that is under my knowledge but I'm very new at OpenAPI and the documentation was followed as it is. Any…

Victor Menezes
- 35
- 1
- 7
2
votes
1 answer
connexion: Failed to find Flask application or factory in module
I've started to develop a Flask based API using Flasks Blueprints. That worked like a charm.
Then I started to refactor it, to use connexion and a swagger specification.
After that, I'm not able to launch the application. I get following error…

mybecks
- 2,443
- 8
- 31
- 43
2
votes
1 answer
is it possible to use flask_socketio with connexion?
I have a django app (frontend) which sends requests to a connexion api (backend). Now I want to add info to the user to know the progression of the request in real-time upon making a request to my api.
Example: from my django app, if I submit a form…

iaskaboutanything
- 23
- 3
2
votes
1 answer
how to fix Flask RESTful api server endpoint failing problem?
I am new to api development using openapi sepc, so I followed this blog where I just used server artifact to understand the code. I used /openapi/photo_album/codegen_server for my simple work. To do so, I downloaded the file and tried to run server…

kim
- 556
- 7
- 28