mirror of
https://github.com/get-drexa/drive.git
synced 2026-02-02 13:21:17 +00:00
docs: add OpenAPI documentation with Scalar UI
- Add swaggo annotations to all HTTP handlers - Add Swagger/OpenAPI spec generation with swag - Create separate docs server binary (drexa-docs) - Add Makefile with build, run, and docs targets - Configure Scalar as the API documentation UI Run 'make docs' to regenerate, 'make run-docs' to serve.
This commit is contained in:
@@ -11,12 +11,18 @@ type HTTPHandler struct {
|
||||
db *bun.DB
|
||||
}
|
||||
|
||||
// patchFileRequest represents a file update request
|
||||
// @Description Request to update file properties
|
||||
type patchFileRequest struct {
|
||||
Name string `json:"name"`
|
||||
// New name for the file
|
||||
Name string `json:"name" example:"renamed-document.pdf"`
|
||||
}
|
||||
|
||||
// patchDirectoryRequest represents a directory update request
|
||||
// @Description Request to update directory properties
|
||||
type patchDirectoryRequest struct {
|
||||
Name string `json:"name"`
|
||||
// New name for the directory
|
||||
Name string `json:"name" example:"My Documents"`
|
||||
}
|
||||
|
||||
func NewHTTPHandler(vfs *virtualfs.VirtualFS, db *bun.DB) *HTTPHandler {
|
||||
|
||||
Reference in New Issue
Block a user