Here is my api requirement
GET http://localhost:8080/filePath/{path}
For example:
curl http://localhost:8080/filePath/home/
OpenAPI 2.0 (Swagger 2.0) and OpenAPI 3.0 do not allow you to use slashes in path parameters, so you can't do that. There's an open feature request for this:
https://github.com/OAI/OpenAPI-Specification/issues/892