@@ -154,7 +154,7 @@ def _process_output_with_schema(output: Any, openapi_schema: dict) -> Any:
154
154
# Handle direct string with format=uri
155
155
if output_schema .get ("type" ) == "string" and output_schema .get ("format" ) == "uri" :
156
156
if isinstance (output , str ) and output .startswith (("http://" , "https://" )):
157
- return _download_file (output )
157
+ return PathProxy (output )
158
158
return output
159
159
160
160
# Handle array of strings with format=uri
@@ -163,7 +163,7 @@ def _process_output_with_schema(output: Any, openapi_schema: dict) -> Any:
163
163
if items .get ("type" ) == "string" and items .get ("format" ) == "uri" :
164
164
if isinstance (output , list ):
165
165
return [
166
- _download_file (url )
166
+ PathProxy (url )
167
167
if isinstance (url , str ) and url .startswith (("http://" , "https://" ))
168
168
else url
169
169
for url in output
@@ -187,15 +187,15 @@ def _process_output_with_schema(output: Any, openapi_schema: dict) -> Any:
187
187
if isinstance (value , str ) and value .startswith (
188
188
("http://" , "https://" )
189
189
):
190
- result [prop_name ] = _download_file (value )
190
+ result [prop_name ] = PathProxy (value )
191
191
192
192
# Array of files property
193
193
elif prop_schema .get ("type" ) == "array" :
194
194
items = prop_schema .get ("items" , {})
195
195
if items .get ("type" ) == "string" and items .get ("format" ) == "uri" :
196
196
if isinstance (value , list ):
197
197
result [prop_name ] = [
198
- _download_file (url )
198
+ PathProxy (url )
199
199
if isinstance (url , str )
200
200
and url .startswith (("http://" , "https://" ))
201
201
else url
0 commit comments