Closed yujonglee closed 2 months ago
Hello there 👋🏼
This is a very interesting case. The OpenAPI specification allows for media content objects to have empty objects, but it's usually clearer from the context what the decoded data should look like (for example, raw binary data for an image). In this case, I guess a generic map
type would be appropriate — do you agree?
The offending entry in the spec:
{
"paths": {
"/api/0/projects/{organization_slug}/{project_slug}/files/dsyms/": {
"get": {
"tags": ["Projects"],
"description": "Retrieve a list of debug information files for a given project.",
"operationId": "List a Project's Debug Information Files",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {}
}
}
}
}
}
}
}
Version 0.1.0
includes a change to warn instead of raise on this type. It will emit a generic any
type for this particular schema. This should allow you to go ahead and generate some code while we figure out what to do with this particular situation.
Hi, yes I think generic map type will do. Thanks for the quick patch!
Hello again 👋🏼 I'll go ahead and close this for now. If you discover a better type (other than any
) that we could generate here, we can make further changes in the future.
To reproduce: https://github.com/yujonglee/open-api-sentry