internetarchive / internetarchive/fatcat
refactor fatcat API server (fatcatd, Rust) to use OpenAPI Generator 5.x and hyper 0.13+
- Dominant language
- Python
- Stars
- 121
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
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).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the fatcatd API server, its generated API interface library, and the current Swagger schema and generator setup. Review how iron, hyper, tokio, and database calls are connected before choosing the threading or async approach. Done means the API uses OpenAPI Generator 5.x with an OpenAPI 3 schema, hyper 0.13+, and no iron dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, rust
- Domain
- api, backend, backend-api-design
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100