Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Swagger JAX-RS Reader and path building #3367
I created two modules that allows me to generate the description using the OSGi JAX-RS Whiteboard mechanism to detect the resources. One module for Swagger 1.5 and one for the current OpenAPI one.
I realized that your readers (for 1.5 the one in the module swagger-jaxrs, for the master the one in the module swagger-jaxrs2) handles the path building differently.
As fair as I understand the
This is working for swagger-jaxrs2's Reader but not for swagger-jaxrs's one.
If the parent path ends with '/' that character is removed. After that the class path is added. It does not check if the class path begins with a '/' and does not add it if missing. If the method's path is added after the class path has been added the check is done.
The swagger-jaxrs2 reader handles the path concatenation more generic and checks for missing
Do you agree that this could be changed in the 1.5 branch? I can try to come up with a PR.