Skip to content

feat: implement typed function signature #158

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

Merged
merged 3 commits into from
Jun 16, 2023
Merged

Conversation

garethgeorge
Copy link
Contributor

@garethgeorge garethgeorge commented Apr 20, 2023

Provide a strongly typed function signature for the ruby functions framework. The strongly typed function signature will provide JSON request deserialization and JSON response serialization by default. It may additionally be used with types implementing decode_json and to_json.

@garethgeorge garethgeorge force-pushed the garethgeorge/typed branch 5 times, most recently from a4e328b to e4c539b Compare April 21, 2023 19:18
janell-chen
janell-chen previously approved these changes Apr 24, 2023
@garethgeorge garethgeorge requested a review from dazuma April 24, 2023 23:29
Copy link
Member

@dazuma dazuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking much nicer now. Can you also add typed to the test framework (lib/functions_framework/testing.rb)? You can pretty much just copy call_http and test for :typed rather than :http and change a few names and yardoc comments.

@garethgeorge garethgeorge force-pushed the garethgeorge/typed branch 2 times, most recently from bd7d270 to 43935ef Compare May 24, 2023 00:06
@garethgeorge
Copy link
Contributor Author

Thanks for the review @dazuma! Added support for the typed signature in the testing package.

@garethgeorge garethgeorge requested a review from dazuma May 30, 2023 23:07
@garethgeorge garethgeorge merged commit 1489030 into main Jun 16, 2023
@garethgeorge garethgeorge deleted the garethgeorge/typed branch June 16, 2023 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants