You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SI-7: Review tests and align v1 namespace across REST API packages #1959
Subissue of EPIC #1938 — REST API Contract-First Migration
Problem
During the contract-first migration (SI-1 through SI-5), production code was moved from axum-rest-api-server to the new layered packages (rest-api-protocol, rest-api-application, rest-api-runtime-adapter). However, two issues remain:
Tests left in wrong package: The file axum-rest-api-server/src/v1/context/torrent/resources/torrent.rs contains unit tests for conversion functions that now live in rest-api-runtime-adapter::conversion. These tests should be moved alongside their production code.
Inconsistent v1 namespace: Packages rest-api-application and rest-api-runtime-adapter expose their modules at the top level, while rest-api-protocol, axum-rest-api-server, and rest-api-client use a v1/ module. The two outlier packages should be aligned.
Scope
Part A: Move misplaced tests
Move conversion tests from axum-rest-api-server/src/v1/context/torrent/resources/torrent.rs to rest-api-runtime-adapter::conversion.
Remove empty stub axum-rest-api-server/src/v1/context/torrent/resources/peer.rs and its module declaration.
Part B: Align v1 namespace
Add v1/ module to rest-api-application and move ports/ and use_cases/ under it.
Add v1/ module to rest-api-runtime-adapter and move adapters/, container.rs, conversion.rs under it.
Update all internal imports across the workspace.
Checklist
Conversion tests moved to rest-api-runtime-adapter
Empty peer.rs stub removed
rest-api-application has v1/ module with ports + use-cases
rest-api-runtime-adapter has v1/ module with adapters + container + conversion
Activity
chore(docs): close SI-1 through SI-5 issue specs and update EPIC #1938
Merge #1960: chore(docs): close SI-1 through SI-5 issue specs and upd…
refactor(api): align v1 namespace and move conversion tests #1959
Merge #1963: refactor(api): align v1 namespace and move conversion te…
chore(issues): archive closed issue specs torrust#1447, torrust#1459, t…
Merge #1984: chore(issues): archive 10 closed issue specs from docs/i…