microsoft / restler-fuzzer

RESTler is the first stateful REST API fuzzing tool for automatically testing cloud services through their REST APIs and finding security and reliability bugs in these services.
MIT License
2.52k stars 283 forks source link

incorrect error message for invalid file path with multiple Swagger files specified in config.json #849

Open marina-p opened 5 months ago

marina-p commented 5 months ago

Description

The following code (see Config.fs) should print the specific file path, but currently prints all of the files specified in the list.

      printfn "ERROR: invalid path found in the list of Swagger specs given: %A" p
      raise (ArgumentException(sprintf "invalid API spec file path found: %A" p))

Steps to reproduce

Add the following to the compiler config:

{
  "SwaggerSpecFilePath": [
     "1exists.json", "2exists.json", "3error.json" ]
}

Expected results

ERROR: invalid path found in the list of Swagger specs given: 3error.json

Actual results

ERROR: invalid path found in the list of Swagger specs given: [ ]

Environment details

No response