Add tests for:
- moveItemsToDirectory (success, same-parent precondition, conflicts)
- createDirectory errors (parent not found, not a directory, duplicate)
- bulk delete type validation (files vs directories)- listDirectory
pagination (limit, cursor, invalid inputs)
Also fix test setup to use httperr.ErrorHandler so HTTPErrorstatus codes
are properly returned.
Co-authored-by: Ona <no-reply@ona.com>
RenameNode was calling Resolve() which generated blob keys for
directories that don't have blobs, causing 'key not found' errors.
Added ResolveRenameOp to BlobKeyResolver interface:
- FlatKeyResolver returns nil (UUIDs don't change on rename)
- HierarchicalKeyResolver returns move op for files and directories
This allows directory renames to work correctly with flat storage,
and leverages os.Rename for atomic directory moves with hierarchical.
Co-authored-by: Ona <no-reply@ona.com>
Tests cover directory and file operations:
- List, fetch, create directories
- Fetch, download, rename files
- Trash and permanent delete (single and bulk)
- 404 for non-existent resources
- Verification that permanent deletes return 404
Directory rename test skipped due to VFS bug with blob
key resolution for directories.
Co-authored-by: Ona <no-reply@ona.com>
- Add swagger2openapi conversion step to generate OpenAPI 3.0
- Add patch-openapi.ts script to inject oneOf discriminated unions
- Update docs server to embed static openapi.json
- Update moveItemsToDirectory response to use oneOf for items
- Add docs/README.md documenting the pipeline
- Use bun instead of node for scripts
- 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.