can we move some swagger configuration from web.xml -


in swagger 1.2.9-1.2.3 or old versions have config reader com.wordnik.swagger.jaxrs.configreader class, can extend class , can declare swagger properties swagger.api.basepath , api.version , swagger.version etc. in current version of swagger 2.10-1.3.0 class not present. there way can move above configurations web.xml, want have them in property file instead of hard coding in web.xml.

thanks in advance.

there's thread explaining how on swagger google group.

basically, in swagger 1.3, need use swaggerconfig class, so:

swaggerconfig config = new swaggerconfig(); config.setbasepath(yourbasepathvariable); configfactory.setconfig(config); 

however, need occur after swagger loads , sets default basepath, because otherwise (if basepath gets set first) overwritten.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -