openapi-python-client icon indicating copy to clipboard operation
openapi-python-client copied to clipboard

Empty response schema generates an exception "Unknown media type schema type"

Open cfxegbert opened this issue 1 year ago • 0 comments

Describe the bug

"responses": {
  "400": {
    "description": "There was a problem with the data sent with the request.",
    "content": {
      "application/json": {},
      "application/xml": {}
    }
  }
}

Not having a schema on the returned content will generate an "Unknown media type schema type" exception. This is valid schema and many code first schema generators create this type of output.

Desktop (please complete the following information):

  • OS: macOS 10.13.7
  • Python Version: 3.10.15
  • openapi-python-client version 0.5.0

cfxegbert avatar Nov 04 '24 19:11 cfxegbert