Class DefaultPathProvider
- java.lang.Object
-
- springfox.documentation.spring.web.paths.DefaultPathProvider
-
- All Implemented Interfaces:
PathProvider
public class DefaultPathProvider extends java.lang.Object implements PathProvider
-
-
Constructor Summary
Constructors Constructor Description DefaultPathProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetDocumentationPath()The base path to the swagger api documentation.java.lang.StringgetOperationPath(java.lang.String operationPath)The relative path to the operation, from the basePath, which this operation describes.java.lang.StringgetResourceListingPath(java.lang.String groupName, java.lang.String apiDeclaration)Corresponds to the path attribute of a swagger Resource Object (within a Resource Listing).
-
-
-
Method Detail
-
getDocumentationPath
protected java.lang.String getDocumentationPath()
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"
- Returns:
- the documentation base path
-
getOperationPath
public java.lang.String getOperationPath(java.lang.String operationPath)
The relative path to the operation, from the basePath, which this operation describes. The value SHOULD be in a relative (URL) path format.Includes the apiResourcePrefix
- Specified by:
getOperationPathin interfacePathProvider- Parameters:
operationPath- operation path- Returns:
- the relative path to the api operation
-
getResourceListingPath
public java.lang.String getResourceListingPath(java.lang.String groupName, java.lang.String apiDeclaration)Corresponds to the path attribute of a swagger Resource Object (within a Resource Listing).This method builds a URL based off of
- Specified by:
getResourceListingPathin interfacePathProvider- Parameters:
groupName- the group name for this Resource Object e.g. 'default'apiDeclaration- the identifier for the api declaration e.g 'business-controller'- Returns:
- the resource listing path
- See Also:
by appending the swagger group and apiDeclaration
-
-