com.mangofactory.swagger.paths
Class RelativeSwaggerPathProvider

java.lang.Object
  extended by com.mangofactory.swagger.paths.SwaggerPathProvider
      extended by com.mangofactory.swagger.paths.RelativeSwaggerPathProvider

public class RelativeSwaggerPathProvider
extends SwaggerPathProvider


Field Summary
static java.lang.String ROOT
           
 
Constructor Summary
RelativeSwaggerPathProvider(javax.servlet.ServletContext servletContext)
           
 
Method Summary
protected  java.lang.String applicationPath()
          For relative SwaggerPathProviders this is typically '/' meaning relative to the swagger ui page serving the documentation.
protected  java.lang.String getDocumentationPath()
          The base path to the swagger api documentation.
 
Methods inherited from class com.mangofactory.swagger.paths.SwaggerPathProvider
getApiResourcePrefix, getApplicationBasePath, getOperationPath, getResourceListingPath, sanitiseUrl, setApiResourcePrefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT

public static final java.lang.String ROOT
See Also:
Constant Field Values
Constructor Detail

RelativeSwaggerPathProvider

public RelativeSwaggerPathProvider(javax.servlet.ServletContext servletContext)
Method Detail

applicationPath

protected java.lang.String applicationPath()
Description copied from class: SwaggerPathProvider
For relative SwaggerPathProviders this is typically '/' meaning relative to the swagger ui page serving the documentation. The swagger specification recommends that this should be an absolute URL. Corresponds to the base path attribute of a swagger api declaration. This is the actual base path serving the api (not the swagger documentation)

Specified by:
applicationPath in class SwaggerPathProvider
Returns:
the applications base uri

getDocumentationPath

protected java.lang.String getDocumentationPath()
Description copied from class: SwaggerPathProvider
The base path to the swagger api documentation. Typically docs are served from <yourApp>/api-docs so a relative resourceListing path will omit the api-docs segment. E.g. Relative: "path": "/" Absolute: "path": "http://localhost:8080/api-docs"

Specified by:
getDocumentationPath in class SwaggerPathProvider
Returns:
the documentation base path