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

Implement code generator that takes OpenAPI and generates zio.http.api.EndpointSpec code #1520

Closed
jdegoes opened this issue Sep 19, 2022 · 16 comments · Fixed by #2562
Closed
Assignees
Labels
💎 Bounty enhancement New feature or request 💰 Rewarded ziohackathon An official ticket for ZIO Hackathon

Comments

@jdegoes
Copy link
Member

jdegoes commented Sep 19, 2022

Is your feature request related to a problem? Please describe.

Some companies begin with OpenAPI, and then proceed to implement a server that satisfies the OpenAPI specification; then they will modify the OpenAPI 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 OpenAPI specification, and generate the corresponding zio.http.EndpointSpec values that declaratively describe the APIs.

Then a user can implement handlers based on the code-generated EndpointSpec values.

@jdegoes jdegoes added the enhancement New feature or request label Sep 19, 2022
@jdegoes jdegoes added the ziohackathon An official ticket for ZIO Hackathon label Oct 25, 2022
@jdegoes jdegoes changed the title Implement code generator that takes OpenAPI and generates zio.http.api.API code Implement code generator that takes OpenAPI and generates zio.http.api.EndpointSpec code Oct 26, 2022
@987Nabil
Copy link
Contributor

I am on this

@johannegger
Copy link

Hi!
is there progress on this? I'd love to try it out!

@sideeffffect
Copy link
Member

There's been some work on that here: guardrail-dev/guardrail#1615

@987Nabil
Copy link
Contributor

987Nabil commented May 3, 2023

I am still on it. The goal is, that it will be part for the first non RC release. If it might make it into an RC release before that, I am not sure about.

@jdegoes
Copy link
Member Author

jdegoes commented May 8, 2023

/bounty $1000

@algora-pbc
Copy link

algora-pbc bot commented May 8, 2023

💎 $1,000 bounty created by ZIO
🙋 If you start working on this, comment /attempt #1520 to notify everyone
👉 To claim this bounty, submit a pull request that includes the text /claim #1520 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to zio/zio-http!

Attempt Started (GMT+0) Solution
🔴 @kitlangton Jul 29, 2023, 5:25:06 PM WIP
🔴 @987Nabil Nov 7, 2023, 9:07:01 AM #2562
🔴 @sankalp142002 Dec 6, 2023, 2:46:48 PM WIP

@kitlangton
Copy link
Member

kitlangton commented Jul 29, 2023

I'm gonna give this a shot :D If it proves to be too hairy, I'll relinquish the claim as soon as I realize that.

Update: Nabil is working on this :) I've switched over to the CI Benchmarking issue.

@algora-pbc
Copy link

algora-pbc bot commented Aug 5, 2023

@kitlangton: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

@xonx4l
Copy link

xonx4l commented Nov 7, 2023

@jdegoes can you assign it to me??

@987Nabil
Copy link
Contributor

987Nabil commented Nov 7, 2023

@xonx4l Sorry, I forgot to mention this here, but I am already on this, based on my work of the other direction. See #2470

/attempt #1520

Options

@987Nabil 987Nabil self-assigned this Nov 7, 2023
Copy link

algora-pbc bot commented Nov 14, 2023

@987Nabil: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

Copy link

algora-pbc bot commented Nov 21, 2023

The bounty is up for grabs! Everyone is welcome to /attempt #1520 🙌

@sankalp142002
Copy link

sankalp142002 commented Dec 6, 2023

/attempt #1520

Options

Copy link

algora-pbc bot commented Dec 13, 2023

@sankalp142002: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

Copy link

algora-pbc bot commented Dec 20, 2023

💡 @987Nabil submitted a pull request that claims the bounty. You can visit your bounty board to reward.

987Nabil added a commit to 987Nabil/zio-http that referenced this issue Dec 20, 2023
Add general data structure and logic for any endpoint code gen
987Nabil added a commit that referenced this issue Dec 20, 2023
Add general data structure and logic for any endpoint code gen
@github-project-automation github-project-automation bot moved this from ZIO HTTP to ZIO Schema in ZIO Hackathon 2022 - New York City Dec 20, 2023
Copy link

algora-pbc bot commented Dec 20, 2023

🎉🎈 @987Nabil has been awarded $1,000! 🎈🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty enhancement New feature or request 💰 Rewarded ziohackathon An official ticket for ZIO Hackathon
Projects
Development

Successfully merging a pull request may close this issue.

7 participants