acacode / swagger-typescript-api

Generate the API Client for Fetch or Axios from an OpenAPI Specification
MIT License
3.08k stars 338 forks source link

--unwrap-response-data response object return type is missing the undefined type #801

Open ShuviSchwarze opened 6 days ago

ShuviSchwarze commented 6 days ago

Due to how unwrapping data work, it is possible that the request function will return an undefined value when an error is thrown that is not reflected on the type signature of the functions, which leads to incorrect null checking by typescript.

smorimoto commented 5 days ago

Patch welcome