com.mangofactory.swagger.readers
Class ApiDescriptionReader

java.lang.Object
  extended by com.mangofactory.swagger.readers.ApiDescriptionReader
All Implemented Interfaces:
Command<RequestMappingContext>

public class ApiDescriptionReader
extends java.lang.Object
implements Command<RequestMappingContext>


Constructor Summary
ApiDescriptionReader(SwaggerPathProvider pathProvider, java.util.Collection<RequestMappingReader> customAnnotationReaders, RequestMappingEvaluator requestMappingEvaluator)
           
 
Method Summary
 void execute(RequestMappingContext context)
           
 java.lang.String sanitizeRequestMappingPattern(java.lang.String requestMappingPattern)
          Gets a uri friendly path from a request mapping pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApiDescriptionReader

public ApiDescriptionReader(SwaggerPathProvider pathProvider,
                            java.util.Collection<RequestMappingReader> customAnnotationReaders,
                            RequestMappingEvaluator requestMappingEvaluator)
Method Detail

execute

public void execute(RequestMappingContext context)
Specified by:
execute in interface Command<RequestMappingContext>

sanitizeRequestMappingPattern

public java.lang.String sanitizeRequestMappingPattern(java.lang.String requestMappingPattern)
Gets a uri friendly path from a request mapping pattern. Typically involves removing any regex patterns or || conditions from a spring request mapping This method will be called to resolve every request mapping endpoint. A good extension point if you need to alter endpoints by adding or removing path segments. Note: this should not be an absolute uri

Parameters:
requestMappingPattern -
Returns:
the request mapping endpoint