Replies: 1 comment
-
I think it could be useful and I can provide support on this. Should we create API client package in a new repo or generate it through a new yarn script? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As far as I can tell, backend team maintans a Swagger file
Wen can generate an API client with this Swagger
By doing this;
We can capture far ore easily breaking changes because we would get type error messages.
We could be writing less code manually.
https://github.com/OpenAPITools/openapi-generator-cli
https://openapi-generator.tech/docs/generators/typescript-fetch/
https://openapi-generator.tech/docs/generators/typescript-axios/
Generated client method can be consumed in SWR hooks.
Beta Was this translation helpful? Give feedback.
All reactions