rest-assured/src/main/java/io/restassured/builder/RequestSpecBuilder.java
public RequestSpecBuilder addPathParam(String parameterName, Object parameterValue) {
        spec.pathParam(parameterName, parameterValue);
        return this;
    }
public RequestSpecBuilder addPathParam(String parameterName, Object parameterValue) {
        spec.pathParam(parameterName, parameterValue);
        return this;
    }
Specify a path parameter. Path parameters are used to improve readability of the request path. E.g. instead
of writing:
<pre>
expect().statusCode(200).when().get("/item/"+myItem.getItemNumber()+"/buy/"+2);
</pre>
you can write:
<pre>
given().
pathParam("itemNumber", myItem.getItemNumber()).
pathParam("amount", 2).
expect().
statusCode(200).
when().
get("/item/{itemNumber}/buy/{amount}");
</pre>
<p/>
which improves readability and allows the path to be reusable in many tests. Another alternative is to use:
<pre>
expect().statusCode(200).when().get("/item/{itemNumber}/buy/{amount}", myItem.getItemNumber(), 2);
</pre>

@param parameterName  The parameter key
@param parameterValue The parameter value
@return The request specification