You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When having 2 reponse types one is problem+json is unable to infer response
Expected behaviour
Should be able to infer that is a dictionary with no header and asume is json response or just check 200 response is always application/json
Actual behaviour
if another response like 401 is present with a different content type like application/problem+json should still be able to infer is a json
Steps to reproduce
as API
/potato/advanced-configuration:
get:
summary: xxxresponses:
'200':
description: OKcontent:
application/json:
schema:
$ref: '#/components/schemas/xxx''401':
description: Returned if the calling user does not have permission to perform the operation.content:
application/problem+json:
schema:
$ref: ../common/models/error.v1.yamloperationId: configuration.get_configuration
{"time": "2024-07-31T10:51:30Z", "format_version": 1, "level": "ERROR", "message": "NonConformingResponseHeaders(status_code=500, detail='Multiple response content types are defined in the operation spec, but the handler response did not specify which one to return.')", "microservice": "cbclient", "funcName": "problem_handler", "threadName": "AnyIO worker thread"}
Output of the commands:
python --version 3.11
pip show connexion | grep "^Version\:" 3.1
The text was updated successfully, but these errors were encountered:
Description
When having 2 reponse types one is problem+json is unable to infer response
Expected behaviour
Should be able to infer that is a dictionary with no header and asume is json response or just check 200 response is always application/json
Actual behaviour
if another response like 401 is present with a different content type like application/problem+json should still be able to infer is a json
Steps to reproduce
as API
Additional info:
{"time": "2024-07-31T10:51:30Z", "format_version": 1, "level": "ERROR", "message": "NonConformingResponseHeaders(status_code=500, detail='Multiple response content types are defined in the operation spec, but the handler response did not specify which one to return.')", "microservice": "cbclient", "funcName": "problem_handler", "threadName": "AnyIO worker thread"}
Output of the commands:
python --version
3.11pip show connexion | grep "^Version\:"
3.1The text was updated successfully, but these errors were encountered: