Undefined detail when endpoint that return a file throws a exception #1533
Labels
bug 🔥
Something isn't working
prioritized 🚚
This issue has been prioritized and will be worked on soon
Description
The example provided below contains two endpoints:
When testing these endpoints using the
curl
command, everything works fine:However, when accessing the endpoints using the client generated by OpenAPI-TS, the
readUserUserGet
function works as expected, but the functionreadEvidenceEvidenceGet
fails to retrieve thedetail
field indetail="Evidence not found."
:readUserUserGet
Output:
readEvidenceEvidenceGet
Output:
Reproducible example or configuration
https://gitlab.com/lucasmsoares96/DetailBug
OpenAPI specification (optional)
{
"openapi": "3.1.0",
"info": {
"title": "FastAPI",
"version": "0.1.0"
},
"paths": {
"/evidence/": {
"get": {
"summary": "Read Evidence",
"description": "Get Complaint Evidences.",
"operationId": "read_evidence_evidence__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/zip": {}
}
}
}
}
},
"/user/": {
"get": {
"summary": "Read User",
"description": "Get User.",
"operationId": "read_user_user__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserPublic"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"UserPublic": {
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"age": {
"type": "integer",
"title": "Age"
}
},
"type": "object",
"required": [
"name",
"age"
],
"title": "UserPublic"
}
}
}
}
System information (optional)
OS: macOS 15.2 24C101 x86_64
Host: MacBookPro11,5
Kernel: 24.2.0
Uptime: 2 days, 2 hours, 20 mins
Packages: 127 (brew)
Shell: zsh 5.9
Resolution: 1440x900@2x
DE: Aqua
WM: Quartz Compositor
WM Theme: Blue (Light)
Terminal: vscode
CPU: Intel i7-4870HQ (8) @ 2.50GHz
GPU: Intel Iris Pro, AMD Radeon R9 M370X
Memory: 10755MiB / 16384MiB
The text was updated successfully, but these errors were encountered: