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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate all endpoints #444

Open
BenFradet opened this issue Apr 10, 2020 · 7 comments
Open

Generate all endpoints #444

BenFradet opened this issue Apr 10, 2020 · 7 comments

Comments

@BenFradet
Copy link
Contributor

This article got me thinking:

  • we might be able to scrape the documentation
  • generate an open api specification out of it
  • generate a client through mu
  • maybe generate implementations also

馃

@BenFradet
Copy link
Contributor Author

or maybe bypass mu and openapi and do:

  • scrape the documentation
  • generate algebra
  • generate implementation
  • generate documentation

@dcsobral
Copy link
Contributor

The documentation does not provide return types, though. It's all well and good on a dynamic typing language like javascript, but it's a big missing piece for Scala.

@BenFradet
Copy link
Contributor Author

We might be able to infer them from a response though

@dev590t
Copy link

dev590t commented Jul 31, 2021

If in futur, we will generate all code of github4s. I think the lib ghostbuster91/sttp-openapi-generator is interested.
sttp propose a interface with a logic similar to github4s, and sttp-openapi-generator generate idiomatic scala code.

But currently, sttp-openapi-generator can't still generate compilable code.

Generate all endpoints,this could allow reduce the time of developpement, debug, testing(if the generator is reliable). We can still after fix manually the typing issue. The idea seems great for me.

@abestel
Copy link

abestel commented Sep 15, 2021

Hello,

Just wondering, ever thought of using https://github.com/github/rest-api-description as a basis? It's in beta according to the README, but as far as I can see, it's pretty much in line with the actual API,
This combined with https://github.com/guardrail-dev/sbt-guardrail could easily replace most of the codebase while extending the managed endpoints.

If there is any interest, I can start working on a PoC.

@juanpedromoreno
Copy link
Member

Sounds really interesting, thanks @abestel !

@dev590t
Copy link

dev590t commented Oct 21, 2021

interessed
for me @abestel

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

No branches or pull requests

5 participants