Closed etash47 closed 5 days ago
@etash47 I believe you'll want to use the new Fetch API client for this
@mrlubos I upgraded to @hey-api/client-fetch
but now all my services are incorrectly typed :( When calling the service method, the response type is any
instead of the specified ResponseType
export default defineConfig({
client: '@hey-api/client-fetch',
input: 'http://127.0.0.1:8000/openapi.json',
output: './src/openapi',
base: 'http://localhost:8000',
types: {
enums: 'typescript',
dates: 'types+transform',
},
services: { asClass: true },
});
Can you create a StackBlitz example please?
@mrlubos Apologies. I upgraded to Fetch API Client on a branch where I didn't have @hey-api/client-fetch
installed. Working now!
(ps. this library has been an absolute gamechanger for us. Seriously appreciate the work you've put into this!!)
No worries @etash47, looks like you're working on some spacecraft/drone stuff? Sounds cool 🚀
Description
I've tried using both the legacy fetch client and
client-fetch
, and I'm finding that the following code does not execute when when the response code is a 500.OpenAPI specification (optional)
0.47.2
Configuration
System information (optional)
Chrome / Arc MacOS