Skip to content

Add support for string interpolation to PathComponent

Compare
Choose a tag to compare
@tanner0101 tanner0101 released this 16 Jul 17:46
4cf052b
This patch was authored by @dimitribouniol and released by @tanner0101.

Enables call sites that use PathComponents to allow for string literals that make use of interpolation (#101).

In Vapor, this enables constants and other variables to be used in routes:

let api = app.grouped("version-\(Constants.apiVersion)")