wkennedy / swagger4spring-web

Swagger support for Spring MVC
89 stars 46 forks source link

Filtering mechanism #40

Closed dayman closed 10 years ago

dayman commented 10 years ago

There is now an ability to set excluding filters (in runtime or when initializing) so that some of the results (controllers or methods) would be ignored (e.g. filtered by api version or device). Excluding with @ApiExclude uses this mechanism from now and could be used as an example.

Usage: <bean class="com.knappsack.swagger4springweb.controller.ApiDocumentationController">
  <property name="filters">     <list>       <ref bean="filter1"/>       <ref bean="filter2"/>     </list>   </property> </bean>

Or they could be added "on the go" using setFilters(..)

wkennedy commented 10 years ago

Nice feature dayman, thanks. I'll add this to the example and the documentation.