rest-assured/src/main/java/io/restassured/builder/RequestSpecBuilder.java
public RequestSpecBuilder addPathParams(String firstParameterName, Object firstParameterValue, Object... parameterNameValuePairs) {
        spec.pathParams(firstParameterName, firstParameterValue, parameterNameValuePairs);
        return this;
    }
public RequestSpecBuilder addPathParams(String firstParameterName, Object firstParameterValue, Object... parameterNameValuePairs) {
        spec.pathParams(firstParameterName, firstParameterValue, parameterNameValuePairs);
        return this;
    }
public RequestSpecBuilder addPathParams ( String firstParameterName , Object firstParameterValue , Object ... parameterNameValuePairs ) { spec . pathParams ( firstParameterName , firstParameterValue , parameterNameValuePairs ) ; return this ; }
Specify multiple path parameter name-value pairs. 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(), "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 firstParameterName      The name of the first parameter
@param firstParameterValue     The value of the first parameter
@param parameterNameValuePairs Additional parameters in name-value pairs.
@return The request specification
Specify multiple path parameter name - value pairs . 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 () 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 >