path

inline fun <P : Any> path(name: String, codec: StringCodec<P>): PathVariable<P>(source)

Defines a required path placeholder.

Use the returned PathVariable inside a URI template such as "users" / path.long("id"). Tapik renders it as {name} in the path while retaining codec so generators know the runtime type of the captured segment.


Shortcut to the predefined PathVariable factory methods such as PathVariable.Companion.long.