-
-
Notifications
You must be signed in to change notification settings - Fork 778
Description
Description
It works perfectly fine locally and it works fine during some time after deployment. But after some time returns 500 error code. API itself works fine and all end-points works fine. The issue with Swagger UI only.
Before we added an exception handler we had just 500 error with the default message saying that something went wrong or app overloaded.
Now we use the following error_handler:
def connexion_base_exception_handler(
request: ConnexionRequest, exc: Exception
) -> ConnexionResponse:
return ConnexionResponse(
status_code=500,
body=json.dumps({"error": str(exc)}),
content_type="application/json",
)
As a result, str(exc) is actually openapi.json content


I've found the follwoing message in logs but we do not use "oneOf":
`Failed validating 'oneOf' in schema['properties']['paths']['patternProperties']['^\/']['patternProperties']['^(get|put|post|delete|options|head|patch|trace)$']['properties']['requestBody']:
`
Expected behaviour
API definition loaded correctly
Additional info:
Output of the commands:
python --version
python:3.10pip show connexion | grep "^Version\:"
. connexion[flask]==3.0.3starlette
. 0.33.0 or 0.32.0.post1
openapi.yaml: openapi: 3.0.0