com.mangofactory.swagger.paths
Class AbsoluteSwaggerPathProvider

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

@Component
public class AbsoluteSwaggerPathProvider
extends SwaggerPathProvider


Constructor Summary
AbsoluteSwaggerPathProvider()
           
 
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
 

Constructor Detail

AbsoluteSwaggerPathProvider

public AbsoluteSwaggerPathProvider()
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