-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
add HttpApi modules to /platform #3495
Conversation
🦋 Changeset detectedLatest commit: 11118f9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 31 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
9622fc8
to
498f23c
Compare
), | ||
ApiGroup.add( | ||
ApiEndpoint.post("create", "/").pipe( | ||
ApiEndpoint.setPayload(ApiSchema.Multipart(Schema.Struct({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all this supposed to set validation schemas? If that is the case (and I'm being a bit nitpicking here) reflecting that in the name will be easier to understand and more consistent with the rest of the methods of the platform package (eg setCookiesSchema or setHeadersSchema)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All Api* modules are schema only, and the ApiBuilder
module is for the implementation side.
The Api naming might change to make it more obvious that everything is a schema.
c2d1019
to
8c6fec6
Compare
I'm not sure if it makes sense (im consider my self very new on effect and fp paradigms), but I would like the @effect/RPC API to eventually be as similar to this HttpApi as possible. While RPC is currently very composable, I understand that it is not as declarative as this (HttpApi) in terms of separating the blueprint or declaration (with the help of schemas) from the implementation. Great work, congratulations! 🚀 |
59d9522
to
9d8acac
Compare
9d8acac
to
6f12b7a
Compare
6f12b7a
to
9ea0f4f
Compare
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
Co-authored-by: Tim Smart <tim.smart@arisechurch.com>
No description provided.