Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Swagger UI application is now included through the runtime dependency in the Gradle file (dependency on 'org.webjars.npm:swagger-ui-dist'), and Tomcat is then instructed to route requests for /swagger-ui to the WebJar (see code in org.apache.fineract.infrastructure.core.boot.WebFrontEndConfiguration).
The only problem is that the code in org.apache.fineract.infrastructure.core.boot.WebFrontEndConfiguration refers to the WebJAR with a specific version number. When we upgrade the dependency we need to also change the source code to point to the right version. A better solution would be to make this version agnostic - either by using the webjars-locator (https://mvnrepository.com/artifact/org.webjars/webjars-locator) or by simply writing some code to find swagger.json from classpath and using the found location to determine the right resource location to use.