-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
670 use typed responses for api calls #858
base: devel
Are you sure you want to change the base?
670 use typed responses for api calls #858
Conversation
Hey @zmjohnso! Like the direction this is going. e.g. what do you think about generating the schema with |
Oh, yes; thanks for sharing that! I think generating the types is usually better and should also save some time. I added the types in and I'm working on updating some more endpoints. I'll push some more code in the next few for you to take a peak. |
@zmjohnso How do you want to proceed? Should we include the generated files here before publishing it as a standalone lib for others to use as well? |
@theborakompanioni Yes, I think just including the generated file here would be the easiest way to get the most value for Jam. But publishing a standalone lib is a neat idea; something that can be worked on in the future. |
The goal of this PR is to begin addressing issue #670. As an example, I added a typed API response to
getWalletAll
. As the issue states, this should improve the developer experience by moving the body parsing into a single location and give some type completion when making this call in the future. If this still seems like a good direction to go in, I will start working on adding typed responses for the rest of the calls inJmWalletApi.ts
.