Last active
December 15, 2015 18:29
-
-
Save fehguy/5304290 to your computer and use it in GitHub Desktop.
Creating a custom config reader in java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
in your web.xml, specify this as a custom reader | |
<init-param> | |
<param-name>swagger.config.reader</param-name> | |
<param-value>com.wordnik.swagger.sample.CustomConfigReader</param-value> | |
</init-param> | |
*/ | |
package com.wordnik.swagger.sample; | |
import com.wordnik.swagger.jaxrs.ConfigReader; | |
import javax.servlet.ServletConfig; | |
public class CustomConfigReader extends ConfigReader { | |
public CustomConfigReader(ServletConfig config) {} | |
@Override public String basePath() { | |
return ""; | |
} | |
@Override public String swaggerVersion() { | |
return com.wordnik.swagger.core.SwaggerSpec.version(); | |
} | |
@Override public String apiVersion() { | |
return ""; | |
} | |
@Override public String modelPackages() { | |
return ""; | |
} | |
@Override public String apiFilterClassName() { | |
return ""; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment