File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ public struct RoutingMacro: ExtensionMacro {
176176
177177 let prefixedPath = " \( prefix ?? " " ) \( route. path) "
178178
179- for component in route . path . split ( separator: " / " ) {
179+ for component in prefixedPath . split ( separator: " / " ) {
180180 if component. first == " { " {
181181 let name = String ( component. dropFirst ( ) . dropLast ( ) )
182182 captured. append ( name)
Original file line number Diff line number Diff line change @@ -46,4 +46,10 @@ struct MacroRoutingTestPrefix {
4646 }
4747 }
4848 }
49+
50+ @Test ( " Resolved Path " )
51+ func testPathResolution( ) async throws {
52+ #expect( Controller . $Routing. auth. path == " /api/auth " )
53+ #expect( Controller . $Routing. deauthId. resolvedPath ( id: " test " ) == " /api/deauth/test " )
54+ }
4955}
You can’t perform that action at this time.
0 commit comments