baca-react-native-template icon indicating copy to clipboard operation
baca-react-native-template copied to clipboard

Add support for Fets for API

Open Ashraf-Ali-aa opened this issue 1 year ago • 3 comments

Start Date

No response

Implementation PR

No response

Reference Issues

No response

Summary

use https://github.com/ardatan/feTS for API client

Basic Example

check the website

Drawbacks

require open API spec

Unresolved questions

No response

Ashraf-Ali-aa avatar Apr 11 '24 16:04 Ashraf-Ali-aa

@Ashraf-Ali-aa We are using axios for api calls. It's deeply integrated into our logic and it will be hard to replace it with feTS.

Right now we don't plan to change axios to any other library but feel free to create your implementation. You can create fork and create pull request with your suggested changes.

MateuszRostkowski avatar Apr 12 '24 14:04 MateuszRostkowski

ok, thanks, you can use axois with Fets, this tool replaces the code generation part for getting API type safety in TS, it generates types at build time so no code is generated

https://the-guild.dev/openapi/fets/client/quick-start

https://the-guild.dev/openapi/fets/client/client-configuration

Ashraf-Ali-aa avatar Apr 12 '24 14:04 Ashraf-Ali-aa

I looks good, but I think it will not easy for that, we would also need to do some changes on the backend side, and now we don't have capacity to do that. But I will leave this issue open and maybe in near future we will try to implement it 🙂

Thanks for your suggestions ❤️

MateuszRostkowski avatar Apr 14 '24 09:04 MateuszRostkowski