viclovsky/swagger-coverage

Issue with pathParam

arturmkr opened this issue · 1 comments

Using swagger-coverage 1.3.5

I have following test:

    String userID = "mike";
    RestAssured.given()
        .filters(new SwaggerCoverageRestAssured())
        .when()
        .get("users/v1/" + userID);

Request in the log:

Request URI:	https://example.com/users/v1/mike
Request params:	<none>
Query params:	<none>
Form params:	<none>
Path params:	<none>

In the swagger-coverage report there is an issue:

path «userID» is not empty

But if I change test to:

    String userID = "mike";
    RestAssured.given()
        .filters(new SwaggerCoverageRestAssured())
        .pathParam("userID", userID)
        .when()
        .get("users/v1/" + "{userID}");

Request in the log:

Request URI:	https://example.com/users/v1/mike
Request params:	<none>
Query params:	<none>
Form params:	<none>
Path params:	userID=mike

And no issue is shown in the report.

Hi, @arturmkr ! Work as designed.
It is how REST-assured filter works. If path params is presented, it will be shown it report.