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

refactor fatcat API server (fatcatd, Rust) to use OpenAPI Generator 5.x and hyper 0.13+ #67

Open
bnewbold opened this issue Jan 3, 2021 · 1 comment
Labels
help wanted Good tasks for external contributors

Comments

@bnewbold
Copy link
Member

bnewbold commented Jan 3, 2021

This will likely involve switching the API schema definition itself from "swagger" (openapi 2) to openapi 3.

fatcatd uses a generated API interface library created using an old and deprecated version of the swagger code generator. Some of the problems with this situation:

  • generator tool is old enough that hard for others to run (eg, docker image no longer online?)
  • lots of lint warnings and other problems in generated code that we work around with automated search/replace
  • creates tokio/hyper dependency conflicts

OpenAPI Generator 5.0 has been released. The new output server schema/structure uses hyper 0.13 directly, instead of via the iron framework. We should refactor to use this generator, and the hyper server/service API, without iron. This API is async; we can either use threading (as we do currently), or have an async structure with thread pool workers wrapping blocking calls (like diesel database queries).

@bnewbold
Copy link
Member Author

Partial progress on this (eg, openapi3 yaml and codegen stuff) in: https://gitlab.com/bnewbold/fatcat-cli

To be clear, intend to maintain fatcat-openapi crate in this repository (fatcat). fatcat-cli will be able to just depend on a published crate once we have a 5.0 version for use with fatcat API server, and we can rip the codegen stuff out of the fatcat-cli repo.

@bnewbold bnewbold added the help wanted Good tasks for external contributors label Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Good tasks for external contributors
Projects
None yet
Development

No branches or pull requests

1 participant