docs: partially document codebase
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
Should make it easier for frontend to figure out what stuff actually does, more will be added as the project goes on
This commit is contained in:
parent
1aa38631b8
commit
16ccf94631
10 changed files with 226 additions and 18 deletions
|
@ -1,3 +1,4 @@
|
|||
//! `/api/v1/versions` Returns info about api versions
|
||||
use actix_web::{HttpResponse, Responder, get};
|
||||
use serde::Serialize;
|
||||
|
||||
|
@ -10,8 +11,21 @@ struct Response {
|
|||
#[derive(Serialize)]
|
||||
struct UnstableFeatures;
|
||||
|
||||
/// `GET /api/versions` Returns info about api versions.
|
||||
///
|
||||
/// requires auth: no
|
||||
///
|
||||
/// ### Response Example
|
||||
/// ```
|
||||
/// json!({
|
||||
/// "unstable_features": {},
|
||||
/// "versions": [
|
||||
/// "1"
|
||||
/// ]
|
||||
/// });
|
||||
/// ```
|
||||
#[get("/versions")]
|
||||
pub async fn res() -> impl Responder {
|
||||
pub async fn get() -> impl Responder {
|
||||
let response = Response {
|
||||
unstable_features: UnstableFeatures,
|
||||
// TODO: Find a way to dynamically update this possibly?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue