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
Post a Comment