Open mikewheaton opened 2 years ago
Any update on this?
Also ran into this issue now. The type itself does get generated but does not get linked to the mutation in any way. Is there a way to add this manually using enhanceEndpoints
maybe?
Having the same issue. How do you generate error statuses 4xx 5xx ? only 2xx are generated
I'm using rtk-query-codegen-api to generate from an OpenAPI spec. The endpoints have multiple responses (200, 404, etc.) with different values. Here's a simplified example:
The codegen then produces a single type for the response:
Should it also be producing the 404 response? In the case of an error I'd like to be able to display
friendlyMessage
, but there are no generated types containing this property. It's contained inside theerror
object that comes back from theuseSetCity()
hook, but the types are missingfriendlyMessage
so I can't get it out safely.Any suggestions on how to best implement this? I'm hoping for full type safety for multiple response types.