feat: add OpenAPI spec generation with utoipa and justfile
- Add utoipa v5 dependency with ToSchema derives on all REST API DTOs - Annotate free-function handlers with #[utoipa::path] (trash, share, favorites, recent) - Create ApiDoc struct with OpenApi derive registering 37 schemas across 7 tags - Add generate-openapi binary outputting resources/gen/openapi.json - Serve OpenAPI spec at GET /api/openapi.json (public, no auth) - Add justfile with common dev commands (build, test, lint, check, openapi, db)
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
use serde::Serialize;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use super::file_dto::FileDto;
|
||||
use super::folder_dto::FolderDto;
|
||||
|
||||
/// Combined DTO that returns both sub-folders and files for a given folder
|
||||
/// in a single response, eliminating the double-fetch on every navigation.
|
||||
#[derive(Debug, Serialize)]
|
||||
#[derive(Debug, Serialize, ToSchema)]
|
||||
pub struct FolderListingDto {
|
||||
/// Sub-folders inside the requested folder
|
||||
pub folders: Vec<FolderDto>,
|
||||
|
||||
Reference in New Issue
Block a user