rebuilderd
rebuilderd copied to clipboard
Add API documentation
To easily create integrations with rebuilderd it would be nice if the API endpoints would be documented and available somewhere.
I'd love to help out here, do you want them documented and do you have a preferred way to document them?
The routes are defined here: https://github.com/kpcyrd/rebuilderd/blob/master/daemon/src/api.rs
#[get("/api/v0/workers")]
#[post("/api/v0/job/sync")]
#[get("/api/v0/pkgs/list")]
#[post("/api/v0/queue/list")]
#[post("/api/v0/queue/push")]
#[post("/api/v0/queue/pop")]
#[post("/api/v0/queue/drop")]
#[post("/api/v0/build/ping")]
#[post("/api/v0/build/report")]
The struct to requests/responses are defined at the bottom of this file: https://github.com/kpcyrd/rebuilderd/blob/master/common/src/api.rs
I don't have preferences about the format to document this, any ideas?