Skip to content
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

Feat: Adds PATCH & DELETE and Improve client types #6

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

sethsandaru
Copy link
Contributor

There are 2 things that are being introduced in this PR

Adds PATCH, DELETE

Up to now, RESTFul is still popular and widely used worldwide, thus PATCH & DELETE should be added. This would increase the package compatibility with userland's approaches.

Parse the response body

Before, we blindly accept the response body and directly return it to userland.

There is a small issue if we have Date.

Express will always transform the JS Date instances to strings (utilizing the toISOString)

image

On the client side, we thought that we would have the correct Date instance but it isn't.

So adds logic to pick up the schema definition from the given method & path and parse the response body. This will ensure we have the correct response body & types before doing anything else.

Thank you.

@sethsandaru sethsandaru self-assigned this Aug 22, 2023
@sethsandaru sethsandaru changed the title Feat(clientside): Adds PATCH & DELETE and Improve client types Feat: Adds PATCH & DELETE and Improve client types Aug 22, 2023
@Antman261 Antman261 merged commit 70add2b into main Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants