Open jdegoes opened 2 years ago
Possibly, this could be done as a plug-in to smithy4s
.
/bounty $500
/attempt #1522
with your implementation plan/claim #1522
in the PR body to claim the bountyThank you for contributing to zio/zio-http!
Add a bounty • Share on socials
Attempt | Started (GMT+0) | Solution |
---|---|---|
🔴 @promisingcoder | Jul 9, 2024, 8:00:50 AM | WIP |
🔴 @987Nabil | Jul 23, 2024, 9:16:27 AM | WIP |
🔴 @YanisOUALAN | Aug 20, 2024, 11:17:02 AM | WIP |
I can take on creating a PR in this repo, to have a zio-http interpreter(Smithy4s terminology). I would wait until Smithy4s 0.18 version is released as it will make it a lot easier. Happy to discuss further
Hi, I was looking into option of using a recursion scheme(s)/fix-point parser for Smithy IDL using its ABNF spec. In particular skeuomorph has an implementation of transforming protobuf schemas. If a similar approach can be used for the parser and also leveraging smithy4s for the spec. implementation.
@saadhashmi91 We would like to do this without any third party dependencies.
@adamgfraser just to be clear, do you allow other ZIO Organization dependencies, like zio-schema?
@sideeffffect If that functionality is necessary for something we are trying to do. For example ZIO Schema is already a dependency since it is necessary to describe arbitrary types as values as part of the endpoints API and we would basically have to implement it ourselves otherwise. But in general would not want to bring in an additional dependency if it was merely a "nice to have".
Hi, I was looking into option of using a recursion scheme(s)/fix-point parser for Smithy IDL using its ABNF spec. In particular skeuomorph has an implementation of transforming protobuf schemas. If a similar approach can be used for the parser and also leveraging smithy4s for the spec. implementation.
What would be the point of implementing a parser if you are trying to leverage smithy4s codegen? Also Smithy already has a parser and AST to represent it. I would recommend using that
@yisraelU Cool, I didn't look into it in detail.
@yisraelU I know you did some work on a smithy interpreter for zio-http - but were waiting for a new smithy 0.18 release for some extra functionality - did the release happen? were you able to use it? If so then we may be in a position to start evaluating soon
@googley42 yes. It was released not too long ago. Unfortunately it is taking a bit longer as I need to refactor for the rc3 version of ziohttp which has quite a few breaking changes
I just wanted to drop a note that I have published https://yisraelu.github.io/smithy4s-zio/
/attempt
/attempt #1522
@promisingcoder I will implement this ticket or at least find a strategy to do so together with @jdegoes on stream on the 26.07.
In general, this is not an easy task and I think you wrote in discord that you are a Scala beginner. Maybe you should try to pick some smaller issues first to get some experience.
@987Nabil I currently made a parser it is still in the beginning that takes in the smithy file and generates specs for a zio server and the server is running !! it's simple and in the beginning I intend to implement this feature I understand your concern but I intend to carry on
@promisingcoder: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏
The bounty is up for grabs! Everyone is welcome to /attempt #1522
🙌
/attempt 1522
Algora profile | Completed bounties | Tech | Active attempts | Options |
---|---|---|---|---|
@987Nabil | 56 ZIO bounties + 1 bounty from 1 project |
Scala |
Cancel attempt |
@987Nabil: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏
@jivanic-demystdata yes. I'll be on the zymposium on Friday and take a look with John on how to translate the formal syntax to code.
The bounty is up for grabs! Everyone is welcome to /attempt #1522
🙌
/attempt #1522
Algora profile | Completed bounties | Tech | Active attempts | Options |
---|---|---|---|---|
@YanisOUALAN | 1 bounty from 1 project | Cancel attempt |
@YanisOUALAN I already started and am half way through. That's why this task is assigned to me
Reminder: this project already produces servers and clients in zio-http from Smithy spec
Is your feature request related to a problem? Please describe.
Some companies begin with Smithy specifications, and then proceed to implement a server that satisfies a given Smithy specification; then they will modify the Smithy specification when a change is necessary, and then re-implement the server.
Describe the solution you'd like
In order to support this spec-first driven approach to API development (rather than code-first, which is the paradigm already implemented within the
zio.http.api
package), we will need a code generator, which can read in a Smithy specification, and generate the correspondingzio.http.api.EndpointSpec
values that declaratively describe the APIs.Then a user can implement handlers based on the code-generated
EndpointSpec
values.