Class SwaggerUiService


  • @Path("api-docs")
    public class SwaggerUiService
    extends Object
    • Method Detail

      • getResource

        @GET
        @Path("{resource:.*}")
        public javax.ws.rs.core.Response getResource​(@Context
                                                     javax.ws.rs.core.UriInfo uriInfo,
                                                     @PathParam("resource")
                                                     String resourcePath)
      • replaceUrl

        protected String replaceUrl​(String index,
                                    String replacement)
        Replaces the URL inside Swagger UI index.html file. The implementation does not attempt to read the file and parse it as valid HTML but uses straightforward approach by looking for the URL pattern of the SwaggerUIBundle initialization and replacing it.
        Parameters:
        index - index.html file content
        replacement - replacement URL
        Returns:
        index.html file content with replaced URL