Is it allowed in Swagger to define “default” as a response type instead of 200 for a GET request?
I generated a Python API for the Collibra Core REST API using OpenAPI Generator version 7.7.0.
The Schema Export can downloaded here: https://developer.collibra.com/api/rest/data-governance#/
However, there are some endpoints/requests that have only “default” as the response type, for example
https://developer.collibra.com/api/rest/data-governance#/operations/getInfo
In this case, I did not receive a response in the generated Python API because the _response_types_map is empty.
Is this a bug in the OpenAPI Generator, or is it an issue with the Collibra REST API specification or can I fix it?
If I add to the generated API Code
_response_types_map: Dict[str, Optional[str]] = {
‘200’: “ApplicationInfo”,
}
I got an Response.
But modify generated code is a bad solution.
What can I do?
kind regards
bamboocha
bamboocha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.